blob: 45ffb48b30927244c1b6e13896f824b50e6a3951 [file] [log] [blame]
Remigiusz Janeczekf404a662020-03-18 13:21:35 +01001all: build start-backend run-client stop-client stop-backend
2start-with-client: start-backend run-client
3.PHONY: build
4
5build:
6 @echo "##### Build Cert Service images locally #####"
7 mvn clean install -P docker
8 @echo "##### DONE #####"
9
10start-backend:
11 @echo "##### Start Cert Service #####"
12 docker-compose up -d
13 @echo "## Configure ejbca ##"
14 docker exec aafcert-ejbca /opt/primekey/scripts/ejbca-configuration.sh
15 @echo "##### DONE #####"
16
17run-client:
18 @echo "##### Create Cert Service Client volume folder: `pwd`/compose-resources/client-volume/ #####"
19 mkdir -p `pwd`/compose-resources/client-volume/
20 @echo "##### Start Cert Service Client #####"
21 docker run \
22 --name aafcert-client \
23 --env-file ./compose-resources/client-configuration.env \
24 --network certservice_certservice \
25 --mount type=bind,src=`pwd`/compose-resources/client-volume/,dst=/var/certs \
awudzinsb81c6812020-03-13 16:54:18 +010026 --volume `pwd`/certs/truststore.jks:/etc/onap/aaf/certservice/certs/truststore.jks \
27 --volume `pwd`/certs/certServiceClient-keystore.jks:/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks \
Remigiusz Janeczekf404a662020-03-18 13:21:35 +010028 onap/org.onap.aaf.certservice.aaf-certservice-client:latest
29
30stop-client:
31 @echo "##### Remove Cert Service Client #####"
32 @echo "Removing aafcert-client"
33 @docker rm aafcert-client > /dev/null 2> /dev/null || true
34 @echo "##### DONE #####"
35
36stop-backend:
37 @echo "##### Stop Cert Service #####"
38 docker-compose down
39 @echo "##### DONE #####"