From d647840046966047386022ea862081fda35988c8 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Thu, 19 Jul 2018 11:49:29 -0700 Subject: Deprecate use of sites/raw for vnf HEAT templates Replace the use of sites/raw in vnf HEAT templates with zipped script artifacts Change-Id: I93c331c0f4753e8bf661e5a577463ab38bd116f5 Issue-ID: INT-592 Signed-off-by: Gary Wu --- heat/vFWCL/vFWSNK/base_vfw.env | 3 +-- heat/vFWCL/vFWSNK/base_vfw.yaml | 22 ++++++++++++---------- heat/vFWCL/vPKG/base_vpkg.env | 3 +-- heat/vFWCL/vPKG/base_vpkg.yaml | 15 ++++++++------- 4 files changed, 22 insertions(+), 21 deletions(-) (limited to 'heat/vFWCL') diff --git a/heat/vFWCL/vFWSNK/base_vfw.env b/heat/vFWCL/vFWSNK/base_vfw.env index 887987ae..338a2a21 100644 --- a/heat/vFWCL/vFWSNK/base_vfw.env +++ b/heat/vFWCL/vFWSNK/base_vfw.env @@ -23,10 +23,9 @@ parameters: vf_module_id: vFirewallCL dcae_collector_ip: 10.0.4.1 dcae_collector_port: 8081 - repo_url_blob: https://nexus.onap.org/content/sites/raw repo_url_artifacts: https://nexus.onap.org/content/repositories/releases demo_artifacts_version: 1.3.0-SNAPSHOT - install_script_version: 1.2.1 + install_script_version: 1.3.0-SNAPSHOT key_name: vfw_key pub_key: PUT YOUR KEY HERE cloud_env: PUT openstack OR rackspace HERE diff --git a/heat/vFWCL/vFWSNK/base_vfw.yaml b/heat/vFWCL/vFWSNK/base_vfw.yaml index fe7f8dc6..0164f5b1 100644 --- a/heat/vFWCL/vFWSNK/base_vfw.yaml +++ b/heat/vFWCL/vFWSNK/base_vfw.yaml @@ -137,10 +137,6 @@ parameters: type: string label: Public key description: Public key to be installed on the compute instance - repo_url_blob: - type: string - label: Repository URL - description: URL of the repository that hosts the demo packages repo_url_artifacts: type: string label: Repository URL @@ -153,6 +149,10 @@ parameters: type: string label: Artifacts version used in demo vnfs description: Artifacts (jar, tar.gz) version used in demo vnfs + nexus_artifact_repo: + type: string + description: Root URL for the Nexus repository for Maven artifacts. + default: "https://nexus.onap.org" cloud_env: type: string label: Cloud environment @@ -245,7 +245,6 @@ resources: params: __dcae_collector_ip__ : { get_param: dcae_collector_ip } __dcae_collector_port__ : { get_param: dcae_collector_port } - __repo_url_blob__ : { get_param: repo_url_blob } __repo_url_artifacts__ : { get_param: repo_url_artifacts } __demo_artifacts_version__ : { get_param: demo_artifacts_version } __install_script_version__ : { get_param: install_script_version } @@ -263,7 +262,6 @@ resources: mkdir /opt/config echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt - echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt echo "__install_script_version__" > /opt/config/install_script_version.txt @@ -276,7 +274,10 @@ resources: echo "__cloud_env__" > /opt/config/cloud_env.txt # Download and run install script - curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_firewall_install.sh -o /opt/v_firewall_install.sh + apt-get -y install unzip + if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi + curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vfw&a=vfw-scripts&e=zip&v=__install_script_version__" -o /opt/vfw-scripts-__install_script_version__.zip + unzip -j /opt/vfw-scripts-__install_script_version__.zip -d /opt v_firewall_install.sh cd /opt chmod +x v_firewall_install.sh ./v_firewall_install.sh @@ -313,7 +314,6 @@ resources: params: __protected_net_gw__: { get_param: vfw_private_ip_1 } __unprotected_net__: { get_param: unprotected_private_net_cidr } - __repo_url_blob__ : { get_param: repo_url_blob } __repo_url_artifacts__ : { get_param: repo_url_artifacts } __install_script_version__ : { get_param: install_script_version } __vsn_private_ip_0__ : { get_param: vsn_private_ip_0 } @@ -328,7 +328,6 @@ resources: mkdir /opt/config echo "__protected_net_gw__" > /opt/config/protected_net_gw.txt echo "__unprotected_net__" > /opt/config/unprotected_net.txt - echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt echo "__install_script_version__" > /opt/config/install_script_version.txt echo "__vsn_private_ip_0__" > /opt/config/vsn_private_ip_0.txt echo "__vsn_private_ip_1__" > /opt/config/vsn_private_ip_1.txt @@ -337,7 +336,10 @@ resources: echo "__cloud_env__" > /opt/config/cloud_env.txt # Download and run install script - curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_sink_install.sh -o /opt/v_sink_install.sh + apt-get -y install unzip + if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi + curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vfw&a=vfw-scripts&e=zip&v=__install_script_version__" -o /opt/vfw-scripts-__install_script_version__.zip + unzip -j /opt/vfw-scripts-__install_script_version__.zip -d /opt v_sink_install.sh cd /opt chmod +x v_sink_install.sh ./v_sink_install.sh diff --git a/heat/vFWCL/vPKG/base_vpkg.env b/heat/vFWCL/vPKG/base_vpkg.env index be1515d9..cf1a7d0c 100644 --- a/heat/vFWCL/vPKG/base_vpkg.env +++ b/heat/vFWCL/vPKG/base_vpkg.env @@ -16,10 +16,9 @@ parameters: vpg_name_0: zdfw1fwl01pgn01 vnf_id: vPNG_Firewall_demo_app vf_module_id: vTrafficPNG - repo_url_blob: https://nexus.onap.org/content/sites/raw repo_url_artifacts: https://nexus.onap.org/content/repositories/releases demo_artifacts_version: 1.3.0-SNAPSHOT - install_script_version: 1.2.1 + install_script_version: 1.3.0-SNAPSHOT key_name: vfw_key pub_key: PUT YOUR PUBLIC KEY HERE cloud_env: PUT openstack OR rackspace HERE diff --git a/heat/vFWCL/vPKG/base_vpkg.yaml b/heat/vFWCL/vPKG/base_vpkg.yaml index 160331bf..106426b2 100644 --- a/heat/vFWCL/vPKG/base_vpkg.yaml +++ b/heat/vFWCL/vPKG/base_vpkg.yaml @@ -109,10 +109,6 @@ parameters: type: string label: Public key description: Public key to be installed on the compute instance - repo_url_blob: - type: string - label: Repository URL - description: URL of the repository that hosts the demo packages repo_url_artifacts: type: string label: Repository URL @@ -125,6 +121,10 @@ parameters: type: string label: Artifacts version used in demo vnfs description: Artifacts (jar, tar.gz) version used in demo vnfs + nexus_artifact_repo: + type: string + description: Root URL for the Nexus repository for Maven artifacts. + default: "https://nexus.onap.org" cloud_env: type: string label: Cloud environment @@ -187,7 +187,6 @@ resources: __fw_ipaddr__: { get_param: vfw_private_ip_0 } __protected_net_cidr__: { get_param: protected_private_net_cidr } __sink_ipaddr__: { get_param: vsn_private_ip_0 } - __repo_url_blob__ : { get_param: repo_url_blob } __repo_url_artifacts__ : { get_param: repo_url_artifacts } __demo_artifacts_version__ : { get_param: demo_artifacts_version } __install_script_version__ : { get_param: install_script_version } @@ -204,7 +203,6 @@ resources: echo "__fw_ipaddr__" > /opt/config/fw_ipaddr.txt echo "__protected_net_cidr__" > /opt/config/protected_net_cidr.txt echo "__sink_ipaddr__" > /opt/config/sink_ipaddr.txt - echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt echo "__install_script_version__" > /opt/config/install_script_version.txt @@ -215,7 +213,10 @@ resources: echo "__cloud_env__" > /opt/config/cloud_env.txt # Download and run install script - curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh + apt-get -y install unzip + if [[ "__install_script_version__" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi + curl -k -L "__nexus_artifact_repo__/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vfw&a=vfw-scripts&e=zip&v=__install_script_version__" -o /opt/vfw-scripts-__install_script_version__.zip + unzip -j /opt/vfw-scripts-__install_script_version__.zip -d /opt v_packetgen_install.sh cd /opt chmod +x v_packetgen_install.sh ./v_packetgen_install.sh -- cgit 1.2.3-korg