9a73ef7d3a448988275013706bb2ab5231f6da94
[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
92 ### Tools for monitoring
93
94 Open browser to redpanda (kafka gui) - watch topics, messages etc\
95 browser: `localhost:8780`
96
97 Open brower to minio - available only if minio is given on the cmd line when starting the demo\
98 user: admin pwd: adminadmin\
99 browser: `localhost:9001`
100
101
102 ### Push data - basic
103
104 File ready events can be pushed to the ves collector or pushed directly to the topic for file ready events (bypassing the ves collector).
105
106 Push to ves collector:
107
108 Usage: `push-to-ves-collector.sh <node-count> <num-of-events> <node-name-base> <file-extension> <num-servers>`
109
110 Parameters/
111 node-count - number of unique NEs\
112 num-of-events - number of events per NE\
113 node-name-base - NE name prefix\
114 file-extension - xml or xml.gz
115 num-servers - number of sftp/ftpes/https servers to simulate  NEs (10 is default)
116
117 Usage: `push-to-file-ready-topic.sh <node-count> <num-of-events> <node-name-base> <file-extension> <num-servers>`
118
119 Parameter: \
120 Same as `push-to-ves-collector.sh`
121
122 Once the events has been pushed the progress can be viewed in the monitoring tools described above.
123
124 If several sets of data shall be pushed, just change the parameter `<node-name-base>` to make the new files unique.
125
126
127 ### Clean up
128
129 Run the script to remove all docker containers.
130
131 `./docker-tear-down.sh`
132
133 To also cleanup files.
134
135 `cd pm-file-flow-demo/scripts`
136
137 `./clean-shared-volume.sh`
138