Added docker-compose ranpm
[nonrtric/plt/ranpm.git] / docker-proj / README.md
1 ## RANPM project in docker
2
3 A docker compose project showing pm file flow from simulated network elements to filtered pm data.
4
5 ## Run in docker-desktop - docker only
6
7 ### Clone the ranpm repo:
8
9 `git clone https://gerrit.nordix.org/local/oransc/ranpm`
10
11 ### Build Https server
12
13 `cd ranpm/https-server`
14
15 `./build.sh no-push`
16
17
18 ### Start demo
19
20 WARNING: The setup scripts below will prune all unused docker volumes!
21
22 INFO: Temporary files for some containers will be stored in subdirs under `/tmp`
23
24 `cd ranpm/docker-proj`
25
26 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.
27 Additional configuration can be made in the setup script.
28
29 It could be a good idea to clean any other running containers in docker to avoid port and container name clashes.
30
31 Command usage: `docker-setup.sh`
32
33
34 Example cmd: \
35 `./docker-setup.sh`
36
37 Let the script finish.
38
39 If the script fails, make sure to clean the setup before attempting a new setup.
40
41 `./docker-tear-down.sh`
42
43 In addition, a `docker system prune` might be needed now and then.
44
45 ### Tools for monitoring
46
47 Open browser to redpanda (kafka gui) - watch topics, messages etc\
48 browser: `localhost:8780`
49
50 Open brower to minio - available only if minio is given on the cmd line when starting the demo\
51 user: admin pwd: adminadmin\
52 browser: `localhost:9001`
53
54
55 ### Push data - basic
56
57 File ready events can be pushed to the ves collector or pushed directly to the topic for file ready events (bypassing the ves collector).
58
59 Push to ves collector:
60
61 Usage: `push-to-ves-collector.sh <node-count> <num-of-events> <node-name-base> <file-extension> <num-servers>`
62
63 Parameters/
64 node-count - number of unique NEs\
65 num-of-events - number of events per NE\
66 node-name-base - NE name prefix\
67 file-extension - xml or xml.gz
68 num-servers - number of sftp/ftpes/https servers to simulate  NEs (10 is default)
69
70 Usage: `push-to-file-ready-topic.sh <node-count> <num-of-events> <node-name-base> <file-extension> <num-servers>`
71
72 Parameter: \
73 Same as `push-to-ves-collector.sh`
74
75 Once the events has been pushed the progress can be viewed in the monitoring tools described above.
76
77 If several sets of data shall be pushed, just change the parameter `<node-name-base>` to make the new files unique.
78
79
80 ### Clean up
81
82 Run the script to remove all docker containers.
83
84 `./docker-tear-down.sh`
85
86 To also cleanup files.
87
88 `cd pm-file-flow-demo/scripts`
89
90 `./clean-shared-volume.sh`
91