7748b29bdcd9972f5edd6baed536edea02439c0a
[oom/platform/cert-service.git] / certServiceClient / README.md
1 # Cert service client
2
3 ### Project building
4 ```
5 mvn clean package
6 ```
7     
8     
9 ### Install the package into the local repository
10 ```
11 mvn clean install
12 ```     
13     
14 ### Building Docker image and  install the package into the local repository
15 ```
16 mvn clean install -P docker
17 ```   
18
19 ### Nexus container image
20 ```
21 nexus3.onap.org:10001/onap/org.onap.aaf.certservice.aaf-certservice-client:latest
22 ```
23
24 ### Running local client application as standalone docker container
25 ```
26 AAFCERT_CLIENT_IMAGE=onap/org.onap.aaf.certservice.aaf-certservice-client
27 DOCKER_ENV_FILE= <path to envfile>
28 NETWORK_CERT_SERVICE= <docker network of cert service>
29  
30 docker run --name aaf-certservice-client --env-file $DOCKER_ENV_FILE --network $NETWORK_CERT_SERVICE $AAFCERT_CLIENT_IMAGE
31 ```
32 Sample Environment file:
33 ```aidl
34 #Client envs
35 REQUEST_TIMEOUT=1000
36 OUTPUT_PATH=/var/log
37 CA_NAME=RA
38 #Csr config envs
39 COMMON_NAME=onap.org
40 ORGANIZATION=Linux-Foundation
41 ORGANIZATION_UNIT=ONAP
42 LOCATION=San-Francisco
43 STATE=California
44 COUNTRY=US
45 SANS=example.com:example2.com
46 ```
47
48 ### Logs locally
49
50 path: 
51 ```
52 var/log/onap/aaf/certservice-client/certservice-client.log
53 ```    
54 ### Logs in Docker container
55 ```
56 docker logs aaf-certservice-client
57 ```
58 ###Exit codes
59 ```
60 0       Success
61 1       Invalid client configuration
62 2       Invalid CSR configuration 
63 3       Fail in key pair generation
64 4       Fail in  CSR generation
65 5       CertService HTTP unsuccessful response
66 6       Internal HTTP Client connection problem
67 7       Fail in PKCS12 conversion
68 8       Fail in Private Key to PEM Encoding