e1c5d475daa59bb47abcafaae6e8398f66f96550
[transportpce.git] / lighty / README.md
1 # Lighty-TransportPCE Controller
2
3 This project starts [TransportPCE](https://git.opendaylight.org/gerrit/#/admin/projects/transportpce) without karaf framework.
4
5 ## Build & Run
6 * Make sure you have JDK8 or later installed
7 * Make sure you have [maven 3.5.0](https://maven.apache.org/download.cgi) or later installed.
8 * Make sure you have proper [settings.xml](https://github.com/opendaylight/odlparent/blob/master/settings.xml)  in your ``~/.m2`` directory.
9
10 #### Before compiling Lighty-TransportPCE
11 Make sure upstream projects are compiled locally and stored in local ``~/.m2/repository``:
12 1. compile __transportpce/master__
13 ```
14 git clone https://git.opendaylight.org/gerrit/transportpce && (cd transportpce && curl -kLo `git rev-parse --git-dir`/hooks/commit-msg https://git.opendaylight.org/gerrit/tools/hooks/commit-msg; chmod +x `git rev-parse --git-dir`/hooks/commit-msg)
15 cd transportpce
16 ```
17 Before compilation, make sure that deviations are not present in models:
18 ```
19 transportpce/ordmodels/network/src/main/yang/org-openroadm-otn-network-topology@2018-11-30.yang
20 transportpce/ordmodels/network/src/main/yang/org-openroadm-network-topology@2018-11-30.yang
21 transportpce/ordmodels/network/src/main/yang/org-openroadm-network@2018-11-30.yang
22 ```
23 After deviations are removed from models, compile the project.
24 ```
25 mvn clean install -DskipTests
26 ```
27 2. compile __lighty-core/10.0.x__
28 ```
29 git clone https://github.com/PantheonTechnologies/lighty-core.git
30 cd lighty-core
31 git checkout 10.0.x
32 mvn clean install -DskipTests
33 ```
34 #### Compile Lighty-TransportPCE
35 * Project is build using maven command:
36 ```
37 cd ../lighty
38 mvn clean install
39 ```
40 * After project build is done, use binary package to run the TransportPCE controller.
41 ```
42 cd  target
43 unzip lighty-transportpce-10.0.1-SNAPSHOT-bin.zip
44 cd lighty-transportpce-10.0.1-SNAPSHOT
45 ./start-controller.sh
46 ```
47
48 ## TransportPCE lighty.io - karaf comparison
49
50 ### Application Boot test
51 This test compares TransportPCE application on lighty.io and karaf.
52 After TransportPCE is started, performance is measured using [visualvm](https://visualvm.github.io/) tool.
53
54 | Property Name                     | ODL/Karaf *    | lighty.io ** |
55 |-----------------------------------|----------------|--------------|
56 | Build size                        | 225M           | 64M          |
57 | Startup Time                      | ~15s           | ~6s          |
58 | Shutdown Time                     | ~5s            | ~100ms       |
59 | Process memory allocated (RSS)*** | 1236 MB        | 353 MB       |
60 | HEAP memory (used/allocated)      | 135 / 1008 MB  | 58 / 128 MB  |
61 | Metaspace (used/allocated)        | 115 / 132 MB   | 62 /  65 MB  |
62 | Threads (live/daemon)             | 111 / 48       | 70 /  11     |
63 | Classes loaded                    | 22027          | 12019        |
64 | No. of jars                       | 680            | 244          |
65
66 ### test_end2end_lighty.py
67 This test compares TransportPCE application on lighty.io and karaf while running __test_end2end_lighty.py__ (4 connected netconf devices).
68
69 | Property Name                     | ODL/Karaf *    | lighty.io ** |
70 |-----------------------------------|----------------|--------------|
71 | Build size                        | 225M           | 64M          |
72 | Startup Time                      | ~15s           | ~6s          |
73 | Shutdown Time                     | ~5s            | ~100ms       |
74 | Process memory allocated (RSS)*** | 1185 MB        | 440 MB       |
75 | HEAP memory (used/allocated)      | 158 / 960 MB   | 85 / 128 MB  |
76 | Metaspace (used/allocated)        | 128 / 146 MB   | 83 /  87 MB  |
77 | Threads (live/daemon)             | 148 / 60       | 129 / 26     |
78 | Classes loaded                    | 24326          | 16155        |
79 | No. of jars                       | 680            | 244          |
80
81 `* JVM parameters: -Xms128M -Xmx2048m ...`
82 `** JVM parameters: -Xms128m -Xmx128m -XX:MaxMetaspaceSize=128m`
83 `*** sudo ps -o pid,rss,user,command ax | grep java | grep transportpce`
84
85 ### Integration Test results
86 | Test Name                             | Failed | All | Comment                    |
87 |---------------------------------------|--------|-----|----------------------------|
88 | test_portmapping.py                   | 0      |  18 |                            |
89 | test_topoPortMapping.py               | 1      |   6 | (same results with karaf)  |
90 | test_topology.py                      | 0      |  33 |                            |
91 | test_renderer_service_path_nominal.py | 0      |  24 |                            |
92 | test_pce.py                           | 0      |  22 |                            |
93 | test_olm.py                           | 1      |  40 | (same results with karaf)  |
94 | test_end2end_lighty.py                | 18     |  52 | (same as karaf, need check)|
95
96 `karaf: executable = "../karaf/target/assembly/bin/karaf"`
97 `lighty.io executable = "../lighty/target/lighty-transportpce-10.0.1-SNAPSHOT/start-controller.sh": `
98
99 * __Total Success: 175__
100 * __Total Failed: 20__
101
102 ### Postman collection
103 Check this [postman collection](docs/TransportPCE.postman_collection.json) for RESTCONF examples.