From a0081c9434b6ef4b43ef29af01b1f1f06dcc0b25 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Tue, 28 Aug 2018 11:48:14 -0700 Subject: Retrieve demo artifacts via nexus REST API This supports the use of SNAPSHOT demo artifacts in the vnf HEAT templates. Change-Id: I980c879819b1a396c985c7a2af1885b28e4f150a Issue-ID: INT-592 Signed-off-by: Gary Wu --- vnfs/vCPE/preload/vcpe_infra_preload_example.json | 4 ++-- vnfs/vCPE/preload/vcpe_metro_preload_example.json | 4 ++-- vnfs/vCPE/scripts/v_aaa_install.sh | 3 ++- vnfs/vCPE/scripts/v_dhcp_install.sh | 5 +++-- vnfs/vCPE/scripts/v_dns_install.sh | 3 ++- vnfs/vCPE/scripts/v_web_install.sh | 3 ++- 6 files changed, 13 insertions(+), 9 deletions(-) (limited to 'vnfs/vCPE') diff --git a/vnfs/vCPE/preload/vcpe_infra_preload_example.json b/vnfs/vCPE/preload/vcpe_infra_preload_example.json index 17356a28..f8735b9d 100644 --- a/vnfs/vCPE/preload/vcpe_infra_preload_example.json +++ b/vnfs/vCPE/preload/vcpe_infra_preload_example.json @@ -15,8 +15,8 @@ }, "vnf-parameters": [ { - "vnf-parameter-name": "repo_url_artifacts", - "vnf-parameter-value": "https://nexus.onap.org/content/groups/staging" + "vnf-parameter-name": "nexus_artifact_repo", + "vnf-parameter-value": "https://nexus.onap.org" }, { "vnf-parameter-name": "demo_artifacts_version", diff --git a/vnfs/vCPE/preload/vcpe_metro_preload_example.json b/vnfs/vCPE/preload/vcpe_metro_preload_example.json index 876c26e1..16acb3d6 100644 --- a/vnfs/vCPE/preload/vcpe_metro_preload_example.json +++ b/vnfs/vCPE/preload/vcpe_metro_preload_example.json @@ -15,8 +15,8 @@ }, "vnf-parameters": [ { - "vnf-parameter-name": "repo_url_artifacts", - "vnf-parameter-value": "https://nexus.onap.org/content/groups/staging" + "vnf-parameter-name": "nexus_artifact_repo", + "vnf-parameter-value": "https://nexus.onap.org" }, { "vnf-parameter-name": "demo_artifacts_version", diff --git a/vnfs/vCPE/scripts/v_aaa_install.sh b/vnfs/vCPE/scripts/v_aaa_install.sh index a019e6a0..c9a9bdfb 100644 --- a/vnfs/vCPE/scripts/v_aaa_install.sh +++ b/vnfs/vCPE/scripts/v_aaa_install.sh @@ -1,7 +1,8 @@ #!/bin/bash -REPO_URL_ARTIFACTS=$(cat /opt/config/repo_url_artifacts.txt) +NEXUS_ARTIFACT_REPO=$(cat /opt/config/nexus_artifact_repo.txt) DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt) +if [[ "$DEMO_ARTIFACTS_VERSION" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt) CLOUD_ENV=$(cat /opt/config/cloud_env.txt) diff --git a/vnfs/vCPE/scripts/v_dhcp_install.sh b/vnfs/vCPE/scripts/v_dhcp_install.sh index 822c2f8e..aa5c9291 100644 --- a/vnfs/vCPE/scripts/v_dhcp_install.sh +++ b/vnfs/vCPE/scripts/v_dhcp_install.sh @@ -1,7 +1,8 @@ #!/bin/bash -REPO_URL_ARTIFACTS=$(cat /opt/config/repo_url_artifacts.txt) +NEXUS_ARTIFACT_REPO=$(cat /opt/config/nexus_artifact_repo.txt) DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt) +if [[ "$DEMO_ARTIFACTS_VERSION" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt) CLOUD_ENV=$(cat /opt/config/cloud_env.txt) MR_IP_ADDR=$(cat /opt/config/mr_ip_addr.txt) @@ -57,7 +58,7 @@ sleep 1 # Download the kea hook cd /opt -wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/vcpe/kea-sdnc-notify-mod/$DEMO_ARTIFACTS_VERSION/kea-sdnc-notify-mod-$DEMO_ARTIFACTS_VERSION-demo.tar.gz +wget -O kea-sdnc-notify-mod-$DEMO_ARTIFACTS_VERSION-demo.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vcpe&a=kea-sdnc-notify-mod&c=demo&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION" tar -zxvf kea-sdnc-notify-mod-$DEMO_ARTIFACTS_VERSION-demo.tar.gz mv kea-sdnc-notify-mod-$DEMO_ARTIFACTS_VERSION VDHCP rm *.tar.gz diff --git a/vnfs/vCPE/scripts/v_dns_install.sh b/vnfs/vCPE/scripts/v_dns_install.sh index 4835c9d8..81669d1b 100644 --- a/vnfs/vCPE/scripts/v_dns_install.sh +++ b/vnfs/vCPE/scripts/v_dns_install.sh @@ -1,7 +1,8 @@ #!/bin/bash -REPO_URL_ARTIFACTS=$(cat /opt/config/repo_url_artifacts.txt) +NEXUS_ARTIFACT_REPO=$(cat /opt/config/nexus_artifact_repo.txt) DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt) +if [[ "$DEMO_ARTIFACTS_VERSION" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt) CLOUD_ENV=$(cat /opt/config/cloud_env.txt) diff --git a/vnfs/vCPE/scripts/v_web_install.sh b/vnfs/vCPE/scripts/v_web_install.sh index 8be71979..e5a77993 100644 --- a/vnfs/vCPE/scripts/v_web_install.sh +++ b/vnfs/vCPE/scripts/v_web_install.sh @@ -1,7 +1,8 @@ #!/bin/bash -REPO_URL_ARTIFACTS=$(cat /opt/config/repo_url_artifacts.txt) +NEXUS_ARTIFACT_REPO=$(cat /opt/config/nexus_artifact_repo.txt) DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt) +if [[ "$DEMO_ARTIFACTS_VERSION" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt) CLOUD_ENV=$(cat /opt/config/cloud_env.txt) -- cgit 1.2.3-korg