aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2020-10-27 16:23:47 +0000
committerwaynedunican <wayne.dunican@est.tech>2020-10-29 13:22:09 +0000
commit9a10ba37bb1af18cc189951b4e465f54b482ac79 (patch)
tree4380f6b7bde5aba372129e938f71ee3acc9478e8
parentab948fc56feece43992f4ec20ce190a8cc5f7fd5 (diff)
S3P Testing Documentation for Apex-PDP
Documentation for stabilty testing for Apex-PDP Issue-ID: POLICY-2831 Change-Id: Ib5fe94618832c4e873ec0bf920a4f0c8d8b55226 Signed-off-by: waynedunican <wayne.dunican@est.tech>
-rw-r--r--docs/development/devtools/apex-s3p.rst284
-rw-r--r--docs/development/devtools/images/apex_perf_jm_1.PNGbin0 -> 202811 bytes
-rw-r--r--docs/development/devtools/images/apex_perf_jm_2.PNGbin0 -> 286406 bytes
-rw-r--r--docs/development/devtools/images/apex_s3p_jm-1.pngbin0 -> 78282 bytes
-rw-r--r--docs/development/devtools/images/apex_s3p_jm-2.pngbin0 -> 183969 bytes
-rw-r--r--docs/development/devtools/zip/frankfurt/apex_s3p_result.tar.gzbin686376 -> 4238336 bytes
6 files changed, 56 insertions, 228 deletions
diff --git a/docs/development/devtools/apex-s3p.rst b/docs/development/devtools/apex-s3p.rst
index 6143e165..6c59f655 100644
--- a/docs/development/devtools/apex-s3p.rst
+++ b/docs/development/devtools/apex-s3p.rst
@@ -27,153 +27,6 @@ Setup details
The stability test is performed on VM's running in OpenStack cloud environment. There are 2 seperate VM's, one for running apex pdp & other one for running JMeter to simulate steady flow of transactions.
-**OpenStack environment details**
-
-Version: Mitaka
-
-**apex-pdp VM details**
-
-OS:Ubuntu 18.04 LTS
-
-CPU: 4 core
-
-RAM: 4 GB
-
-HardDisk: 40 GB
-
-Docker Version: 19.03.8, build afacb8b7f0
-
-Java: openjdk version "11.0.7"
-
-**JMeter VM details**
-
-OS: Ubuntu 18.04 LTS
-
-CPU: 4 core
-
-RAM: 4 GB
-
-HardDisk: 40 GB
-
-Java: openjdk version "11.0.7"
-
-JMeter: 5.2.1
-
-Install JMeter in virtual machine
----------------------------------
-
-Make the etc/hosts entries
-
-.. code-block:: bash
-
- echo $(hostname -I | cut -d\ -f1) $(hostname) | sudo tee -a /etc/hosts
-
-Make the DNS entries
-
-.. code-block:: bash
-
- echo "nameserver <PrimaryDNSIPIP>" >> sudo /etc/resolvconf/resolv.conf.d/head
-
- echo "nameserver <SecondaryDNSIP>" >> sudo /etc/resolvconf/resolv.conf.d/head
-
- resolvconf -u
-
-Update the ubuntu software installer
-
-.. code-block:: bash
-
- apt-get update
-
-Check & Install Java
-
-.. code-block:: bash
-
- apt-get install -y openjdk-11-jdk
-
- java -version
-
-Download & install JMeter
-
-.. code-block:: bash
-
- mkdir jMeter
-
-
- cd jMeter
-
-
- wget http://mirrors.whoishostingthis.com/apache//jmeter/binaries/apache-jmeter-5.2.1.zip
-
-
- unzip apache-jmeter-5.2.1.zip
-
-Install apex-pdp in virtual machine
------------------------------------
-
-We will be running apex-pdp as docker container. So we need to first install docker and then create the container hosting apex-pdp by pulling the image from ONAP repository.
-
-**Docker Installation**
-
-1. Make the etc/hosts entries
-
-.. code-block:: bash
-
- echo $(hostname -I | cut -d\ -f1) $(hostname) | sudo tee -a /etc/hosts
-
-2. Make the DNS entries
-
-.. code-block:: bash
-
- echo "nameserver <PrimaryDNSIPIP>" >> sudo /etc/resolvconf/resolv.conf.d/head
- echo "nameserver <SecondaryDNSIP>" >> sudo /etc/resolvconf/resolv.conf.d/head
- resolvconf -u
-
-3. Update the ubuntu software installer
-
-.. code-block:: bash
-
- apt-get update
-
-4. Check and Install Java
-
-.. code-block:: bash
-
- apt-get install -y openjdk-11-jdk
- java -version
-
-Ensure that the Java version that is executing is OpenJDK version 8
-
-5. Check and install docker
-
-.. code-block:: bash
-
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-cache policy docker-ce
- sudo apt-get install -y docker-ce
- sudo systemctl enable docker
- sudo systemctl start docker
- sudo usermod -aG docker <your user id>
-
-6. Logout and re-login to ensure the ``usermod`` command takes effective
-
-7. Check the status of the Docker service and ensure it is running correctly
-
-.. code-block:: bash
-
- docker ps
-
-**Install apex-pdp**
-
-Run the below command to create the container hosting apex-pdp by pulling the image from ONAP repository.
-
-.. code-block:: bash
-
- docker run -d --name apex -p 12561:12561 -p 23324:23324 -p 9911:9911 nexus3.onap.org:10001/onap/policy-apex-pdp:2.3.1 /bin/bash -c "/opt/app/policy/apex-pdp/bin/apexApps.sh jmx-test -c /opt/app/policy/apex-pdp/examples/config/SampleDomain/RESTServerJsonEvent.json"
- docker ps
-
-Note: If you observe that requests from JMeter client is failing due to timeout, then modify the "RESTServerJsonEvent.json" mentioned in the above command and increase the "synchronousTimeout" property as per needed.
Install & Configure VisualVM
----------------------------
@@ -211,7 +64,7 @@ Sample Screenshot of visualVM
Test Plan
---------
-The 72 hours stability test will run the following steps in 20 threaded loop.
+The 72 hours stability test will run the following steps in 5 threaded loop.
- **Send Input Event** - sends an input message to rest interface of apex-pdp.
- **Assert Response Code** - assert the response code coming from apex-pdp.
@@ -227,7 +80,7 @@ The following steps can be used to configure the parameters of test plan.
**Name** **Description** **Default Value**
================== ============================================================================ ============================
wait Wait time after each request (in milliseconds) 500
-threads Number of threads to run test cases in parallel. 20
+threads Number of threads to run test cases in parallel. 5
threadsTimeOutInMs Synchronization timer for threads running in parallel (in milliseconds). 5000
================== ============================================================================ ============================
@@ -249,27 +102,27 @@ Stability Test Result
**Summary**
-Stability test plan was triggered for 72 hours injecting input events to apex-pdp from 20 client threads running in JMeter.
+Stability test plan was triggered for 72 hours injecting input events to apex-pdp from 5 client threads.
-After the test stop, we can generate a HTML test report via command
+Once the test has complete - we can generate a HTML test report via the following command
.. code-block:: bash
~/jMeter/apache-jmeter-5.2.1/bin/jmeter -g stability.log -o ./result/
-============================================== =================================================== ================================ ============= ============
-**Number of Client Threads running in JMeter** **Number of Server Threads running in Apex engine** **Total number of input events** **Success %** **Error %**
-============================================== =================================================== ================================ ============= ============
-20 4 8594220 100% 0%
-============================================== =================================================== ================================ ============= ============
+============================================== ================================ ============= ============ ============================
+**Number of Client Threads running in JMeter** **Total number of input events** **Success %** **Error %** **Average Time per Request**
+============================================== ================================ ============= ============ ============================
+5 8594220 100% 0% 5518.73
+============================================== ================================ ============= ============ ============================
.. image:: images/stability-jmeter.PNG
:download:`result.zip <zip/frankfurt/apex_s3p_result.tar.gz>`
-Frankfurt release
-^^^^^^^^^^^^^^^^^^
+Stability Test of Apex PDP
+^^^^^^^^^^^^^^^^^^^^^^^^^^
The 72 hour Stability Test for apex-pdp has the goal of introducing a steady flow of transactions using jMeter.
@@ -277,8 +130,8 @@ The input event will be submitted through the rest interface of DMaaP , which th
This test will be performed in an OOM deployment setup. The test will be performed in a multi-threaded environment where 5 threads running in JMeter will keep sending events for the duration of 72 hours.
-Test Plan Frankfurt release
----------------------------
+Test Plan
+---------
The 72 hours stability test will run the following steps in a 5 threaded loop.
@@ -302,6 +155,10 @@ The following steps can be used to configure the parameters of the test plan.
wait Wait time after each request (in milliseconds) 120000
threads Number of threads to run test cases in parallel. 5
threadsTimeOutInMs Synchronization timer for threads running in parallel (in milliseconds). 150000
+PAP_PORT Port number of PAP for making REST API calls
+API_PORT Port number of API for making REST API calls
+APEX_PORT Port number of APEX for making REST API calls
+DMAAP_PORT Port number of DMAAP for making REST API calls
================== ============================================================================ ============================
@@ -309,114 +166,85 @@ Download and update the jmx file presented in the apex-pdp git repository - `jmx
- HTTPSampler.domain - The ip address of the VM in which the apex container is running
- HTTPSampler.port - The listening port, here is 23324
-- ThreadGroup.druation - Set the duration to 72 hours (in seconds)
+- ThreadGroup.duration - Set the duration to 72 hours (in seconds)
Use the CLI mode to start the test
.. code-block:: bash
- ./jmeter.sh -n -t ~/apexPdpStabilityTestPlan.jmx -Jusers=1 -l ~/stability.log
+ nohup ./jmeter.sh -n -t ~/apexPdpStabilityTestPlan.jmx -Jusers=1 -l ~/stability.log
+
+Stability Test Results
+----------------------
-Stability Test Results Frankfurt release
------------------------------------------
+The stability test plan was triggered for 72 hours, injecting input events to apex-pdp pod from 5 client threads running in JMeter.
-The stability test plan was triggered for 72 hours, injecting input events to apex-pdp from 5 client threads running in JMeter.
+The stability tests were executed as part of a full ONAP OOM deployment in Nordix lab.
-After the test stops, we can generate an HTML test report via the command:
+Once the tests complete, we can generate an HTML test report via the command:
.. code-block:: bash
~/jMeter/apache-jmeter-5.2.1/bin/jmeter -g stability.log -o ./result/
-============================================== =================================================== ================================ ============= ============
-**Number of Client Threads running in JMeter** **Number of Server Threads running in Apex engine** **Total number of input events** **Success %** **Error %**
-============================================== =================================================== ================================ ============= ============
-5 4 26766 100% 0%
-============================================== =================================================== ================================ ============= ============
-
-**VisualVM Screenshot**
+============================================== ================================ ============= ============ ============================
+**Number of Client Threads running in JMeter** **Total number of input events** **Success %** **Error %** **Average Time per Request**
+============================================== ================================ ============= ============ ============================
+5 8594220 100% 0% 5518.73
+============================================== ================================ ============= ============ ============================
-.. image:: images/frankfurt/apex_s3p_vm-1.png
-.. image:: images/frankfurt/apex_s3p_vm-2.png
**JMeter Screenshot**
-.. image:: images/frankfurt/apex_s3p_jm-1.png
-.. image:: images/frankfurt/apex_s3p_jm-2.png
+.. image:: images/apex_s3p_jm-1.png
+.. image:: images/apex_s3p_jm-2.png
:download:`result.zip <zip/frankfurt/apex_s3p_result.tar.gz>`
Setting up Performance Tests in APEX
++++++++++++++++++++++++++++++++++++
-The apex-pdp has built in support for performance testing. A special performance testing REST server is available in the code base for performance testing.
-It is in the module `performance-benchmark-test <https://github.com/onap/policy-apex-pdp/tree/master/testsuites/performance/performance-benchmark-test>`_.
-To execute a benchmark test, you start the REST server, and then configure and run APEX against the server.
-There are example configurations for running tests in the `resources of this module <https://github.com/onap/policy-apex-pdp/tree/master/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark>`_.
+The Performance test is performed on a similar setup to the Stability test. JMeter will send a large number of REST requests and will then retrieve those requests.
-In order to run the test for 72 hours, set the batch count in the `EventGeneratorConfig.json <https://github.com/onap/policy-apex-pdp/blob/master/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/EventGeneratorConfig.json>`_ file to zero, which causes the REST server to generate batches forever.
+Performnce test plan will be the same as the stability test plan except for some differences listed below:
-Here is an example of how to do this:
+- Increase the number of threads from 5 to 60.
+- Reduce test time to ninety minutes.
+- Calculate the amount of requests handled in the time frame.
-1. Clone and build the apex-pdp git repo
+Run Test
+--------
-2. Go into the performance-benchmark-test module and run the REST server
+Running the performance test will be the same as the stability test. That is, launch JMeter pointing to corresponding *.jmx* test plan. The *API_HOST* , *API_PORT* , *PAP_HOST* , *PAP_PORT* are already set up in *.jmx*.
.. code-block:: bash
- cd testsuites/performance/performance-benchmark-test
- mvn exec:java -Dexec.mainClass="org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.EventGenerator" -Dexec.args="-c src/main/resources/examples/benchmark/EventGeneratorConfig.json"
+ nohup ./jmeter.sh -n -t ~/performance.jmx -Jusers=1 -l ~/perf.log
-3. Separately, create a local directory and unzip the APEX tarball
+Once the tests have completed, run the following the gather results.
.. code-block:: bash
- mkdir apex
- cd apex
- tar zxvf ~/git/onap/policy/apex-pdp/packages/apex-pdp-package-full/target/*gz
+ ~/jMeter/apache-jmeter-5.2.1/bin/jmeter -g perf.log -o ./performance_result/
-4. Run APEX with a configuration that runs against the benchmark REST server, select the configuration that is appropriate for the number of threads for the number of cores on the host on which APEX is running. For example on a 32 core machine, select the "32" configuration, on an 8 core machine, select the "08" configuration.
+Performance Test Result
+-----------------------
-.. code-block:: bash
-
- bin/apexApps.sh engine -c ~/git/onap/policy/apex-pdp/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript64.json
-
-5. To get the test results, Issue the following command using CURL or from a browser(also can store the result into a file by setting outfile in the `EventGeneratorConfig.json <https://github.com/onap/policy-apex-pdp/blob/master/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/EventGeneratorConfig.json>`_ file, statistics would be written into this file after event generator terminated)
-
-.. code-block:: bash
-
- curl http://localhost:32801/EventGenerator/Stats
-
-The results are similar to those below:
+**Summary**
-:download:`Example APEX performance metrics <json/example-apex-perf.json>`
+Performance test was triggered for 90 minutes. The results are shown below.
-Performance Test Result Frankfurt
----------------------------------
+**Test Statistics**
-**Summary**
+============================ =========== ========= ==================================
+**Total Number of Requests** **Success** **Error** **Average Time Taken per Request**
+============================ =========== ========= ==================================
+9870 100 % 0 % 5506.09 ms
+============================ =========== ========= ==================================
-Performance test was triggered for 2 hours on a 4 core, 4GB RAM virtual machine.
+**JMeter Screenshot**
-**Test Statistics**
+.. image:: images/apex_perf_jm_1.png
-:download:`Attached result log <json/frankfurt-apex-perf.json>`
-
-=============== ============= ================= ============== ===================== ================== ============= ===========
-**batchNumber** **batchSize** **eventsNotSent** **eventsSent** **eventsNotReceived** **eventsReceived** **Success %** **Error %**
-=============== ============= ================= ============== ===================== ================== ============= ===========
--1 431250 0 431250 0 431250 100 % 0 %
-=============== ============= ================= ============== ===================== ================== ============= ===========
-
-======================== ========================= ========================
-**averageRoundTripNano** **shortestRoundTripNano** **longestRoundTripNano**
-======================== ========================= ========================
-148965724 20169907 429339393
-======================== ========================= ========================
-
-============================ ============================= ============================
-**averageApexExecutionNano** **shortestApexExecutionNano** **longestApexExecutionNano**
-============================ ============================= ============================
-62451899 3901010 354528579
-============================ ============================= ============================
+.. image:: images/apex_perf_jm_2.png
diff --git a/docs/development/devtools/images/apex_perf_jm_1.PNG b/docs/development/devtools/images/apex_perf_jm_1.PNG
new file mode 100644
index 00000000..14b1a075
--- /dev/null
+++ b/docs/development/devtools/images/apex_perf_jm_1.PNG
Binary files differ
diff --git a/docs/development/devtools/images/apex_perf_jm_2.PNG b/docs/development/devtools/images/apex_perf_jm_2.PNG
new file mode 100644
index 00000000..7a2eebba
--- /dev/null
+++ b/docs/development/devtools/images/apex_perf_jm_2.PNG
Binary files differ
diff --git a/docs/development/devtools/images/apex_s3p_jm-1.png b/docs/development/devtools/images/apex_s3p_jm-1.png
new file mode 100644
index 00000000..b52a46c1
--- /dev/null
+++ b/docs/development/devtools/images/apex_s3p_jm-1.png
Binary files differ
diff --git a/docs/development/devtools/images/apex_s3p_jm-2.png b/docs/development/devtools/images/apex_s3p_jm-2.png
new file mode 100644
index 00000000..66002f84
--- /dev/null
+++ b/docs/development/devtools/images/apex_s3p_jm-2.png
Binary files differ
diff --git a/docs/development/devtools/zip/frankfurt/apex_s3p_result.tar.gz b/docs/development/devtools/zip/frankfurt/apex_s3p_result.tar.gz
index 4e4d6e82..998e1449 100644
--- a/docs/development/devtools/zip/frankfurt/apex_s3p_result.tar.gz
+++ b/docs/development/devtools/zip/frankfurt/apex_s3p_result.tar.gz
Binary files differ