CI: Add SonarCloud scan GHA workflow
[nonrtric/plt/ranpm.git] / docker-proj / README.md
1 ## License
2
3 Copyright (C) 2023 Nordix Foundation. All rights reserved.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8      http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 ## RANPM project in docker
17
18 A docker compose project showing pm file flow from simulated network elements to filtered pm data.
19
20 ## Run in docker-desktop - docker only
21
22 ### Clone the ranpm repo:
23
24 `git clone https://gerrit.nordix.org/local/oransc/ranpm`
25
26 ### Build Https server
27
28 `cd ranpm/https-server`
29
30 `./build.sh no-push`
31
32
33 ### Start demo
34
35 WARNING: The setup scripts below will prune all unused docker volumes!
36
37 INFO: Temporary files for some containers will be stored in subdirs under `/tmp`
38
39 `cd ranpm/docker-proj`
40
41 There are several ways to start and run the demo, with file or minio file storage, single or multi instances of data-file collector and kafka as well as a choice of sftp, ftpes or https.
42 Additional configuration can be made in the setup script.
43
44 It could be a good idea to clean any other running containers in docker to avoid port and container name clashes.
45
46 Command usage: `docker-setup.sh`
47
48
49 Example cmd: \
50 `./docker-setup.sh`
51
52 Let the script finish.
53
54 If the script fails, make sure to clean the setup before attempting a new setup.
55
56 `./docker-tear-down.sh`
57
58 In addition, a `docker system prune` might be needed now and then.
59
60 ### PM Influx Logger
61 Additionally you can install PM influx logger.
62
63 Example cmd: \
64 `./pmlog-setup.sh`
65
66 To remove run:
67 `./pmlog-tear-down.sh`
68
69 To update the filter edit and run:
70 `./update-pmlog.sh`
71
72 ### PM rApp
73 Additionally you can install PM rApp.
74
75 Build PM rApp
76
77 `cd ranpm/pm-rapp`
78
79 `./build.sh no-push`
80
81 Install PM rApp
82
83 `cd ranpm/docker-proj`
84
85 Example cmd: \
86 `./pmrapp-setup.sh`
87
88 To remove run:
89 `./pmrapp-tear-down.sh`
90
91 ### Tools for monitoring
92
93 Open browser to redpanda (kafka gui) - watch topics, messages etc\
94 browser: `<host ip>:8780`
95
96 Open brower to minio \
97 user: admin pwd: adminadmin\
98 browser: `<host ip>:9001`
99
100 Open brower to control-panel \
101 browser: `<host ip>:8088/ei-coordinator`
102
103 ### Push data - basic
104
105 File ready events can be pushed to the ves collector or pushed directly to the topic for file ready events (bypassing the ves collector).
106
107 Push to ves collector:
108
109 Usage: `push-to-ves-collector.sh <node-count> <num-of-events> <node-name-base> <file-extension> <num-servers>`
110
111 Parameters/
112 node-count - number of unique NEs\
113 num-of-events - number of events per NE\
114 node-name-base - NE name prefix\
115 file-extension - xml or xml.gz
116 num-servers - number of sftp/ftpes/https servers to simulate  NEs (10 is default)
117
118 Usage: `push-to-file-ready-topic.sh <node-count> <num-of-events> <node-name-base> <file-extension> <num-servers>`
119
120 Parameter: \
121 Same as `push-to-ves-collector.sh`
122
123 Once the events has been pushed the progress can be viewed in the monitoring tools described above.
124
125 If several sets of data shall be pushed, just change the parameter `<node-name-base>` to make the new files unique.
126
127
128 ### Clean up
129
130 Run the script to remove all docker containers.
131
132 `./docker-tear-down.sh`
133
134 To also cleanup files.
135
136 `cd pm-file-flow-demo/scripts`
137
138 `./clean-shared-volume.sh`
139