From 52dfdcb21383776e28a47f78fa04afe469ac78d9 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Thu, 25 Jan 2018 11:02:48 -0800 Subject: Updates to match OOM onap-parameters.yaml changes Change-Id: I76149fa3762221a8c1fc0cee6a44d83238ebdb89 Issue-ID: INT-381 Signed-off-by: Gary Wu --- deployment/heat/onap-oom/env/gwu/onap-openrc | 1 + deployment/heat/onap-oom/env/gwu/onap.env | 8 +- .../onap-oom/env/huawei/onap-beijing-oom-openrc | 1 + .../heat/onap-oom/env/huawei/onap-beijing-oom.env | 8 +- .../env/windriver/Integration-Jenkins-openrc | 1 + .../onap-oom/env/windriver/Integration-Jenkins.env | 8 +- deployment/heat/onap-oom/k8s_vm_entrypoint.sh | 190 +++++++++++++++++---- deployment/heat/onap-oom/onap-oom.yaml | 71 ++++++-- 8 files changed, 236 insertions(+), 52 deletions(-) create mode 120000 deployment/heat/onap-oom/env/gwu/onap-openrc create mode 120000 deployment/heat/onap-oom/env/huawei/onap-beijing-oom-openrc create mode 120000 deployment/heat/onap-oom/env/windriver/Integration-Jenkins-openrc (limited to 'deployment/heat') diff --git a/deployment/heat/onap-oom/env/gwu/onap-openrc b/deployment/heat/onap-oom/env/gwu/onap-openrc new file mode 120000 index 000000000..c08bcbda6 --- /dev/null +++ b/deployment/heat/onap-oom/env/gwu/onap-openrc @@ -0,0 +1 @@ +../../../../../test/ete/labs/gwu/onap-openrc \ No newline at end of file diff --git a/deployment/heat/onap-oom/env/gwu/onap.env b/deployment/heat/onap-oom/env/gwu/onap.env index 6c03e947e..3ca447d70 100644 --- a/deployment/heat/onap-oom/env/gwu/onap.env +++ b/deployment/heat/onap-oom/env/gwu/onap.env @@ -19,15 +19,15 @@ parameters: public_net_id: 024582bd-ef9b-48b9-9e70-e6732559d9df public_net_name: provider - dcae_keystone_url: http://192.168.1.11:5000/v2.0 oam_network_cidr: 172.16.0.0/16 - dcae_ip_addr: 172.16.0.4 dns_forwarder: 192.168.1.11 external_dns: 192.168.1.3 - dnsaas_proxy_enable: false - dnsaas_keystone_url: http://192.168.1.11:5000/v2.0 + dnsaas_proxy_enable: "false" + dnsaas_proxied_keystone_url_path: "v2.0" + dnsaas_keystone_url: http://192.168.1.11:5000 dnsaas_region: RegionOne + dnsaas_tenant_id: 4c93f99551604bf7af25a8f80c7f34cb dnsaas_tenant_name: onap dnsaas_username: demo dnsaas_password: demo diff --git a/deployment/heat/onap-oom/env/huawei/onap-beijing-oom-openrc b/deployment/heat/onap-oom/env/huawei/onap-beijing-oom-openrc new file mode 120000 index 000000000..38d9b3ffd --- /dev/null +++ b/deployment/heat/onap-oom/env/huawei/onap-beijing-oom-openrc @@ -0,0 +1 @@ +../../../../../test/ete/labs/huawei/onap-beijing-oom-openrc \ No newline at end of file diff --git a/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env b/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env index 80d65de55..0365c751c 100644 --- a/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env +++ b/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env @@ -19,15 +19,15 @@ parameters: public_net_id: 3a6247f1-fac6-4167-a49f-33cc8415ccf4 public_net_name: provider - dcae_keystone_url: http://10.145.122.117:5000/v2.0 oam_network_cidr: 172.16.0.0/16 - dcae_ip_addr: 172.16.0.4 dns_forwarder: 10.145.122.117 external_dns: 10.145.122.118 - dnsaas_proxy_enable: false - dnsaas_keystone_url: http://10.145.122.117:5000/v2.0 + dnsaas_proxy_enable: "false" + dnsaas_proxied_keystone_url_path: "v2.0" + dnsaas_keystone_url: http://10.145.122.117:5000 dnsaas_region: RegionOne + dnsaas_tenant_id: 3d228d2fcbb7447bbba3cde703431bc1 dnsaas_tenant_name: onap-beijing-oom dnsaas_username: demo dnsaas_password: demo diff --git a/deployment/heat/onap-oom/env/windriver/Integration-Jenkins-openrc b/deployment/heat/onap-oom/env/windriver/Integration-Jenkins-openrc new file mode 120000 index 000000000..7f4cc2547 --- /dev/null +++ b/deployment/heat/onap-oom/env/windriver/Integration-Jenkins-openrc @@ -0,0 +1 @@ +../../../../../test/ete/labs/windriver/Integration-Jenkins-openrc \ No newline at end of file diff --git a/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env b/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env index 867d2ded4..a3290a3cd 100644 --- a/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env +++ b/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env @@ -19,15 +19,15 @@ parameters: public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 public_net_name: external - dcae_keystone_url: "http://10.0.14.1/api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0" oam_network_cidr: 10.0.0.0/16 - dcae_ip_addr: 10.0.4.1 dns_forwarder: 10.12.25.5 external_dns: 8.8.8.8 - dnsaas_proxy_enable: true - dnsaas_keystone_url: http://10.12.25.5:5000/v2.0 + dnsaas_proxy_enable: "true" + dnsaas_proxied_keystone_url_path: "api/multicloud-titanium_cloud/v0/pod25_RegionOne/identity/v2.0" + dnsaas_keystone_url: http://10.12.25.5:5000 dnsaas_region: RegionOne + dnsaas_tenant_id: bf80d09fbc804b42b3bc727d6cf1fcbe dnsaas_tenant_name: Integration-Jenkins dnsaas_username: demo dnsaas_password: onapdemo diff --git a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh index db2428ba9..216a187af 100644 --- a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh +++ b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh @@ -15,7 +15,7 @@ Acquire::http { Proxy "http://__apt_proxy__"; }; Acquire::https::Proxy "DIRECT"; EOF apt-get -y update -apt-get -y install jq +apt-get -y install linux-image-extra-$(uname -r) jq cd ~ @@ -48,7 +48,7 @@ until curl -s -o projects.json -H "Accept: application/json" http://$RANCHER_IP: done OLD_PID=$(jq -r '.data[0].id' projects.json) -curl -s -H "Accept: application/json" -H "Content-Type: application/json" -d '{"accountId":"1a1"}' http://$RANCHER_IP:8080/v2-beta/apikeys | tee apikeys.json +curl -s -H "Accept: application/json" -H "Content-Type: application/json" -d '{"accountId":"1a1"}' http://$RANCHER_IP:8080/v2-beta/apikeys > apikeys.json echo export RANCHER_ACCESS_KEY=`jq -r '.publicValue' apikeys.json` >> api-keys-rc echo export RANCHER_SECRET_KEY=`jq -r '.secretValue' apikeys.json` >> api-keys-rc source api-keys-rc @@ -57,28 +57,28 @@ curl -s -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" -X DELETE -H 'Content-T until [ ! -z "$TEMPLATE_ID" ] && [ "$TEMPLATE_ID" != "null" ]; do sleep 5 - curl -s -H "Accept: application/json" http://$RANCHER_IP:8080/v2-beta/projectTemplates?name=Kubernetes | tee projectTemplatesKubernetes.json + curl -s -H "Accept: application/json" http://$RANCHER_IP:8080/v2-beta/projectTemplates?name=Kubernetes > projectTemplatesKubernetes.json TEMPLATE_ID=$(jq -r '.data[0].id' projectTemplatesKubernetes.json) done -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 +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" > 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 until [ $(jq -r '.state' project.json) == "active" ]; do sleep 5 - curl -s -H "Accept: application/json" http://$RANCHER_IP:8080/v1/projects/$PID | tee project.json + curl -s -H "Accept: application/json" http://$RANCHER_IP:8080/v1/projects/$PID > project.json done TID=$(curl -s -X POST -H "Accept: application/json" -H "Content-Type: application/json" http://$RANCHER_IP:8080/v1/projects/$PID/registrationTokens | jq -r '.id') touch token.json while [ $(jq -r .command token.json | wc -c) -lt 10 ]; do sleep 5 - curl -s -X GET -H "Accept: application/json" http://$RANCHER_IP:8080/v1/projects/$PID/registrationToken/$TID | tee token.json + curl -s -X GET -H "Accept: application/json" http://$RANCHER_IP:8080/v1/projects/$PID/registrationToken/$TID > token.json done -CMD=$(jq -r .command token.json) -eval $CMD +RANCHER_AGENT_CMD=$(jq -r .command token.json) +eval $RANCHER_AGENT_CMD # download rancher CLI wget -q https://github.com/rancher/cli/releases/download/v0.6.7/rancher-linux-amd64-v0.6.7.tar.xz @@ -126,36 +126,166 @@ sed -i "s/kubeMasterAuthToken:.*/kubeMasterAuthToken: $KUBETOKEN/" ~/oom/kuberne # Put your onap_key ssh private key in ~/.ssh/onap_key # 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 < ~/oom/kubernetes/config/onap-parameters.yaml <