Generate openAPI 3.0 specification.
[oom/platform/cert-service.git] / certService / README.md
1 # Cert service
2
3 ### For developers
4     * AAF Cert Service is a Spring Boot application
5     * Code style
6         Use Google code formatter in your IDE.
7         For IntelliJ use [https://plugins.jetbrains.com/plugin/8527-google-java-format]
8         For other IDEs use []https://github.com/google/google-java-format]
9
10 ### Running Locally
11     ```
12      mvn spring-boot:run
13
14     ```
15
16 ### Project building
17     ```
18      mvn clean package
19
20     ```
21     
22 ### Building Docker image manually
23     ```
24     docker build -t cert-service .
25
26     ```
27     
28 ### Install the package into the local repository
29     ```
30     mvn clean install
31    
32     ```     
33     
34 ### Building Docker image and  install the package into the local repository
35     ```
36     mvn clean install -P docker
37    
38     ```   
39
40 ### Running Docker container
41     ```
42     docker run -p 8080:8080 --name cert-service cert-service
43
44     ```
45
46 ### Health Check
47  Browser:
48  
49     ```
50      http://<localhost>:8080/actuator/health
51      
52     ```
53      
54  Curl:   
55  
56     ```
57      curl localhost:8080/actuator/health 
58      
59     ```   
60  Should return {"status":"UP"}
61
62 ### Running CSITs
63 Pull csit repository
64     
65     ```
66      https://gerrit.onap.org/r/admin/repos/integration/csit
67     
68     ```
69 Go to created directory and run
70     
71     ```
72      sudo ./run-csit.sh plans/aaf/cert-service
73     
74     ```
75 ### Logs locally
76
77 path: 
78
79     ```
80      var/log/onap/aaf/certservice/
81     ```    
82 ### Logs in Docker container
83     ```
84      docker exec -it cert-service bash
85     ```
86
87 path:
88
89     ```
90       cd /var/log/onap/aaf/certservice
91     ```
92 You should see:    
93 audit.log  error.log  trace.log
94
95 ### Sonar results
96     ```     
97       https://sonarcloud.io/dashboard?id=onap_aaf-certservice
98     ```
99
100 ### RestAPI
101 API is described by Swagger ( OpenAPI 3.0 ) on endpoint /docs 
102 ( endpoint is defined in properties as springdoc.swagger-ui.path )
103   
104     ```
105     http://localchost:8080/docs
106     
107     ```
108
109 ### Sonar results
110     ```     
111       https://sonarcloud.io/dashboard?id=onap_aaf-certservice
112     ```