blob: 2257452d53e8db9163218454af7861cc6ea7cd87 [file] [log] [blame]
Sirisha_Manchikantidc007152021-10-05 16:37:04 +01001#-------------------------------------------------------------------------------
2# ============LICENSE_START=======================================================
3 Copyright (C) 2021 Nordix Foundation.
4# ================================================================================
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# SPDX-License-Identifier: Apache-2.0
18# ============LICENSE_END=========================================================
19#-------------------------------------------------------------------------------
20
21To set up S3P test environment with all docker images, either build the docker images locally with
22"mvn clean install -P docker" in clamp/packages directory Or use policy/docker/csit to bring up docker images.
23
24Important Instructions to setup environment using CSIT:
25-------------------------------------------------------
26Step 1: $cd policy/docker/csit
27
28Step 2:
29$vi run-project-csit.sh
30Comment the on_exit cleanup function call in run-project-csit.sh file. By doing this, docker images once started will not be shutdown.
31All images will be up and running, to carryout any Stability or Performance tests using JMeter.
32# ensure that teardown and other finalizing steps are always executed
33#trap on_exit EXIT
34
35Step 3:
36./run-project-csit.sh clamp
37This command will bring up all required docker images
38
39Step 4: Ensure the IP's and Ports in stability.jmx and performance.jmx are changed, and reflecting to the IP's of docker images.
40Example:
41$cd ./clamp/testsuites/stability/src/main/resources/testplans/stability.jmx
42 <elementProp name="RUNTIME_HOST" elementType="Argument">
43 <stringProp name="Argument.name">RUNTIME_HOST</stringProp>
44 <stringProp name="Argument.value">192.168.48.9</stringProp>
45 <stringProp name="Argument.metadata">=</stringProp>
46 </elementProp>
47
48
49On successfull docker image bring up:
50------------------------------------
51$docker ps
52CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
53a9cb0cd103cf onap/policy-clamp-cl-runtime:latest "/opt/app/policy/bin…" 41 seconds ago Up 40 seconds 6969/tcp policy-clamp-cl-runtime
54886e572b8438 onap/policy-clamp-cl-pf-ppnt:latest "/opt/app/policy/bin…" 42 seconds ago Up 41 seconds 6973/tcp policy-clamp-cl-pf-ppnt
55035707b1b95f nexus3.onap.org:10001/onap/policy-api:2.5-SNAPSHOT-latest "./wait_for_port.sh …" 42 seconds ago Up 42 seconds 6969/tcp policy-api
56d34204f95ff3 onap/policy-clamp-cl-http-ppnt:latest "/opt/app/policy/bin…" 43 seconds ago Up 42 seconds 6971/tcp policy-clamp-cl-http-ppnt
574470e608c9a8 onap/policy-clamp-cl-k8s-ppnt:latest "/opt/app/policy/bin…" 43 seconds ago Up 42 seconds 6972/tcp, 8083/tcp policy-clamp-cl-k8s-ppnt
5862229d46b79c nexus3.onap.org:10001/onap/policy-models-simulator:2.5-SNAPSHOT-latest "bash simulators.sh" 45 seconds ago Up 43 seconds 3905/tcp, 6666/tcp, 6668-6670/tcp, 6680/tcp simulator
59efaf0ca5e1f0 nexus3.onap.org:10001/mariadb:10.5.8 "docker-entrypoint.s…" 45 seconds ago Up 43 seconds 3306/tcp mariadb
60
61To start performance tests:
62--------------------------
63nohup ./jMeter/apache-jmeter-5.2.1/bin/jmeter -n -t performance.jmx -l testresults.jtl
64
65To start stability tests:
66--------------------------
67nohup ./jMeter/apache-jmeter-5.2.1/bin/jmeter -n -t stability.jmx -l testresults.jtl
68
69To remove all docker images after Stability (72hrs) and Performance(2hrs) test runs:
70-----------------------------------------------------------------------------------
71cd policy/docker/csit
72docker-compose -f ./docker-compose-all.yml down -v
73