aboutsummaryrefslogtreecommitdiffstats
path: root/test/ete
diff options
context:
space:
mode:
Diffstat (limited to 'test/ete')
-rwxr-xr-xtest/ete/labs/gwu/apt-proxy.sh18
-rw-r--r--test/ete/labs/gwu/onap-openrc9
-rw-r--r--test/ete/labs/gwu/onap-openstack-template.env142
-rwxr-xr-xtest/ete/labs/huawei/apt-proxy.sh16
-rw-r--r--test/ete/labs/huawei/onap-openstack-template.env10
-rwxr-xr-xtest/ete/labs/windriver/apt-proxy.sh16
-rw-r--r--test/ete/labs/windriver/onap-openstack-template.env6
-rwxr-xr-xtest/ete/scripts/deploy-onap.sh44
-rwxr-xr-xtest/ete/scripts/dns-zones/delete-dns-zones.sh2
-rwxr-xr-xtest/ete/scripts/install_openstack_cli.sh2
-rwxr-xr-xtest/ete/scripts/pull-docker-images.sh22
11 files changed, 266 insertions, 21 deletions
diff --git a/test/ete/labs/gwu/apt-proxy.sh b/test/ete/labs/gwu/apt-proxy.sh
new file mode 100755
index 000000000..59ba676a3
--- /dev/null
+++ b/test/ete/labs/gwu/apt-proxy.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+sed -i '/#!\/bin\/bash/a\
+ # sleep up to 3 minutes to avoid disk contention\
+ sleep $((RANDOM / 200))\
+ mkdir -p /etc/docker\
+ cat > /etc/docker/daemon.json <<EOF\
+ {\
+ "insecure-registries" : ["docker-proxy.local.enacct.com:5000"]\
+ }\
+ EOF\
+ cat > /etc/apt/apt.conf.d/30proxy<<EOF\
+ Acquire::http { Proxy "http://stack.local.enacct.com:3142"; };\
+ Acquire::https::Proxy "DIRECT";\
+ EOF\
+ apt-get -y update' $1
+
+# don't use insecure docker proxy in dcae
+perl -i -0pe 's/(?<=dcae_c_vm:)(.*?)\{ get_param: nexus_docker_repo \}/$1"nexus3.onap.org:10001"/s' $1
diff --git a/test/ete/labs/gwu/onap-openrc b/test/ete/labs/gwu/onap-openrc
new file mode 100644
index 000000000..74042317b
--- /dev/null
+++ b/test/ete/labs/gwu/onap-openrc
@@ -0,0 +1,9 @@
+export OS_PROJECT_ID=fe370564c0614739a328e20d8ae76261
+export OS_PROJECT_DOMAIN_NAME=Default
+export OS_USER_DOMAIN_NAME=Default
+export OS_PROJECT_NAME=onap
+export OS_USERNAME=demo
+export OS_PASSWORD=demo
+export OS_AUTH_URL=http://controller:5000/v3
+export OS_IDENTITY_API_VERSION=3
+export OS_IMAGE_API_VERSION=2
diff --git a/test/ete/labs/gwu/onap-openstack-template.env b/test/ete/labs/gwu/onap-openstack-template.env
new file mode 100644
index 000000000..b65729070
--- /dev/null
+++ b/test/ete/labs/gwu/onap-openstack-template.env
@@ -0,0 +1,142 @@
+parameters:
+
+ ##############################################
+ # #
+ # Parameters used across all ONAP components #
+ # #
+ ##############################################
+
+ public_net_id: 50e7638e-a9d2-4cd9-a242-2f289f8f6553
+
+ public_net_name: provider
+
+ ubuntu_1404_image: trusty
+
+ ubuntu_1604_image: xenial
+
+ flavor_small: m1.small
+
+ flavor_medium: m1.medium
+
+ flavor_large: m1.large
+
+ flavor_xlarge: m1.xlarge
+
+ flavor_xxlarge: m1.xlarge # purposely use a smaller VM here to reduce RAM usage
+
+ vm_base_name: onap
+
+ key_name: onap_key
+
+ pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh
+
+ nexus_repo: https://nexus.onap.org/content/sites/raw
+
+ nexus_docker_repo: docker-proxy.local.enacct.com:5000
+
+ nexus_username: anonymous
+
+ nexus_password: anonymous
+
+ dmaap_topic: AUTO
+
+ artifacts_version: 1.1.1
+
+ openstack_tenant_id: ${OS_PROJECT_ID}
+
+ openstack_tenant_name: ${OS_PROJECT_NAME}
+
+ openstack_username: ${OS_USERNAME}
+
+ openstack_api_key: ${OS_PASSWORD}
+
+ openstack_auth_method: password
+
+ openstack_region: RegionOne
+
+ horizon_url: http://stack.local.enacct.com/horizon
+
+ keystone_url: http://stack.local.enacct.com:5000
+
+ cloud_env: RegionOne
+
+
+ ######################
+ # #
+ # Network parameters #
+ # #
+ ######################
+
+ dns_list: ["192.168.1.11", "192.168.1.3"]
+ external_dns: 192.168.1.3
+ dns_forwarder: 192.168.1.11
+ oam_network_cidr: 172.16.0.0/16
+
+ ### Private IP addresses ###
+
+ aai1_ip_addr: 172.16.1.1
+ aai2_ip_addr: 172.16.1.2
+ appc_ip_addr: 172.16.2.1
+ dcae_ip_addr: 172.16.4.1
+ dns_ip_addr: 172.16.100.1
+ so_ip_addr: 172.16.5.1
+ mr_ip_addr: 172.16.11.1
+ policy_ip_addr: 172.16.6.1
+ portal_ip_addr: 172.16.9.1
+ robot_ip_addr: 172.16.10.1
+ sdc_ip_addr: 172.16.3.1
+ sdnc_ip_addr: 172.16.7.1
+ vid_ip_addr: 172.16.8.1
+ clamp_ip_addr: 172.16.12.1
+ openo_ip_addr: 172.16.14.1
+
+ ###########################
+ # #
+ # Parameters used by DCAE #
+ # #
+ ###########################
+
+ dnsaas_config_enabled: true
+ dnsaas_region: RegionOne
+ dnsaas_keystone_url: http://10.12.25.5:5000/v3
+ dnsaas_tenant_name: ${OS_PROJECT_NAME}
+ dnsaas_username: ${OS_USERNAME}
+ dnsaas_password: ${OS_PASSWORD}
+ dcae_keystone_url: "http://172.16.14.1/api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0"
+ dcae_centos_7_image: centos7
+ dcae_domain: dcaeg2.onap.org
+ dcae_public_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#
+ # Docker versions and branches #
+ # Rest of the file will be autogenerated from demo repo
+ # #
+ ################################
diff --git a/test/ete/labs/huawei/apt-proxy.sh b/test/ete/labs/huawei/apt-proxy.sh
new file mode 100755
index 000000000..82cc4f7de
--- /dev/null
+++ b/test/ete/labs/huawei/apt-proxy.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+sed -i '/#!\/bin\/bash/a\
+ mkdir -p /etc/docker\
+ cat > /etc/docker/daemon.json <<EOF\
+ {\
+ "insecure-registries" : ["docker-proxy.neo.futurewei.com:5000"]\
+ }\
+ EOF\
+ cat > /etc/apt/apt.conf.d/30proxy<<EOF\
+ Acquire::http { Proxy "http://apt-proxy.neo.futurewei.com:3142"; };\
+ Acquire::https::Proxy "DIRECT";\
+ EOF\
+ apt-get -y update' $1
+
+# don't use insecure docker proxy in dcae
+perl -i -0pe 's/(?<=dcae_c_vm:)(.*?)\{ get_param: nexus_docker_repo \}/$1"nexus3.onap.org:10001"/s' $1
diff --git a/test/ete/labs/huawei/onap-openstack-template.env b/test/ete/labs/huawei/onap-openstack-template.env
index 42d7fc75b..188e98242 100644
--- a/test/ete/labs/huawei/onap-openstack-template.env
+++ b/test/ete/labs/huawei/onap-openstack-template.env
@@ -34,9 +34,9 @@ parameters:
nexus_docker_repo: docker-proxy.neo.futurewei.com:5000
- nexus_username: docker
+ nexus_username: anonymous
- nexus_password: docker
+ nexus_password: anonymous
dmaap_topic: AUTO
@@ -67,8 +67,8 @@ parameters:
# #
######################
- dns_list: ["10.145.122.118", "8.8.8.8"]
- external_dns: 8.8.8.8
+ dns_list: ["10.145.122.117", "10.145.122.118"]
+ external_dns: 10.145.122.118
dns_forwarder: 10.145.122.117
oam_network_cidr: 172.16.0.0/16
@@ -98,7 +98,7 @@ parameters:
dnsaas_config_enabled: true
dnsaas_region: RegionOne
- dnsaas_keystone_url: http://10.12.25.5:5000/v3
+ dnsaas_keystone_url: http://controller.neo.futurewei.com:5000/v3
dnsaas_tenant_name: ${OS_PROJECT_NAME}
dnsaas_username: ${OS_USERNAME}
dnsaas_password: ${OS_PASSWORD}
diff --git a/test/ete/labs/windriver/apt-proxy.sh b/test/ete/labs/windriver/apt-proxy.sh
new file mode 100755
index 000000000..f8bb32ff0
--- /dev/null
+++ b/test/ete/labs/windriver/apt-proxy.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+sed -i '/#!\/bin\/bash/a\
+ mkdir -p /etc/docker\
+ cat > /etc/docker/daemon.json <<EOF\
+ {\
+ "insecure-registries" : ["10.12.5.80:5000"]\
+ }\
+ EOF\
+ cat > /etc/apt/apt.conf.d/30proxy<<EOF\
+ Acquire::http { Proxy "http://10.12.5.80:3142"; };\
+ Acquire::https::Proxy "DIRECT";\
+ EOF\
+ apt-get -y update' $1
+
+# don't use insecure docker proxy in dcae
+perl -i -0pe 's/(?<=dcae_c_vm:)(.*?)\{ get_param: nexus_docker_repo \}/$1"nexus3.onap.org:10001"/s' $1
diff --git a/test/ete/labs/windriver/onap-openstack-template.env b/test/ete/labs/windriver/onap-openstack-template.env
index 7a83f0f26..1992a42ed 100644
--- a/test/ete/labs/windriver/onap-openstack-template.env
+++ b/test/ete/labs/windriver/onap-openstack-template.env
@@ -32,11 +32,11 @@ parameters:
nexus_repo: https://nexus.onap.org/content/sites/raw
- nexus_docker_repo: nexus3.onap.org:10001
+ nexus_docker_repo: 10.12.5.80:5000
- nexus_username: docker
+ nexus_username: anonymous
- nexus_password: docker
+ nexus_password: anonymous
dmaap_topic: AUTO
diff --git a/test/ete/scripts/deploy-onap.sh b/test/ete/scripts/deploy-onap.sh
index c87f9a94e..96d42a0b1 100755
--- a/test/ete/scripts/deploy-onap.sh
+++ b/test/ete/scripts/deploy-onap.sh
@@ -18,27 +18,49 @@ fi
source $WORKSPACE/test/ete/scripts/install_openstack_cli.sh
-$WORKSPACE/test/ete/scripts/teardown-onap.sh
-STACK="ete-$(uuidgen | cut -c-8)"
-echo "New Stack Name: ${STACK}"
+SENTINEL='Docker versions and branches'
+mkdir -p ${LAB_DIR}/target
+YAML_FILE=${LAB_DIR}/target/onap_openstack.yaml
+ENV_FILE=${LAB_DIR}/target/onap_openstack.env
+YAML_SRC=${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml
+ENV_SRC=${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env
-SENTINEL='Docker versions and branches'
-YAML_FILE=${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml
-ENV_FILE=${LAB_DIR}/onap-openstack.env
-cp ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env ${LAB_DIR}/onap-openstack-demo.env
-envsubst < ${LAB_DIR}/onap-openstack-template.env | sed -n "1,/${SENTINEL}/p" > ${ENV_FILE}
+# copy heat template to WORKSPACE
+cp ${YAML_SRC} ${YAML_FILE}
+
+# generate final env file
pushd ${ONAP_WORKDIR}/demo
-echo " # Rest of the file was AUTO-GENERATED from"
+envsubst < ${LAB_DIR}/onap-openstack-template.env | sed -n "1,/${SENTINEL}/p" > ${ENV_FILE}
+echo " # Rest of the file was AUTO-GENERATED from" | tee -a ${ENV_FILE}
echo " #" $(git config --get remote.origin.url) heat/ONAP/onap_openstack.env $(git rev-parse HEAD) | tee -a ${ENV_FILE}
popd
-sed "1,/${SENTINEL}/d" ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.env >> ${ENV_FILE}
+sed "1,/${SENTINEL}/d" ${ENV_SRC} >> ${ENV_FILE}
cat ${ENV_FILE}
+sdiff -w 180 ${ENV_SRC} ${ENV_FILE}
+
+# generate final heat template
+# add apt proxy to heat template if applicable
+if [ -x $LAB_DIR/apt-proxy.sh ]; then
+ $LAB_DIR/apt-proxy.sh ${YAML_FILE}
+ sdiff -w 180 ${YAML_SRC} ${YAML_FILE}
+fi
+
+
+#exit 0
+
#diff ${LAB_DIR}/onap-openstack-template.env ${LAB_DIR}/onap-openstack.env
-openstack stack create -t ${YAML_FILE} -e ${LAB_DIR}/onap-openstack.env $STACK
+
+# tear down old deployment
+$WORKSPACE/test/ete/scripts/teardown-onap.sh
+
+# create new stack
+STACK="ete-$(uuidgen | cut -c-8)"
+echo "New Stack Name: ${STACK}"
+openstack stack create -t ${YAML_FILE} -e ${ENV_FILE} $STACK
while [ "CREATE_IN_PROGRESS" == "$(openstack stack show -c stack_status -f value $STACK)" ]; do
sleep 20
diff --git a/test/ete/scripts/dns-zones/delete-dns-zones.sh b/test/ete/scripts/dns-zones/delete-dns-zones.sh
index 00438b419..54cafecd8 100755
--- a/test/ete/scripts/dns-zones/delete-dns-zones.sh
+++ b/test/ete/scripts/dns-zones/delete-dns-zones.sh
@@ -13,7 +13,7 @@ MULTICLOUD_IP=$($WORKSPACE/test/ete/scripts/get-floating-ip.sh onap-multi-servic
export MULTICLOUD_PLUGIN_ENDPOINT=http://$MULTICLOUD_IP:9005/api/multicloud-titanium_cloud/v0/pod25_RegionOne
-export TOKEN=$(curl -v -s -H "Content-Type: application/json" -X POST -d '{"auth": {"identity": {"methods": ["password"],"password": {"user": {"name": "demo","password": "onapdemo"}}},"scope": {"project":{"domain":{"name":"Default"},"name": "'$1'" } }}}' $MULTICLOUD_PLUGIN_ENDPOINT/identity/v3/auth/tokens 2>&1 | grep X-Subject-Token | sed "s/^.*: //")
+export TOKEN=$(curl -v -s -H "Content-Type: application/json" -X POST -d '{"auth": {"identity": {"methods": ["password"],"password": {"user": {"name": "'$OS_USERNAME'","password": "'$OS_PASSWORD'"}}},"scope": {"project":{"domain":{"name":"Default"},"name": "'$1'" } }}}' $MULTICLOUD_PLUGIN_ENDPOINT/identity/v3/auth/tokens 2>&1 | grep X-Subject-Token | sed "s/^.*: //")
ZONES=$(curl -v -s -H "Content-Type: application/json" -H "X-Auth-Token: $TOKEN" -X GET $MULTICLOUD_PLUGIN_ENDPOINT/dns-delegate/v2/zones | jq '.["zones"][] | .name' | tr -d '"' )
diff --git a/test/ete/scripts/install_openstack_cli.sh b/test/ete/scripts/install_openstack_cli.sh
index a6a0438f9..c7af2d5f7 100755
--- a/test/ete/scripts/install_openstack_cli.sh
+++ b/test/ete/scripts/install_openstack_cli.sh
@@ -26,7 +26,7 @@ else
source ${ONAP_VENV}/bin/activate
pip install --upgrade pip
- pip install --upgrade python-openstackclient python-heatclient
+ pip install --upgrade python-openstackclient python-heatclient python-designateclient
echo "ONAP_VENV=${ONAP_VENV}" >> $WORKSPACE/env.properties
fi
diff --git a/test/ete/scripts/pull-docker-images.sh b/test/ete/scripts/pull-docker-images.sh
new file mode 100755
index 000000000..e14ee8349
--- /dev/null
+++ b/test/ete/scripts/pull-docker-images.sh
@@ -0,0 +1,22 @@
+#!/bin/bash -x
+
+# this script will pull all the docker images listed in the manifest
+# specify a parameter to override the default proxy of nexus3.onap.org:100001
+
+if [ "$#" -ne 1 ]; then
+ PROXY=nexus3.onap.org:10001
+else
+ PROXY=$1
+fi
+
+
+if [ -z "$WORKSPACE" ]; then
+ export WORKSPACE=`git rev-parse --show-toplevel`
+fi
+
+MANIFEST=${WORKSPACE}/version-manifest/src/main/resources/docker-manifest.csv
+IMAGES=$(tail -n +2 $MANIFEST | tr ',' ':')
+
+for image in $IMAGES; do
+ docker pull ${PROXY}/${image}
+done