summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRemigiusz Janeczek <remigiusz.janeczek@nokia.com>2020-03-18 13:21:35 +0100
committerRemigiusz Janeczek <remigiusz.janeczek@nokia.com>2020-03-19 08:51:16 +0100
commitf404a66530eac7b072014af437deb1771977b1f4 (patch)
treefa3391a43eab0414aac48bf54b6cce2fb6098cb1 /Makefile
parentc16d738408ceef496be1d8bb1b22f6c0d868e6fc (diff)
Add certservice client to Makefile (local run)
Move files used only in local run from submodules to base dir Issue-ID: AAF-1107 Signed-off-by: Remigiusz Janeczek <remigiusz.janeczek@nokia.com> Change-Id: Ia027bfb5859fb2b316215b3f2633b51666d06280
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000..1e4f871c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,37 @@
+all: build start-backend run-client stop-client stop-backend
+start-with-client: start-backend run-client
+.PHONY: build
+
+build:
+ @echo "##### Build Cert Service images locally #####"
+ mvn clean install -P docker
+ @echo "##### DONE #####"
+
+start-backend:
+ @echo "##### Start Cert Service #####"
+ docker-compose up -d
+ @echo "## Configure ejbca ##"
+ docker exec aafcert-ejbca /opt/primekey/scripts/ejbca-configuration.sh
+ @echo "##### DONE #####"
+
+run-client:
+ @echo "##### Create Cert Service Client volume folder: `pwd`/compose-resources/client-volume/ #####"
+ mkdir -p `pwd`/compose-resources/client-volume/
+ @echo "##### Start Cert Service Client #####"
+ docker run \
+ --name aafcert-client \
+ --env-file ./compose-resources/client-configuration.env \
+ --network certservice_certservice \
+ --mount type=bind,src=`pwd`/compose-resources/client-volume/,dst=/var/certs \
+ onap/org.onap.aaf.certservice.aaf-certservice-client:latest
+
+stop-client:
+ @echo "##### Remove Cert Service Client #####"
+ @echo "Removing aafcert-client"
+ @docker rm aafcert-client > /dev/null 2> /dev/null || true
+ @echo "##### DONE #####"
+
+stop-backend:
+ @echo "##### Stop Cert Service #####"
+ docker-compose down
+ @echo "##### DONE #####"