1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
10 Policy Clamp Automation Composition
11 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 Both the Performance and the Stability tests were executed by performing requests
14 against acm components installed as docker images in local environment.
20 The docker containers can be deployed via Policy CSIT script.
21 Clone the Policy/docker repo to the local vm
25 git clone "https://gerrit.onap.org/r/policy/docker"
27 Set the following environment variables on the system before deploying the containers.
31 export CONTAINER_LOCATION=nexus3.onap.org:10001/
34 Invoke the following script from the ~/docker/csit folder.
40 This script installs the docker containers of ACM and Policy components required for running the tests.
46 Apache jmeter tool is installed either on the same virtual machine or on a different virtual machine.
50 # Install required packages
51 sudo apt install -y wget unzip
56 wget https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.5.zip # check if valid version
57 unzip -q apache-jmeter-5.5.zip
58 rm apache-jmeter-5.5.zip
63 Ensure the following components are up and running before executing the test.
65 - acm runtime component docker image is started and running.
66 - Participant docker images policy-clamp-cl-pf-ppnt, policy-clamp-cl-http-ppnt, policy-clamp-cl-k8s-ppnt are started and running.
67 - Dmaap simulator for communication between components.
68 - mariadb docker container for policy and clampacm database.
69 - policy-api for communication between policy participant and policy-framework
70 - Both tests were run via jMeter, which was installed on a separate VM.
72 Stability Test of acm components
73 ++++++++++++++++++++++++++++++++
77 The 72 hours stability test ran the following steps sequentially in a single threaded loop.
79 - **Create Policy defaultDomain** - creates an operational policy using policy/api component
80 - **Delete Policy sampleDomain** - deletes the operational policy sampleDomain using policy/api component
81 - **Commission AC definition** - commissions the acm definition in runtime
82 - **Instantiate acm** - Instantiate the acm towards participants
83 - **Check acm state** - check the current state of acm
84 - **Change State to PASSIVE** - change the state of the acm to PASSIVE
85 - **Check acm state** - check the current state of acm
86 - **Change State to UNINITIALISED** - change the state of the ACM to UNINITIALISED
87 - **Check acm state** - check the current state of acm
88 - **Delete instantiated acm** - delete the instantiated acm from all participants
89 - **Delete ACM Definition** - delete the acm definition on runtime
91 The following parameters can be configured on the JMX file for the test.
93 - **HTTP Authorization Manager** - used to store user/password authentication details.
94 - **HTTP Header Manager** - used to store headers which will be used for making HTTP requests.
95 - **User Defined Variables** - used to store following user defined parameters.
97 ============================= ========================================================================
98 **Name** **Description**
99 ============================= ========================================================================
100 RUNTIME_HOST IP Address or host name of acm runtime component
101 RUNTIME_PORT Port number of acm runtime components for making REST API calls
102 POLICY_PARTICIPANT_HOST IP Address or host name of policy participant
103 POLICY_PARTICIPANT_HOST_PORT Port number of policy participant
104 ============================= ========================================================================
106 Download the ACM stability.jmx and performance.jmx files from the Policy-Clamp repo.
112 ~/clamp/testsuites/stability/src/main/resources/testplans/stability.jmx
114 The test was run in the background via "nohup", to prevent it from being interrupted:
118 nohup ./jmeter/apache-jmeter-5.5/bin/jmeter -n -t stability.jmx -l testresults.jtl
125 Stability test plan was triggered for 72 hours.
129 .. container:: paragraph
131 The assertions of state changes are not completely taken care of, as the stability is ran with acm components
132 alone, and not including complete policy framework deployment, which makes it difficult for actual state changes from
133 PASSIVE to RUNNING etc to happen.
137 ======================= ================= ================== ==================================
138 **Total # of requests** **Success %** **Error %** **Average time taken per request**
139 ======================= ================= ================== ==================================
140 97916 100.00 % 0.00 % 246 ms
141 ======================= ================= ================== ==================================
143 **ACM component Setup**
145 ================ ============================================================ =========================================== =========================
146 **CONTAINER ID** **IMAGE** **PORT** **NAME**
147 ================ ============================================================ =========================================== =========================
148 a9cb0cd103cf nexus3.onap.org:10001/onap/policy-clamp-runtime-acm:latest 6969/tcp policy-clamp-runtime-acm
149 886e572b8438 nexus3.onap.org:10001/onap/policy-clamp-ac-pf-ppnt:latest 6969/tcp policy-clamp-ac-pf-ppnt
150 035707b1b95f nexus3.onap.org:10001/onap/policy-api:latest 6969/tcp policy-api
151 d34204f95ff3 nexus3.onap.org:10001/onap/policy-clamp-ac-http-ppnt:latest 6969/tcp policy-clamp-ac-http-ppnt
152 4470e608c9a8 nexus3.onap.org:10001/onap/policy-clamp-ac-k8s-ppnt:latest 6969/tcp policy-clamp-ac-k8s-ppnt
153 62229d46b79c nexus3.onap.org:10001/onap/policy-models-simulator:latest 3905/tcp, 6666/tcp, 6668-6670/tcp, 6680/tcp simulator
154 efaf0ca5e1f0 nexus3.onap.org:10001/mariadb:10.5.8 3306/tcp mariadb
155 e84cf17db2a4 nexus3.onap.org:10001/onap/policy-pap:latest 6969/tcp policy-pap
156 0a16eecd13c9 nexus3.onap.org:10001/onap/policy-apex-pdp:latest 6969/tcp policy-apex-pdp
157 ================ ============================================================ =========================================== =========================
161 .. container:: paragraph
163 There were no failures during the 72 hours test.
165 **JMeter Screenshot**
167 .. image:: clamp-s3p-results/acm_stability_jmeter.png
169 **JMeter Screenshot**
171 .. image:: clamp-s3p-results/acm_stability_table.png
173 **Memory and CPU usage**
175 The memory and CPU usage can be monitored by running "docker stats" command.
177 Memory and CPU usage after test execution:
179 .. image:: clamp-s3p-results/Stability_after_stats.png
182 Performance Test of acm components
183 ++++++++++++++++++++++++++++++++++
188 Performance test of acm components has the goal of testing the min/avg/max processing time and rest call throughput for all the requests with multiple requests at the same time.
193 The performance test is performed on a similar setup as Stability test. The JMeter VM will be sending a large number of REST requests to the runtime component and collecting the statistics.
199 Performance test plan is the same as the stability test plan above except for the few differences listed below.
201 - Increase the number of threads up to 5 (simulating 5 users' behaviours at the same time).
202 - Reduce the test time to 2 hours.
211 ~/clamp/testsuites/performance/src/main/resources/testplans/performance.jmx
213 Running/Triggering the performance test will be the same as the stability test. That is, launch JMeter pointing to corresponding *.jmx* test plan. The *RUNTIME_HOST*, *RUNTIME_PORT*, *POLICY_PARTICIPANT_HOST*, *POLICY_PARTICIPANT_HOST_PORT* are already set up in *.jmx*
217 nohup ./jmeter/apache-jmeter-5.5/bin/jmeter -n -t performance.jmx -l testresults.jtl
219 Once the test execution is completed, execute the below script to get the statistics:
223 $ cd ./clamp/testsuites/performance/src/main/resources/testplans
224 $ ./results.sh resultTree.log
229 Test results are shown as below.
233 ======================= ================= ================== ==================================
234 **Total # of requests** **Success %** **Error %** **Average time taken per request**
235 ======================= ================= ================== ==================================
236 13591 100 % 0.00 % 249 ms
237 ======================= ================= ================== ==================================
239 **ACM component Setup**
241 ================ ============================================================ =========================================== =========================
242 **CONTAINER ID** **IMAGE** **PORT** **NAME**
243 ================ ============================================================ =========================================== =========================
244 a9cb0cd103cf nexus3.onap.org:10001/onap/policy-clamp-runtime-acm:latest 6969/tcp policy-clamp-runtime-acm
245 886e572b8438 nexus3.onap.org:10001/onap/policy-clamp-ac-pf-ppnt:latest 6969/tcp policy-clamp-ac-pf-ppnt
246 035707b1b95f nexus3.onap.org:10001/onap/policy-api:latest 6969/tcp policy-api
247 d34204f95ff3 nexus3.onap.org:10001/onap/policy-clamp-ac-http-ppnt:latest 6969/tcp policy-clamp-ac-http-ppnt
248 4470e608c9a8 nexus3.onap.org:10001/onap/policy-clamp-ac-k8s-ppnt:latest 6969/tcp policy-clamp-ac-k8s-ppnt
249 62229d46b79c nexus3.onap.org:10001/onap/policy-models-simulator:latest 3905/tcp, 6666/tcp, 6668-6670/tcp, 6680/tcp simulator
250 efaf0ca5e1f0 nexus3.onap.org:10001/mariadb:10.5.8 3306/tcp mariadb
251 e84cf17db2a4 nexus3.onap.org:10001/onap/policy-pap:latest 6969/tcp policy-pap
252 0a16eecd13c9 nexus3.onap.org:10001/onap/policy-apex-pdp:latest 6969/tcp policy-apex-pdp
253 ================ ============================================================ =========================================== =========================
255 **JMeter Screenshot**
257 .. image:: clamp-s3p-results/acm_performance_jmeter.png