aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/test/resources/demo/Notes.txt
blob: 5cd981d04a2299dc8cabdd3299c77a5a6a354085 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Run DMaaP simulator using Docker
c/Users/${USER}/Github/simulator/distribution
${USER}@S031PC03 MINGW64 ~/Github/simulator/distribution (master)
$ docker run -p 3904:3904 --volume //c/Users/${USER}/Github/simulator/distribution:/opt/app/policy/simulators/etc/mounted:ro --name=dmaap-simulator nexus3.onap.org:10001/onap/policy-models-simulator:latest


Run DMaaP simulator using Maven
Check out policy models
Go to policy/models/models-sim/policy-models-simulators
mvn exec:java  -Dexec.mainClass=org.onap.policy.models.simulators.Main -Dexec.args="src/test/resources/simParameters.json"

Run CL from command line
Go to clamp/runtime-acm
mvn spring-boot:run -Dspring-boot.run.arguments="--topicServer=localhost --mariadb.host=localhost"

Run Participant from command line using Maven
mvn spring-boot:run -Dspring-boot.run.arguments="--server.port=8080
mvn spring-boot:run -Dspring-boot.run.arguments="--server.port=8081
mvn spring-boot:run -Dspring-boot.run.arguments="--server.port=8082

Run Participant from command line using Jar
java -jar -Dserver.port=8080 target/policy-clamp-participant-impl-simulator-6.1.2-SNAPSHOT.jar
java -jar -Dserver.port=8082 target/policy-clamp-participant-impl-policy-6.1.2-SNAPSHOT.jar
java -jar target/policy-clamp-participant-impl-kubernetes-6.1.2-SNAPSHOT.jar

Config of DB

Prompt > mysql
MariaDB [(none)]> create database acm;
MariaDB [(none)]> CREATE USER 'policy'@localhost IDENTIFIED BY 'P01icY';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON acm.* TO 'policy'@'localhost';\
MariaDB [(none)]> SHOW GRANTS for 'policy'@localhost;
+---------------------------------------------------------------------------------------------------------------+
| Grants for policy@localhost                                                                                   |
+---------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `policy`@`localhost` IDENTIFIED BY PASSWORD '*D0574A541C5DEDF11838FB41CA04E256FD5A04CC' |
| GRANT ALL PRIVILEGES ON `acm`.* TO `policy`@`localhost`                                               |
+---------------------------------------------------------------------------------------------------------------+
2 rows in set (0.000 sec)

//Generate the keystore
//clone policy/docker
cd docker/csit
./gen_truststore.sh
./gen_keystore.sh
//the keystore generated: /docker/csit/config/ks.jks

Run Participant from command line using Docker
docker run --add-host=message-router:<ip-router> -p 6969:6969 --mount type=bind,source=<path-keystore-file>,target=/opt/app/policy/clamp/etc/ssl/policy-keystore onap/policy-clamp-runtime-acm
docker run --add-host=message-router:<ip-router> -p 8083:8083 --mount type=bind,source=<path-keystore-file>,target=/opt/app/policy/clamp/etc/ssl/policy-keystore onap/policy-clamp-ac-k8s-ppnt
docker run --add-host=message-router:<ip-router> --mount type=bind,source=<path-keystore-file>,target=/opt/app/policy/clamp/etc/ssl/policy-keystore onap/policy-clamp-ac-http-ppnt
docker run --add-host=message-router:<ip-router> --mount type=bind,source=<path-keystore-file>,target=/opt/app/policy/clamp/etc/ssl/policy-keystore onap/policy-clamp-ac-pf-ppnt

Note:
/policy-clamp-tarball/src/main/resources/etc/ssl/policy-truststore is the truststore for DMaap of oom project
Participant-k8 swagger: https://localhost:8083/onap/k8sparticipant/swagger-ui/
CL-Runtime swagger: https://localhost:6969/onap/acm/swagger-ui/


Run Policy API:
mvn exec:java -Dexec.mainClass=org.onap.policy.api.main.startstop.Main -Dexec.args="-c common/src/test/resources/demo/config/RuntimeConfig.json"