aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/ete/labs/gwu/apt-proxy.sh7
-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.sh7
-rwxr-xr-xtest/ete/scripts/deploy-onap.sh34
5 files changed, 191 insertions, 8 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..14b272566
--- /dev/null
+++ b/test/ete/labs/gwu/apt-proxy.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+sed -i '/#!\/bin\/bash/a\
+ 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
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..d592b6774
--- /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: nexus3.onap.org:10001
+
+ nexus_username: docker
+
+ nexus_password: docker
+
+ 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://controller.neo.futurewei.com/horizon
+
+ keystone_url: http://controller.neo.futurewei.com:5000
+
+ cloud_env: RegionOne
+
+
+ ######################
+ # #
+ # Network parameters #
+ # #
+ ######################
+
+ dns_list: ["192.168.2.251", "192.168.1.11"]
+ external_dns: 192.168.1.11
+ dns_forwarder: 192.168.2.251
+ 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_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh
+ dcae_private_key: '-----BEGIN RSA PRIVATE KEY-----\n
+MIIEpQIBAAKCAQEAylw4KKN/ljqnFBvP+blG5PNfsn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VZ7pPo8JNX95jAoGAIe5CIg8/JizUZa7KeKUh\n
+9pgDleQPkQsrHQ6/AyIwFBsLwf9THSS5V+uV9D57SfUs46Bf2U8J6N90YQSlt8iS\n
+aWuManFPVgT+yxDIzt6obf2mCEpOIBtQ6N4ZRh2HhQwdWTCrkzkDdGQaHG+jYL6C\n
+xGPwiG2ON7OAfGIAM7eN5lECgYEAhoRLWlaOgRGnHKAWsYQvZ67CjTdDcPPuVu6v\n
+fMQnNMA/7JeTwV+E205L0wfpgZ/cZKmBBlQMJlnUA3q2wfO+PTnse1mjDJU/cGtB\n
+22/lJLxChlQdxGeQhGtGzUhF+hEeOhrO6WSSx7CtMRZoy6Dr6lwfMFZCdVNcBd6v\n
+YOOZk3ECgYEAseUKGb6E80XTVVNziyuiVbQCsI0ZJuRfqMZ2IIDQJU9u6AnGAway\n
+itqHbkGsmDT+4HUz01+1JKnnw42RdSrHdU/LaOonD+RIGqe2x800QXzqASKLdCXr\n
+y7RoiFqJtkdFQykzJemA+xOXvHLgKi/MXFsU90PCD0VJKLj8vwpX78Y=\n
+-----END RSA PRIVATE KEY-----'
+
+ ################################
+ # #
+ # 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..6aa7c5578
--- /dev/null
+++ b/test/ete/labs/huawei/apt-proxy.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+sed -i '/#!\/bin\/bash/a\
+ cat > /etc/apt/apt.conf.d/30proxy<<EOF\
+ Acquire::http { Proxy "http://10.145.122.118:3142"; };\
+ Acquire::https::Proxy "DIRECT";\
+ EOF\
+ apt-get -y update' $1
diff --git a/test/ete/scripts/deploy-onap.sh b/test/ete/scripts/deploy-onap.sh
index c87f9a94e..571b380d1 100755
--- a/test/ete/scripts/deploy-onap.sh
+++ b/test/ete/scripts/deploy-onap.sh
@@ -18,26 +18,44 @@ 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'
-YAML_FILE=${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml
+
+YAML_FILE=${LAB_DIR}/onap_openstack.yaml
ENV_FILE=${LAB_DIR}/onap-openstack.env
+
+# copy heat template to WORKSPACE
+cp ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml ${YAML_FILE}
+
+# generate final env file
+pushd ${ONAP_WORKDIR}/demo
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}
-pushd ${ONAP_WORKDIR}/demo
-echo " # Rest of the file was AUTO-GENERATED from"
+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}
cat ${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}
+ diff ${ONAP_WORKDIR}/demo/heat/ONAP/onap_openstack.yaml ${YAML_FILE}
+fi
+
+
+#exit 0
+
#diff ${LAB_DIR}/onap-openstack-template.env ${LAB_DIR}/onap-openstack.env
+
+# 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 ${LAB_DIR}/onap-openstack.env $STACK
while [ "CREATE_IN_PROGRESS" == "$(openstack stack show -c stack_status -f value $STACK)" ]; do