Adam Wudzinski | bba2a7e | 2020-04-24 15:16:23 +0200 | [diff] [blame^] | 1 | all: build start-backend run-client stop-backend |
Remigiusz Janeczek | f404a66 | 2020-03-18 13:21:35 +0100 | [diff] [blame] | 2 | start-with-client: start-backend run-client |
| 3 | .PHONY: build |
| 4 | |
| 5 | build: |
| 6 | @echo "##### Build Cert Service images locally #####" |
| 7 | mvn clean install -P docker |
| 8 | @echo "##### DONE #####" |
| 9 | |
| 10 | start-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 | |
| 17 | run-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 \ |
awudzins | 1740a80 | 2020-04-09 16:48:53 +0200 | [diff] [blame] | 22 | --rm \ |
Remigiusz Janeczek | f404a66 | 2020-03-18 13:21:35 +0100 | [diff] [blame] | 23 | --name aafcert-client \ |
| 24 | --env-file ./compose-resources/client-configuration.env \ |
| 25 | --network certservice_certservice \ |
| 26 | --mount type=bind,src=`pwd`/compose-resources/client-volume/,dst=/var/certs \ |
awudzins | b81c681 | 2020-03-13 16:54:18 +0100 | [diff] [blame] | 27 | --volume `pwd`/certs/truststore.jks:/etc/onap/aaf/certservice/certs/truststore.jks \ |
| 28 | --volume `pwd`/certs/certServiceClient-keystore.jks:/etc/onap/aaf/certservice/certs/certServiceClient-keystore.jks \ |
Remigiusz Janeczek | f404a66 | 2020-03-18 13:21:35 +0100 | [diff] [blame] | 29 | onap/org.onap.aaf.certservice.aaf-certservice-client:latest |
| 30 | |
Remigiusz Janeczek | f404a66 | 2020-03-18 13:21:35 +0100 | [diff] [blame] | 31 | stop-backend: |
| 32 | @echo "##### Stop Cert Service #####" |
| 33 | docker-compose down |
| 34 | @echo "##### DONE #####" |