From 60dd0d84290b33e00fd5d4a05367670e8d5b4d6f Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Thu, 18 Jan 2018 14:54:47 -0800 Subject: Enable DCAE in ONAP OOM heat template Change-Id: Ie9ddb0975f6a71241081c7b48d5a88c24798903f Issue-ID: INT-381 Signed-off-by: Gary Wu --- test/ete/labs/gwu/onap-oom.env | 18 ++++++-- test/ete/labs/huawei/k8s_vm_entrypoint.sh | 36 ++++++++++++--- test/ete/labs/huawei/onap-oom.env | 2 + test/ete/labs/huawei/onap-oom.yaml | 74 +++++++++++++++---------------- 4 files changed, 83 insertions(+), 47 deletions(-) (limited to 'test') diff --git a/test/ete/labs/gwu/onap-oom.env b/test/ete/labs/gwu/onap-oom.env index 92c13fad2..6315267ef 100644 --- a/test/ete/labs/gwu/onap-oom.env +++ b/test/ete/labs/gwu/onap-oom.env @@ -7,8 +7,20 @@ parameters: ############################################## public_net_id: 024582bd-ef9b-48b9-9e70-e6732559d9df - + public_net_name: provider docker_proxy: 192.168.1.51:5000 - apt_proxy: 192.168.1.51:3142 - + ubuntu_1404_image: trusty + ubuntu_1604_image: xenial + centos_7_image: centos7 + openstack_tenant_id: 4c93f99551604bf7af25a8f80c7f34cb + openstack_tenant_name: onap + openstack_username: demo + openstack_api_key: demo + keystone_url: http://192.168.1.11:5000 + rancher_vm_flavor: m1.small + k8s_vm_flavor: m2.xxlarge + dns_list: ["192.168.1.11", "192.168.1.3"] + dns_forwarder: 192.168.1.11 + oam_network_cidr: 172.16.0.0/16 + dcae_ip_addr: 172.16.0.4 diff --git a/test/ete/labs/huawei/k8s_vm_entrypoint.sh b/test/ete/labs/huawei/k8s_vm_entrypoint.sh index 8a34b8ea5..cae0f392b 100644 --- a/test/ete/labs/huawei/k8s_vm_entrypoint.sh +++ b/test/ete/labs/huawei/k8s_vm_entrypoint.sh @@ -53,7 +53,7 @@ echo export RANCHER_ACCESS_KEY=`jq -r '.publicValue' apikeys.json` >> api-keys-r echo export RANCHER_SECRET_KEY=`jq -r '.secretValue' apikeys.json` >> api-keys-rc source api-keys-rc -curl -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" -X DELETE -H 'Content-Type: application/json' "http://$RANCHER_IP:8080/v2-beta/projects/$OLD_PID" +curl -s -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" -X DELETE -H 'Content-Type: application/json' "http://$RANCHER_IP:8080/v2-beta/projects/$OLD_PID" until [ ! -z "$TEMPLATE_ID" ] && [ "$TEMPLATE_ID" != "null" ]; do sleep 5 @@ -61,7 +61,7 @@ until [ ! -z "$TEMPLATE_ID" ] && [ "$TEMPLATE_ID" != "null" ]; do TEMPLATE_ID=$(jq -r '.data[0].id' projectTemplatesKubernetes.json) done -curl -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" -X POST -H 'Content-Type: application/json' -d '{ "name":"oom", "projectTemplateId":"'$TEMPLATE_ID'" }' "http://$RANCHER_IP:8080/v2-beta/projects" | tee project.json +curl -s -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" -X POST -H 'Content-Type: application/json' -d '{ "name":"oom", "projectTemplateId":"'$TEMPLATE_ID'" }' "http://$RANCHER_IP:8080/v2-beta/projects" | tee project.json PID=`jq -r '.id' project.json` echo export RANCHER_URL=http://$RANCHER_IP:8080/v1/projects/$PID >> api-keys-rc source api-keys-rc @@ -128,17 +128,33 @@ sed -i "s/kubeMasterAuthToken:.*/kubeMasterAuthToken: $KUBETOKEN/" ~/oom/kuberne # Create or edit ~/oom/kubernetes/config/onap-parameters.yaml cp ~/oom/kubernetes/config/onap-parameters-sample.yaml ~/oom/kubernetes/config/onap-parameters.yaml cat >> ~/oom/kubernetes/config/onap-parameters.yaml <