Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. .PHONY: cfssl ca req clean
  2. CFSSL = @env PATH=$(GOPATH)/bin:$(PATH) cfssl
  3. JSON = env PATH=$(GOPATH)/bin:$(PATH) cfssljson
  4. all: cfssl ca req
  5. cfssl:
  6. go get -u -tags nopkcs11 github.com/cloudflare/cfssl/cmd/cfssl
  7. go get -u github.com/cloudflare/cfssl/cmd/cfssljson
  8. go get -u github.com/mattn/goreman
  9. ca:
  10. mkdir -p certs
  11. $(CFSSL) gencert -initca config/ca-csr.json | $(JSON) -bare certs/ca
  12. req:
  13. $(CFSSL) gencert \
  14. -ca certs/ca.pem \
  15. -ca-key certs/ca-key.pem \
  16. -config config/ca-config.json \
  17. config/req-csr.json | $(JSON) -bare certs/etcd1
  18. $(CFSSL) gencert \
  19. -ca certs/ca.pem \
  20. -ca-key certs/ca-key.pem \
  21. -config config/ca-config.json \
  22. config/req-csr.json | $(JSON) -bare certs/etcd2
  23. $(CFSSL) gencert \
  24. -ca certs/ca.pem \
  25. -ca-key certs/ca-key.pem \
  26. -config config/ca-config.json \
  27. config/req-csr.json | $(JSON) -bare certs/etcd3
  28. $(CFSSL) gencert \
  29. -ca certs/ca.pem \
  30. -ca-key certs/ca-key.pem \
  31. -config config/ca-config.json \
  32. config/req-csr.json | $(JSON) -bare certs/proxy1
  33. clean:
  34. rm -rf certs