X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=heat%2FvFW%2Fbase_vfw.yaml;h=8df049565a161f1b9dfe3c765144c3e6381a92d1;hb=503068c084efe36f2349413679a3f3602641b094;hp=ace7c5e1706eef8cea120c19fefe91337c9a5c42;hpb=c7568d108813e95161412d907145721fedb6470c;p=demo.git diff --git a/heat/vFW/base_vfw.yaml b/heat/vFW/base_vfw.yaml index ace7c5e1..8df04956 100644 --- a/heat/vFW/base_vfw.yaml +++ b/heat/vFW/base_vfw.yaml @@ -137,14 +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 - description: URL of the repository that hosts the demo packages install_script_version: type: string label: Installation script version number @@ -153,10 +145,26 @@ 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 description: Cloud environment (e.g., openstack, rackspace) + sec_group: + type: string + description: ONAP Security Group + sdnc_model_name: + type: string + description: SDNC Model Name metatada + sdnc_model_version: + type: string + description: SDNC Model Version metatada + sdnc_artifact_name: + type: string + description: SDNC Artifact Name metatada ############# # # @@ -210,6 +218,8 @@ resources: properties: network: { get_resource: unprotected_private_network } fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vfw_private_ip_0 }}] + security_groups: + - { get_param: sec_group } vfw_private_1_port: type: OS::Neutron::Port @@ -217,12 +227,16 @@ resources: allowed_address_pairs: [{ "ip_address": { get_param: vpg_private_ip_0 }}] network: { get_resource: protected_private_network } fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vfw_private_ip_1 }}] + security_groups: + - { get_param: sec_group } vfw_private_2_port: type: OS::Neutron::Port properties: network: { get_param: onap_private_net_id } fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vfw_private_ip_2 }}] + security_groups: + - { get_param: sec_group } vfw_0: type: OS::Nova::Server @@ -236,15 +250,13 @@ resources: - port: { get_resource: vfw_private_0_port } - port: { get_resource: vfw_private_1_port } - port: { get_resource: vfw_private_2_port } - metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} + metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }, sdnc_model_name: { get_param: sdnc_model_name }, sdnc_model_version: { get_param: sdnc_model_version }, sdnc_artifact_name: { get_param: sdnc_artifact_name }} user_data_format: RAW user_data: str_replace: 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 } __vfw_private_ip_0__ : { get_param: vfw_private_ip_0 } @@ -254,6 +266,7 @@ resources: __protected_private_net_cidr__ : { get_param: protected_private_net_cidr } __onap_private_net_cidr__ : { get_param: onap_private_net_cidr } __cloud_env__ : { get_param: cloud_env } + __nexus_artifact_repo__: { get_param: nexus_artifact_repo } template: | #!/bin/bash @@ -261,8 +274,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 echo "__vfw_private_ip_0__" > /opt/config/vfw_private_ip_0.txt @@ -272,9 +283,14 @@ resources: echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt echo "__cloud_env__" > /opt/config/cloud_env.txt + echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.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 update + 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 @@ -286,12 +302,16 @@ resources: properties: network: { get_resource: unprotected_private_network } fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}] + security_groups: + - { get_param: sec_group } vpg_private_1_port: type: OS::Neutron::Port properties: network: { get_param: onap_private_net_id } fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}] + security_groups: + - { get_param: sec_group } vpg_0: type: OS::Nova::Server @@ -304,7 +324,7 @@ resources: - network: { get_param: public_net_id } - port: { get_resource: vpg_private_0_port } - port: { get_resource: vpg_private_1_port } - metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} + metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }, sdnc_model_name: { get_param: sdnc_model_name }, sdnc_model_version: { get_param: sdnc_model_version }, sdnc_artifact_name: { get_param: sdnc_artifact_name }} user_data_format: RAW user_data: str_replace: @@ -312,8 +332,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 } __vpg_private_ip_0__ : { get_param: vpg_private_ip_0 } @@ -321,6 +339,7 @@ resources: __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr } __onap_private_net_cidr__ : { get_param: onap_private_net_cidr } __cloud_env__ : { get_param: cloud_env } + __nexus_artifact_repo__: { get_param: nexus_artifact_repo } template: | #!/bin/bash @@ -329,8 +348,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 echo "__vpg_private_ip_0__" > /opt/config/vpg_private_ip_0.txt @@ -338,9 +355,14 @@ resources: echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt echo "__cloud_env__" > /opt/config/cloud_env.txt + echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.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 update + 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 @@ -352,12 +374,16 @@ resources: properties: network: { get_resource: protected_private_network } fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vsn_private_ip_0 }}] + security_groups: + - { get_param: sec_group } vsn_private_1_port: type: OS::Neutron::Port properties: network: { get_param: onap_private_net_id } fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vsn_private_ip_1 }}] + security_groups: + - { get_param: sec_group } vsn_0: type: OS::Nova::Server @@ -370,21 +396,20 @@ resources: - network: { get_param: public_net_id } - port: { get_resource: vsn_private_0_port } - port: { get_resource: vsn_private_1_port } - metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} + metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }, sdnc_model_name: { get_param: sdnc_model_name }, sdnc_model_version: { get_param: sdnc_model_version }, sdnc_artifact_name: { get_param: sdnc_artifact_name }} user_data_format: RAW user_data: str_replace: 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 } __vsn_private_ip_1__ : { get_param: vsn_private_ip_1 } __protected_private_net_cidr__ : { get_param: protected_private_net_cidr } __onap_private_net_cidr__ : { get_param: onap_private_net_cidr } __cloud_env__ : { get_param: cloud_env } + __nexus_artifact_repo__: { get_param: nexus_artifact_repo } template: | #!/bin/bash @@ -392,16 +417,20 @@ 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 echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt echo "__cloud_env__" > /opt/config/cloud_env.txt + echo "__nexus_artifact_repo__" > /opt/config/nexus_artifact_repo.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 update + 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 \ No newline at end of file