aboutsummaryrefslogtreecommitdiffstats
path: root/certServiceK8sExternalProvider/Makefile
diff options
context:
space:
mode:
authorJan Malkiewicz <jan.malkiewicz@nokia.com>2020-11-02 14:53:30 +0100
committerJan Malkiewicz <jan.malkiewicz@nokia.com>2020-11-05 09:04:13 +0100
commit857b3d0e65f1a37000d12d6df8d7e5a917e15b23 (patch)
tree120221139ee6e861a1ced553a202e2d56879ff1c /certServiceK8sExternalProvider/Makefile
parenta622e8871c9bea86aff16ffe5ae021abe08326fe (diff)
[OOM-K8S-CERT-EXTERNAL-PROVIDER] Configuration for local development
Issue-ID: OOM-2559 Signed-off-by: Jan Malkiewicz <jan.malkiewicz@nokia.com> Change-Id: I5ee38593cff665dc7d0e0d17f4df569be129d778
Diffstat (limited to 'certServiceK8sExternalProvider/Makefile')
-rw-r--r--certServiceK8sExternalProvider/Makefile22
1 files changed, 19 insertions, 3 deletions
diff --git a/certServiceK8sExternalProvider/Makefile b/certServiceK8sExternalProvider/Makefile
index ac353934..b8f5f6fc 100644
--- a/certServiceK8sExternalProvider/Makefile
+++ b/certServiceK8sExternalProvider/Makefile
@@ -17,16 +17,32 @@
# ============LICENSE_END=========================================================
#
+ip_addr=$(shell hostname -I | awk '{print $$1}')
+cmpv2_issuer_pod_id=$(shell kubectl -n onap get po | grep cmpv2issuer | awk '{print $$1}')
build:
- go build -v -o bin/oom-certservice-k8s-external-provider
+ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -v -o bin/oom-certservice-cmpv2issuer
test: build
go test ./...
build-docker-image:
- docker build -t onap/oom-certservice-k8s-external-provider .
+ docker build -t onap/oom-certservice-cmpv2issuer:latest .
run-docker-image:
- docker run -it onap/oom-certservice-k8s-external-provider
+ docker run -it onap/oom-certservice-cmpv2issuer:latest
+dev-copy-certs:
+ mkdir -p dev/certs
+ cp ../certs/cmpv2Issuer-cert.pem dev/certs/cmpv2Issuer-cert.pem
+ cp ../certs/cmpv2Issuer-key.pem dev/certs/cmpv2Issuer-key.pem
+ cp ../certs/cacert.pem dev/certs/cacert.pem
+
+dev-build-docker-image: build dev-copy-certs
+ docker build -t onap-dev/cmpv2issuer:latest . -f dev/Dockerfile.dev
+
+dev-run-docker-image:
+ docker run -it onap-dev/cmpv2issuer:latest
+
+dev-update-docker-hosts-file:
+ kubectl exec -it -n onap ${cmpv2_issuer_pod_id} -c kube-rbac-proxy -- sh -c "echo '$(ip_addr) oom-cert-service' >> /etc/hosts"