diff options
Diffstat (limited to 'test/csit/scripts')
-rw-r--r-- | test/csit/scripts/dcae-bulkpm/xNFSimulator.sh | 28 | ||||
-rw-r--r-- | test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap | 2 | ||||
-rwxr-xr-x | test/csit/scripts/optf-has/has/has_script.sh | 21 | ||||
-rwxr-xr-x | test/csit/scripts/optf-has/has/music_script.sh | 10 | ||||
-rwxr-xr-x | test/csit/scripts/policy/script1.sh | 4 |
5 files changed, 47 insertions, 18 deletions
diff --git a/test/csit/scripts/dcae-bulkpm/xNFSimulator.sh b/test/csit/scripts/dcae-bulkpm/xNFSimulator.sh new file mode 100644 index 000000000..1728ef75b --- /dev/null +++ b/test/csit/scripts/dcae-bulkpm/xNFSimulator.sh @@ -0,0 +1,28 @@ +#!/bin/bash +#This scritt will simulate xNF ftpes functionality. +#This script will automatic install vsftpd and it will make necessary changes to vsftpd.conf +sudo apt-get install vsftpd -y +sudo useradd -m -u 12345 -g users -d /home/ftpuser -s /bin/bash -p "$(echo ftpuser | openssl passwd -1 -stdin)" ftpuser +sudo chown root:root /home/ftpuser +sudo mkdir -p /tmp/ftp/rop +sudo chown nobody:nogroup /tmp/ftp/rop +sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem -subj "/C=IE/ST=ftp/L=Springfield/O=Dis/CN=www.onap.org" +sudo sed -i -e '/anonymous_enable=/ s/=.*/=NO/' /etc/vsftpd.conf +sudo sed -i -e '/local_enable=/ s/=.*/=NO/' /etc/vsftpd.conf +sudo sed -i -e '/write_enable=/ s/=.*/=YES/' /etc/vsftpd.conf +sudo sed -i -e '/#write_enable=/ s/#write_enable=.*/write_enable=YES/' /etc/vsftpd.conf +sudo sed -i -e '/chroot_local_user=/ s/=.*/=YES/' /etc/vsftpd.conf +sudo sed -i -e '0,/#chroot_local_user=/ s/#chroot_local_user=.*/chroot_local_user=YES/' /etc/vsftpd.conf +sudo sed -i -e '/ssl_enable=/ s/=.*/=YES/' /etc/vsftpd.conf +sudo sed -i -e "/ssl_enable=YES/a\\allow_anon_ssl=YES" /etc/vsftpd.conf +sudo sed -i -e "/allow_anon_ssl=NO/a\\force_local_data_ssl=NO" /etc/vsftpd.conf +sudo sed -i -e "/force_local_data_ssl=NO/a\\force_local_logins_ssl=NO" /etc/vsftpd.conf +sudo sed -i -e "/force_local_logins_ssl=NO/a\\ssl_tlsv1=YES" /etc/vsftpd.conf +sudo sed -i -e "/ssl_tlsv1=YES/a\\ssl_sslv2=NO" /etc/vsftpd.conf +sudo sed -i -e "/ssl_sslv2=NO/a\\ssl_sslv3=NO" /etc/vsftpd.conf +sudo sed -i -e "/ssl_sslv3=NO/a\\require_ssl_reuse=NO" /etc/vsftpd.conf +sudo sed -i -e "/require_ssl_reuse=NO/a\\ssl_ciphers=HIGH" /etc/vsftpd.conf +sudo sed -i -e "/ssl_ciphers=HIGH/a\\hide_ids=YES" /etc/vsftpd.conf +sudo sed -i -e "/ssl_ciphers=HIGH/a\\anon_root=/var/ftp/" /etc/vsftpd.conf +sudo sed -i -e "/ssl_ciphers=HIGH/a\\no_anon_password=YES" /etc/vsftpd.conf +sudo service vsftpd restart
\ No newline at end of file diff --git a/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap index 1f644264b..2c5b8d6c5 100644 --- a/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap +++ b/test/csit/scripts/optf-has/has/has-properties/conductor.conf.onap @@ -252,7 +252,7 @@ music_new_version = True # Base URL for Music REST API without a trailing slash. (string value) server_url = http://localhost:8080/MUSIC/rest/v2 version = v2 -music_version = "3.0.3" +music_version = "2.5.3" aafuser = conductor aafpass = c0nduct0r aafns = conductor diff --git a/test/csit/scripts/optf-has/has/has_script.sh b/test/csit/scripts/optf-has/has/has_script.sh index 08bf0bcb0..2d2eff3b7 100755 --- a/test/csit/scripts/optf-has/has/has_script.sh +++ b/test/csit/scripts/optf-has/has/has_script.sh @@ -31,6 +31,7 @@ cd ${DIR} COND_CONF=/tmp/conductor/properties/conductor.conf LOG_CONF=/tmp/conductor/properties/log.conf IMAGE_NAME=nexus3.onap.org:10001/onap/optf-has +IMAGE_VER=1.2.1-SNAPSHOT-latest CERT=/tmp/conductor/properties/cert.cer KEY=/tmp/conductor/properties/cert.key BUNDLE=/tmp/conductor/properties/cert.pem @@ -69,16 +70,16 @@ curl -vvvvv --noproxy "*" --request GET http://${MUSIC_IP}:8080/MUSIC/rest/v2/ve echo "Onboard conductor into music" curl -vvvvv --noproxy "*" --request POST http://${MUSIC_IP}:8080/MUSIC/rest/v2/admin/onboardAppWithMusic -H "Content-Type: application/json" --data @${WORKSPACE}/test/csit/tests/optf-has/has/data/onboard.json -docker run -d --name cond-cont -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-controller --config-file=/usr/local/bin/conductor.conf -sleep 2 -docker run -d --name cond-api -p "8091:8091" -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf -sleep 2 -docker run -d --name cond-solv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-solver --config-file=/usr/local/bin/conductor.conf -sleep 2 -docker run -d --name cond-resv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:latest python /usr/local/bin/conductor-reservation --config-file=/usr/local/bin/conductor.conf -sleep 2 -docker run -d --name cond-data -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${CERT}:/usr/local/bin/cert.cer -v ${KEY}:/usr/local/bin/cert.key -v ${BUNDLE}:/usr/local/bin/cert.pem ${IMAGE_NAME}:latest python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf -sleep 2 +docker run -d --name cond-cont -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-controller --config-file=/usr/local/bin/conductor.conf +sleep 20 +docker run -d --name cond-api -p "8091:8091" -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf +sleep 20 +docker run -d --name cond-solv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-solver --config-file=/usr/local/bin/conductor.conf +sleep 20 +docker run -d --name cond-resv -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-reservation --config-file=/usr/local/bin/conductor.conf +sleep 20 +docker run -d --name cond-data -v ${COND_CONF}:/usr/local/bin/conductor.conf -v ${LOG_CONF}:/usr/local/bin/log.conf -v ${CERT}:/usr/local/bin/cert.cer -v ${KEY}:/usr/local/bin/cert.key -v ${BUNDLE}:/usr/local/bin/cert.pem ${IMAGE_NAME}:${IMAGE_VER} python /usr/local/bin/conductor-data --config-file=/usr/local/bin/conductor.conf +sleep 20 COND_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' cond-api` ${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${COND_IP} 8091 diff --git a/test/csit/scripts/optf-has/has/music_script.sh b/test/csit/scripts/optf-has/has/music_script.sh index 1e978c2f9..7693d7b30 100755 --- a/test/csit/scripts/optf-has/has/music_script.sh +++ b/test/csit/scripts/optf-has/has/music_script.sh @@ -27,7 +27,7 @@ echo "# music configuration step"; CASS_IMG=nexus3.onap.org:10001/onap/music/cassandra_music:latest TOMCAT_IMG=nexus3.onap.org:10001/library/tomcat:8.0 ZK_IMG=nexus3.onap.org:10001/library/zookeeper:3.4 -MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:latest +MUSIC_IMG=nexus3.onap.org:10001/onap/music/music:2.5.3 WORK_DIR=/tmp/music CASS_USERNAME=nelson24 CASS_PASSWORD=winman123 @@ -51,10 +51,10 @@ docker run -d --name music-db --network music-net -p "7000:7000" -p "7001:7001" CASSA_IP=`docker inspect -f '{{ $network := index .NetworkSettings.Networks "music-net" }}{{ $network.IPAddress}}' music-db` echo "CASSANDRA_IP=${CASSA_IP}" ${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${CASSA_IP} 9042 -sleep 60 +sleep 150 # Start Music war docker run -d --name music-war -v music-vol:/app ${MUSIC_IMG}; -sleep 15 +sleep 30 # Start Zookeeper docker run -d --name music-zk --network music-net -p "2181:2181" -p "2888:2888" -p "3888:3888" ${ZK_IMG}; #ZOO_IP=`docker inspect --format '{{ .NetworkSettings.Networks.bridge.IPAddress}}' music-zk` @@ -62,7 +62,7 @@ ZOO_IP=`docker inspect -f '{{ $network := index .NetworkSettings.Networks "music echo "ZOOKEEPER_IP=${ZOO_IP}" # Delay between Cassandra/Zookeeper and Tomcat -sleep 60; +sleep 120 # Start Up tomcat - Needs to have properties,logs dir and war file volume mapped. docker run -d --name music-tomcat --network music-net -p "8080:8080" -v music-vol:/usr/local/tomcat/webapps -v ${WORK_DIR}/properties:/opt/app/music/etc:ro -v ${WORK_DIR}/logs:/opt/app/music/logs ${TOMCAT_IMG}; @@ -80,7 +80,7 @@ echo "TOMCAT_IP=${TOMCAT_IP}" ${WORKSPACE}/test/csit/scripts/optf-has/has/wait_for_port.sh ${TOMCAT_IP} 8080 # wait a while to make sure music is totally up and configured -sleep 60 +sleep 90 echo "inspect docker things for tracing purpose" docker inspect music-db diff --git a/test/csit/scripts/policy/script1.sh b/test/csit/scripts/policy/script1.sh index 7bb9731c8..12509eda7 100755 --- a/test/csit/scripts/policy/script1.sh +++ b/test/csit/scripts/policy/script1.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2017 AT&T Intellectual Property. All rights reserved. +# Copyright 2017-2018 AT&T Intellectual Property. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -147,7 +147,7 @@ TIME_OUT=600 INTERVAL=20 TIME=0 while [ "$TIME" -lt "$TIME_OUT" ]; do - curl -i --user healthcheck:zb!XztG34 -H "ContentType: application/json" -H "Accept: application/json" ${POLICY_IP}:6969/healthcheck && break + curl -k -i --user healthcheck:zb!XztG34 -H "ContentType: application/json" -H "Accept: application/json" https://${POLICY_IP}:6969/healthcheck && break echo Sleep: $INTERVAL seconds before testing if Policy is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds sleep $INTERVAL |