Something went wrong. Try again.
Code created while working through "Distributed Services with Go" by Travis Jeffery.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667CONFIG_PATH=./test/CONFIG_PATH_CERTS=${CONFIG_PATH}/cert/
.PHONY: initinit: mkdir -p ${CONFIG_PATH_CERTS}
.PHONY: gencertgencert: $(MAKE) init cfssl gencert \ -initca test/ca-csr.json | cfssljson -bare ca cfssl gencert \ -ca=ca.pem \ -ca-key=ca-key.pem \ -config=test/ca-config.json \ -profile=server \ test/server-csr.json | cfssljson -bare server cfssl gencert \ -ca=ca.pem \ -ca-key=ca-key.pem \ -config=test/ca-config.json \ -profile=client \ -cn="root" \ test/client-csr.json | cfssljson -bare root-client cfssl gencert \ -ca=ca.pem \ -ca-key=ca-key.pem \ -config=test/ca-config.json \ -profile=client \ -cn="nobody" \ test/client-csr.json | cfssljson -bare nobody-client mv *.pem *.csr ${CONFIG_PATH_CERTS}
.PHONY: compilecompile: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest protoc api/v1/*.proto \ --go_out=. \ --go-grpc_out=. \ --go_opt=paths=source_relative \ --go-grpc_opt=paths=source_relative \ --proto_path=.
$(CONFIG_PATH)/model.conf: cp test/model.conf $(CONFIG_PATH)/model.conf
$(CONFIG_PATH)/policy.csv: cp test/policy.csv $(CONFIG_PATH)/policy.csv
.PHONY: testtest: $(CONFIG_PATH)/policy.csv $(CONFIG_PATH)/model.conf go clean -testcache go test ./... # todo: use '-race'
TAG ?= 0.0.1build-docker: docker build -t github.com/justagabriel/proglog:$(TAG) .
build-k8: kind delete cluster kind create cluster kind load docker-image github.com/justagabriel/proglog:$(TAG) helm install proglog deploy/proglog sleep 10 kubectl port-forward pods/proglog-0 8400:8400