From 59c11ee674e71c5930d9b34a2615b37451d72989 Mon Sep 17 00:00:00 2001 From: Marco Platania Date: Tue, 23 May 2017 13:59:22 -0400 Subject: consolidate rackspace and openstack pktgen for vLB Change-Id: Ic8ff995cc4c5ff71e2e2f0ee14661a40b84dbafc Signed-off-by: Marco Platania --- heat/vLB/packet_gen_vlb.env | 13 +++ heat/vLB/packet_gen_vlb.yaml | 146 +++++++++++++++++++++++++++++++++ heat/vLB/packet_gen_vlb_openstack.env | 14 ---- heat/vLB/packet_gen_vlb_openstack.yaml | 146 --------------------------------- heat/vLB/packet_gen_vlb_rackspace.env | 12 --- heat/vLB/packet_gen_vlb_rackspace.yaml | 140 ------------------------------- 6 files changed, 159 insertions(+), 312 deletions(-) create mode 100644 heat/vLB/packet_gen_vlb.env create mode 100644 heat/vLB/packet_gen_vlb.yaml delete mode 100644 heat/vLB/packet_gen_vlb_openstack.env delete mode 100644 heat/vLB/packet_gen_vlb_openstack.yaml delete mode 100644 heat/vLB/packet_gen_vlb_rackspace.env delete mode 100644 heat/vLB/packet_gen_vlb_rackspace.yaml (limited to 'heat/vLB') diff --git a/heat/vLB/packet_gen_vlb.env b/heat/vLB/packet_gen_vlb.env new file mode 100644 index 00000000..362b8a99 --- /dev/null +++ b/heat/vLB/packet_gen_vlb.env @@ -0,0 +1,13 @@ +parameters: + vpg_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM) + vpg_flavor_name: 4 GB General Purpose v1 + public_net_id: 00000000-0000-0000-0000-000000000000 + vlb_ipaddr: INSERT THE PUBLIC ADDRESS OF THE vLB HERE + vpg_name_0: ziad1vdnspg01pg01 + repo_url_blob: https://nexus.onap.org/content/sites/raw + repo_url_artifacts: https://nexus.onap.org/content/groups/staging + demo_artifacts_version: 1.1.0 + install_script_version: 1.1.0-SNAPSHOT + key_name: dns_packetgen_key + pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN + cloud_env: PUT THE CLOUD ENVIRONMENT HERE (rackspace or openstack) diff --git a/heat/vLB/packet_gen_vlb.yaml b/heat/vLB/packet_gen_vlb.yaml new file mode 100644 index 00000000..7a63ef35 --- /dev/null +++ b/heat/vLB/packet_gen_vlb.yaml @@ -0,0 +1,146 @@ +########################################################################## +# +#==================LICENSE_START========================================== +# +# +# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#==================LICENSE_END============================================ +# +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +# +########################################################################## + +heat_template_version: 2013-05-23 + +description: Heat template to deploy a packet generator for the vLoadBalancer/vDNS demo app for ONAP + +############## +# # +# PARAMETERS # +# # +############## + +parameters: + public_net_id: + type: string + label: Public network name or ID + description: Public network that enables remote connection to VNF + vpg_image_name: + type: string + label: Image name or ID + description: Image to be used for compute instance + vpg_flavor_name: + type: string + label: Flavor + description: Type of instance (flavor) to be used + vpg_name_0: + type: string + label: vPacketGenerator name + description: Name of the vPacketGenerator + key_name: + type: string + label: Key pair name + description: Public/Private key pair name + pub_key: + 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 + vlb_ipaddr: + type: string + label: Public IP of the vLoadBalancer to which we want to send traffic + description: Public IP of the vLoadBalancer to which we want to send traffic + install_script_version: + type: string + label: Installation script version number + description: Version number of the scripts that install the vFW demo app + demo_artifacts_version: + type: string + label: Artifacts version used in demo vnfs + description: Artifacts (jar, tar.gz) version used in demo vnfs + cloud_env: + type: string + label: Cloud environment + description: Cloud environment (e.g., openstack, rackspace) + +############# +# # +# RESOURCES # +# # +############# + +resources: + + random-str: + type: OS::Heat::RandomString + properties: + length: 4 + + my_keypair: + type: OS::Nova::KeyPair + properties: + name: + str_replace: + template: base_rand + params: + base: { get_param: key_name } + rand: { get_resource: random-str } + public_key: { get_param: pub_key } + save_private_key: false + + + vpg_0: + type: OS::Nova::Server + properties: + image: { get_param: vpg_image_name } + flavor: { get_param: vpg_flavor_name } + name: { get_param: vpg_name_0 } + key_name: { get_resource: my_keypair } + networks: + - network: { get_param: public_net_id } + user_data_format: RAW + user_data: + str_replace: + params: + __repo_url_blob__ : { get_param: repo_url_blob } + __repo_url_artifacts__ : { get_param: repo_url_artifacts } + __vlb_ipaddr__: { get_param: vlb_ipaddr } + __demo_artifacts_version__ : { get_param: demo_artifacts_version } + __install_script_version__ : { get_param: install_script_version } + __cloud_env__: { get_param: cloud_env } + template: | + #!/bin/bash + + # Create configuration files + mkdir /opt/config + echo "__vlb_ipaddr__" > /opt/config/vlb_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 "__cloud_env__" > /opt/config/cloud_env.txt + + # Download and run install script + curl -k __repo_url_blob__/org.openecomp.demo/vnfs/vlb/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh + cd /opt + chmod +x v_packetgen_install.sh + ./v_packetgen_install.sh \ No newline at end of file diff --git a/heat/vLB/packet_gen_vlb_openstack.env b/heat/vLB/packet_gen_vlb_openstack.env deleted file mode 100644 index 724b0eed..00000000 --- a/heat/vLB/packet_gen_vlb_openstack.env +++ /dev/null @@ -1,14 +0,0 @@ -parameters: - vpg_image_name: PUT THE IMAGE NAME HERE - vpg_flavor_name: PUT THE FLAVOR NAME HERE - public_net_id: PUT THE NETWORK ID HERE - vlb_ipaddr: 135.207.129.131 - vpg_name_0: ziad1vdnspg01pg01 - onap_private_net_id: PUT THE ONAP PRIVATE NETWORK NAME HERE - onap_private_subnet_id: PUT THE ONAP PRIVATE NETWORK NAME HERE - repo_url_blob: https://nexus.onap.org/content/sites/raw - repo_url_artifacts: https://nexus.onap.org/content/groups/staging - demo_artifacts_version: 1.1.0 - install_script_version: 1.1.0-SNAPSHOT - key_name: pgforvdnsdemo_key - pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN diff --git a/heat/vLB/packet_gen_vlb_openstack.yaml b/heat/vLB/packet_gen_vlb_openstack.yaml deleted file mode 100644 index d9688075..00000000 --- a/heat/vLB/packet_gen_vlb_openstack.yaml +++ /dev/null @@ -1,146 +0,0 @@ -########################################################################## -# -#==================LICENSE_START========================================== -# -# -# Copyright © 2017 AT&T Intellectual Property. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -#==================LICENSE_END============================================ -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# -########################################################################## - -heat_template_version: 2013-05-23 -description: Heat template to deploy a packet generator for the vLoadBalancer/vDNS demo app for ONAP - -############## -# # -# PARAMETERS # -# # -############## - -parameters: - public_net_id: - type: string - label: Public network name or ID - description: Public network that enables remote connection to VNF - vpg_image_name: - type: string - label: Image name or ID - description: Image to be used for compute instance - vpg_flavor_name: - type: string - label: Flavor - description: Type of instance (flavor) to be used - vpg_name_0: - type: string - label: vPacketGenerator name - description: Name of the vPacketGenerator - key_name: - type: string - label: Key pair name - description: Public/Private key pair name - pub_key: - 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 - vlb_ipaddr: - type: string - label: Public IP of the vLoadBalancer to which we want to send traffic - description: Public IP of the vLoadBalancer to which we want to send traffic - demo_artifacts_version: - type: string - label: Artifacts version used in demo vnfs - description: Artifacts (jar, tar.gz) version used in demo vnfs - install_script_version: - type: string - label: Installation script version number - description: Version number of the scripts that install the vFW demo app - onap_private_net_id: - type: string - label: ONAP management network name or ID - description: Private network that connects ONAP component and the VNF - onap_private_subnet_id: - type: string - label: ONAP management sub-network name or ID - description: Private sub-network that connects ONAP component and the VNF - -############# -# # -# RESOURCES # -# # -############# - -resources: - - random-str: - type: OS::Heat::RandomString - properties: - length: 4 - - my_keypair: - type: OS::Nova::KeyPair - properties: - name: - str_replace: - template: base_rand - params: - base: { get_param: key_name } - rand: { get_resource: random-str } - public_key: { get_param: pub_key } - save_private_key: false - - vpg_0: - type: OS::Nova::Server - properties: - image: { get_param: vpg_image_name } - flavor: { get_param: vpg_flavor_name } - name: { get_param: vpg_name_0 } - key_name: { get_resource: my_keypair } - networks: - - network: { get_param: public_net_id } - user_data_format: RAW - user_data: - str_replace: - params: - __repo_url_blob__ : { get_param: repo_url_blob } - __repo_url_artifacts__ : { get_param: repo_url_artifacts } - __vlb_ipaddr__: { get_param: vlb_ipaddr } - __demo_artifacts_version__ : { get_param: demo_artifacts_version } - __install_script_version__ : { get_param: install_script_version } - template: | - #!/bin/bash - - # Create configuration files - mkdir /opt/config - echo "__vlb_ipaddr__" > /opt/config/vlb_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 - - # Download and run install script - curl -k __repo_url_blob__/org.openecomp.demo/vnfs/vlb/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh - cd /opt - chmod +x v_packetgen_install.sh - ./v_packetgen_install.sh \ No newline at end of file diff --git a/heat/vLB/packet_gen_vlb_rackspace.env b/heat/vLB/packet_gen_vlb_rackspace.env deleted file mode 100644 index 91002fed..00000000 --- a/heat/vLB/packet_gen_vlb_rackspace.env +++ /dev/null @@ -1,12 +0,0 @@ -parameters: - vpg_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM) - vpg_flavor_name: 4 GB General Purpose v1 - public_net_id: 00000000-0000-0000-0000-000000000000 - vlb_ipaddr: INSERT THE PUBLIC ADDRESS OF THE vLB HERE - vpg_name_0: ziad1vdnspg01pg01 - repo_url_blob: https://nexus.onap.org/content/sites/raw - repo_url_artifacts: https://nexus.onap.org/content/groups/staging - demo_artifacts_version: 1.1.0 - install_script_version: 1.1.0-SNAPSHOT - key_name: dns_packetgen_key - pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN diff --git a/heat/vLB/packet_gen_vlb_rackspace.yaml b/heat/vLB/packet_gen_vlb_rackspace.yaml deleted file mode 100644 index fea9a770..00000000 --- a/heat/vLB/packet_gen_vlb_rackspace.yaml +++ /dev/null @@ -1,140 +0,0 @@ -########################################################################## -# -#==================LICENSE_START========================================== -# -# -# Copyright © 2017 AT&T Intellectual Property. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -#==================LICENSE_END============================================ -# -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -# -########################################################################## - -heat_template_version: 2013-05-23 - -description: Heat template to deploy a packet generator for the vLoadBalancer/vDNS demo app for ONAP - -############## -# # -# PARAMETERS # -# # -############## - -parameters: - public_net_id: - type: string - label: Public network name or ID - description: Public network that enables remote connection to VNF - vpg_image_name: - type: string - label: Image name or ID - description: Image to be used for compute instance - vpg_flavor_name: - type: string - label: Flavor - description: Type of instance (flavor) to be used - vpg_name_0: - type: string - label: vPacketGenerator name - description: Name of the vPacketGenerator - key_name: - type: string - label: Key pair name - description: Public/Private key pair name - pub_key: - 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 - vlb_ipaddr: - type: string - label: Public IP of the vLoadBalancer to which we want to send traffic - description: Public IP of the vLoadBalancer to which we want to send traffic - install_script_version: - type: string - label: Installation script version number - description: Version number of the scripts that install the vFW demo app - demo_artifacts_version: - type: string - label: Artifacts version used in demo vnfs - description: Artifacts (jar, tar.gz) version used in demo vnfs - -############# -# # -# RESOURCES # -# # -############# - -resources: - - random-str: - type: OS::Heat::RandomString - properties: - length: 4 - - my_keypair: - type: OS::Nova::KeyPair - properties: - name: - str_replace: - template: base_rand - params: - base: { get_param: key_name } - rand: { get_resource: random-str } - public_key: { get_param: pub_key } - save_private_key: false - - - vpg_0: - type: OS::Nova::Server - properties: - image: { get_param: vpg_image_name } - flavor: { get_param: vpg_flavor_name } - name: { get_param: vpg_name_0 } - key_name: { get_resource: my_keypair } - networks: - - network: { get_param: public_net_id } - user_data_format: RAW - user_data: - str_replace: - params: - __repo_url_blob__ : { get_param: repo_url_blob } - __repo_url_artifacts__ : { get_param: repo_url_artifacts } - __vlb_ipaddr__: { get_param: vlb_ipaddr } - __demo_artifacts_version__ : { get_param: demo_artifacts_version } - __install_script_version__ : { get_param: install_script_version } - template: | - #!/bin/bash - - # Create configuration files - mkdir /opt/config - echo "__vlb_ipaddr__" > /opt/config/vlb_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 - - # Download and run install script - curl -k __repo_url_blob__/org.openecomp.demo/vnfs/vlb/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh - cd /opt - chmod +x v_packetgen_install.sh - ./v_packetgen_install.sh \ No newline at end of file -- cgit 1.2.3-korg