Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 1 | ########################################################################## |
| 2 | # |
| 3 | #==================LICENSE_START========================================== |
| 4 | # |
| 5 | # |
| 6 | # Copyright © 2017 AT&T Intellectual Property. All rights reserved. |
| 7 | # |
| 8 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | # you may not use this file except in compliance with the License. |
| 10 | # You may obtain a copy of the License at |
| 11 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | # |
| 13 | # Unless required by applicable law or agreed to in writing, software |
| 14 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | # See the License for the specific language governing permissions and |
| 17 | # limitations under the License. |
| 18 | # |
| 19 | #==================LICENSE_END============================================ |
| 20 | # |
| 21 | # ECOMP is a trademark and service mark of AT&T Intellectual Property. |
| 22 | # |
| 23 | ########################################################################## |
| 24 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 25 | heat_template_version: 2013-05-23 |
| 26 | |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 27 | description: Heat template to deploy vLoadBalancer/vDNS demo app for ONAP |
| 28 | |
| 29 | ############## |
| 30 | # # |
| 31 | # PARAMETERS # |
| 32 | # # |
| 33 | ############## |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 34 | |
| 35 | parameters: |
| 36 | vlb_image_name: |
| 37 | type: string |
| 38 | label: Image name or ID |
| 39 | description: Image to be used for compute instance |
| 40 | vlb_flavor_name: |
| 41 | type: string |
| 42 | label: Flavor |
| 43 | description: Type of instance (flavor) to be used |
| 44 | public_net_id: |
| 45 | type: string |
| 46 | label: Public network name or ID |
| 47 | description: Public network that enables remote connection to VNF |
| 48 | vlb_private_net_id: |
| 49 | type: string |
| 50 | label: vLoadBalancer private network name or ID |
| 51 | description: Private network that connects vLoadBalancer with vDNSs |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 52 | pktgen_private_net_id: |
| 53 | type: string |
| 54 | label: vPacketGen private network name or ID |
| 55 | description: Private network that connects vLoadBalancer with vPacketGen |
| 56 | onap_private_net_id: |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 57 | type: string |
| 58 | label: ECOMP management network name or ID |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 59 | description: Private network that connects ONAP component and the VNF |
| 60 | onap_private_subnet_id: |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 61 | type: string |
| 62 | label: ECOMP management sub-network name or ID |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 63 | description: Private sub-network that connects ONAP component and the VNF |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 64 | vlb_private_net_cidr: |
| 65 | type: string |
| 66 | label: vLoadBalancer private network CIDR |
| 67 | description: The CIDR of the vLoadBalancer private network |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 68 | pktgen_private_net_cidr: |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 69 | type: string |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 70 | label: vPacketGen private network CIDR |
| 71 | description: The CIDR of the vPacketGen private network |
| 72 | onap_private_net_cidr: |
| 73 | type: string |
| 74 | label: ONAP private network CIDR |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 75 | description: The CIDR of the protected private network |
| 76 | vlb_private_ip_0: |
| 77 | type: string |
| 78 | label: vLoadBalancer private IP address towards the private network |
| 79 | description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs |
| 80 | vlb_private_ip_1: |
| 81 | type: string |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 82 | label: vLoadBalancer private IP address towards the ONAP management network |
| 83 | description: Private IP address that is assigned to the vLoadBalancer to communicate with ONAP components |
| 84 | vlb_private_ip_2: |
| 85 | type: string |
| 86 | label: vLoadBalancer private IP address towards the vPacketGen network |
| 87 | description: Private IP address that is assigned to the vLoadBalancer to communicate with vPacketGen |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 88 | vdns_private_ip_0: |
| 89 | type: string |
| 90 | label: vDNS private IP address towards the private network |
| 91 | description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer |
| 92 | vdns_private_ip_1: |
| 93 | type: string |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 94 | label: vDNS private IP address towards the ONAP management network |
| 95 | description: Private IP address that is assigned to the vDNS to communicate with ONAP components |
| 96 | vpg_private_ip_0: |
| 97 | type: string |
| 98 | label: vPacketGen private IP address towards the vPacketGen private network |
| 99 | description: Private IP address that is assigned to the vPacketGen to communicate with the vLoadBalancer |
| 100 | vpg_private_ip_1: |
| 101 | type: string |
| 102 | label: vPacketGen private IP address towards the ONAP management network |
| 103 | description: Private IP address that is assigned to the vPacketGen to communicate with ONAP components |
| 104 | vip: |
| 105 | type: string |
| 106 | label: Virtual Private IP of the vLoadBalancer |
| 107 | description: Virtual Private IP that is assigned to the vLoadBalancer's VPP layer |
| 108 | gre_ipaddr: |
| 109 | type: string |
| 110 | label: IP Address of the GRE tunnel |
| 111 | description: IP address assigned to the GRE tunnel on the vLoadBalancer |
| 112 | pg_int: |
| 113 | type: string |
| 114 | label: IP Address of the output vPacketGen interface |
| 115 | description: IP address assigned to the output interface of the vPacketGen's VPP layer |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 116 | vlb_name_0: |
| 117 | type: string |
| 118 | label: vLoadBalancer name |
| 119 | description: Name of the vLoadBalancer |
| 120 | vdns_name_0: |
| 121 | type: string |
| 122 | label: vDNS name |
| 123 | description: Name of the vDNS |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 124 | vpg_name_0: |
| 125 | type: string |
| 126 | label: vPKTGEN name |
| 127 | description: Name of the vPKTGEN |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 128 | vnf_id: |
| 129 | type: string |
| 130 | label: VNF ID |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 131 | description: The VNF ID is provided by ONAP |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 132 | vf_module_id: |
| 133 | type: string |
| 134 | label: vFirewall module ID |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 135 | description: The vLoadBalancer Module ID is provided by ONAP |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 136 | dcae_collector_ip: |
| 137 | type: string |
| 138 | label: DCAE collector IP address |
| 139 | description: IP address of the DCAE collector |
| 140 | dcae_collector_port: |
| 141 | type: string |
| 142 | label: DCAE collector port |
| 143 | description: Port of the DCAE collector |
| 144 | key_name: |
| 145 | type: string |
| 146 | label: Key pair name |
| 147 | description: Public/Private key pair name |
| 148 | pub_key: |
| 149 | type: string |
| 150 | label: Public key |
| 151 | description: Public key to be installed on the compute instance |
jf9860 | 9ab2634 | 2017-02-28 15:07:36 -0500 | [diff] [blame] | 152 | repo_url_blob: |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 153 | type: string |
| 154 | label: Repository URL |
| 155 | description: URL of the repository that hosts the demo packages |
jf9860 | 9ab2634 | 2017-02-28 15:07:36 -0500 | [diff] [blame] | 156 | repo_url_artifacts: |
| 157 | type: string |
| 158 | label: Repository URL |
| 159 | description: URL of the repository that hosts the demo packages |
| 160 | demo_artifacts_version: |
| 161 | type: string |
| 162 | label: Artifacts version used in demo vnfs |
| 163 | description: Artifacts (jar, tar.gz) version used in demo vnfs |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 164 | install_script_version: |
| 165 | type: string |
| 166 | label: Installation script version number |
| 167 | description: Version number of the scripts that install the vFW demo app |
| 168 | cloud_env: |
| 169 | type: string |
| 170 | label: Cloud environment |
| 171 | description: Cloud environment (e.g., openstack, rackspace) |
| 172 | |
| 173 | ############# |
| 174 | # # |
| 175 | # RESOURCES # |
| 176 | # # |
| 177 | ############# |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 178 | |
| 179 | resources: |
jf9860 | 9ab2634 | 2017-02-28 15:07:36 -0500 | [diff] [blame] | 180 | |
| 181 | random-str: |
| 182 | type: OS::Heat::RandomString |
| 183 | properties: |
| 184 | length: 4 |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 185 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 186 | my_keypair: |
| 187 | type: OS::Nova::KeyPair |
| 188 | properties: |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 189 | name: |
jf9860 | 9ab2634 | 2017-02-28 15:07:36 -0500 | [diff] [blame] | 190 | str_replace: |
| 191 | template: base_rand |
| 192 | params: |
| 193 | base: { get_param: key_name } |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 194 | rand: { get_resource: random-str } |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 195 | public_key: { get_param: pub_key } |
| 196 | save_private_key: false |
| 197 | |
| 198 | vlb_private_network: |
| 199 | type: OS::Neutron::Net |
| 200 | properties: |
| 201 | name: { get_param: vlb_private_net_id } |
| 202 | |
| 203 | vlb_private_subnet: |
| 204 | type: OS::Neutron::Subnet |
| 205 | properties: |
| 206 | name: { get_param: vlb_private_net_id } |
| 207 | network_id: { get_resource: vlb_private_network } |
| 208 | cidr: { get_param: vlb_private_net_cidr } |
| 209 | |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 210 | pktgen_private_network: |
| 211 | type: OS::Neutron::Net |
| 212 | properties: |
| 213 | name: { get_param: pktgen_private_net_id } |
| 214 | |
| 215 | pktgen_private_subnet: |
| 216 | type: OS::Neutron::Subnet |
| 217 | properties: |
| 218 | name: { get_param: pktgen_private_net_id } |
| 219 | network_id: { get_resource: pktgen_private_network } |
| 220 | cidr: { get_param: pktgen_private_net_cidr } |
| 221 | |
| 222 | vlb_private_0_port: |
| 223 | type: OS::Neutron::Port |
| 224 | properties: |
| 225 | network: { get_resource: vlb_private_network } |
| 226 | fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}] |
| 227 | |
| 228 | vlb_private_1_port: |
| 229 | type: OS::Neutron::Port |
| 230 | properties: |
| 231 | network: { get_param: onap_private_net_id } |
| 232 | fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_1 }}] |
| 233 | |
| 234 | vlb_private_2_port: |
| 235 | type: OS::Neutron::Port |
| 236 | properties: |
| 237 | network: { get_resource: pktgen_private_network } |
| 238 | fixed_ips: [{"subnet": { get_resource: pktgen_private_subnet }, "ip_address": { get_param: vlb_private_ip_2 }}] |
| 239 | |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 240 | vlb_0: |
| 241 | type: OS::Nova::Server |
| 242 | properties: |
| 243 | image: { get_param: vlb_image_name } |
| 244 | flavor: { get_param: vlb_flavor_name } |
| 245 | name: { get_param: vlb_name_0 } |
| 246 | key_name: { get_resource: my_keypair } |
| 247 | networks: |
| 248 | - network: { get_param: public_net_id } |
| 249 | - port: { get_resource: vlb_private_0_port } |
| 250 | - port: { get_resource: vlb_private_1_port } |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 251 | - port: { get_resource: vlb_private_2_port } |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 252 | metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} |
| 253 | user_data_format: RAW |
| 254 | user_data: |
| 255 | str_replace: |
| 256 | params: |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 257 | __dcae_collector_ip__: { get_param: dcae_collector_ip } |
| 258 | __dcae_collector_port__: { get_param: dcae_collector_port } |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 259 | __ip_to_dns_net__: { get_param: vlb_private_ip_0 } |
| 260 | __ip_to_pktgen_net__: { get_param: vlb_private_ip_2 } |
| 261 | __vip__: { get_param: vip } |
| 262 | __gre_ipaddr__: { get_param: gre_ipaddr } |
| 263 | __pktgen_ipaddr__: { get_param: vpg_private_ip_0 } |
| 264 | __oam_private_ipaddr__: { get_param: vlb_private_ip_1 } |
| 265 | __repo_url_blob__: { get_param: repo_url_blob } |
| 266 | __repo_url_artifacts__: { get_param: repo_url_artifacts } |
| 267 | __demo_artifacts_version__: { get_param: demo_artifacts_version } |
| 268 | __install_script_version__: { get_param: install_script_version } |
| 269 | __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr } |
| 270 | __onap_private_net_cidr__: { get_param: onap_private_net_cidr } |
| 271 | __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr } |
| 272 | __pktgen_mac__: { get_attr: [vpg_private_0_port, mac_address] } |
| 273 | __cloud_env__: { get_param: cloud_env } |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 274 | template: | |
| 275 | #!/bin/bash |
| 276 | |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 277 | # Create configuration files |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 278 | mkdir /opt/config |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 279 | echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt |
| 280 | echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt |
| 281 | echo "__ip_to_dns_net__" > /opt/config/ip_to_dns_net.txt |
| 282 | echo "__ip_to_pktgen_net__" > /opt/config/ip_to_pktgen_net.txt |
| 283 | echo "__vip__" > /opt/config/vip.txt |
| 284 | echo "__gre_ipaddr__" > /opt/config/gre_ipaddr.txt |
| 285 | echo "__pktgen_ipaddr__" > /opt/config/pktgen_ipaddr.txt |
| 286 | echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt |
| 287 | echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt |
| 288 | echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt |
| 289 | echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt |
| 290 | echo "__install_script_version__" > /opt/config/install_script_version.txt |
| 291 | echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt |
| 292 | echo "__pktgen_private_net_cidr__" > /opt/config/pktgen_private_net_cidr.txt |
| 293 | echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt |
| 294 | echo "__pktgen_mac__" > /opt/config/pktgen_mac.txt |
| 295 | echo "__cloud_env__" > /opt/config/cloud_env.txt |
| 296 | |
| 297 | # Download and run install script |
| 298 | curl -k __repo_url_blob__/org.onap.demo/vnfs/vlb/__install_script_version__/v_lb_install.sh -o /opt/v_lb_install.sh |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 299 | cd /opt |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 300 | chmod +x v_lb_install.sh |
| 301 | ./v_lb_install.sh |
jf9860 | 9ab2634 | 2017-02-28 15:07:36 -0500 | [diff] [blame] | 302 | |
jf9860 | 9ab2634 | 2017-02-28 15:07:36 -0500 | [diff] [blame] | 303 | |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 304 | vdns_private_0_port: |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 305 | type: OS::Neutron::Port |
| 306 | properties: |
| 307 | network: { get_resource: vlb_private_network } |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 308 | fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 309 | |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 310 | vdns_private_1_port: |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 311 | type: OS::Neutron::Port |
| 312 | properties: |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 313 | network: { get_param: onap_private_net_id } |
| 314 | fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 315 | |
| 316 | vdns_0: |
| 317 | type: OS::Nova::Server |
| 318 | properties: |
| 319 | image: { get_param: vlb_image_name } |
| 320 | flavor: { get_param: vlb_flavor_name } |
| 321 | name: { get_param: vdns_name_0 } |
| 322 | key_name: { get_resource: my_keypair } |
| 323 | networks: |
| 324 | - network: { get_param: public_net_id } |
| 325 | - port: { get_resource: vdns_private_0_port } |
| 326 | - port: { get_resource: vdns_private_1_port } |
| 327 | metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} |
| 328 | user_data_format: RAW |
| 329 | user_data: |
| 330 | str_replace: |
| 331 | params: |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 332 | __lb_oam_int__: { get_param: vlb_private_ip_1 } |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 333 | __lb_private_ipaddr__: { get_param: vlb_private_ip_0 } |
| 334 | __local_private_ipaddr__: { get_param: vdns_private_ip_0 } |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 335 | __oam_private_ipaddr__: { get_param: vdns_private_ip_1 } |
| 336 | __repo_url_blob__: { get_param: repo_url_blob } |
| 337 | __repo_url_artifacts__: { get_param: repo_url_artifacts } |
| 338 | __demo_artifacts_version__: { get_param: demo_artifacts_version } |
| 339 | __install_script_version__: { get_param: install_script_version } |
| 340 | __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr } |
| 341 | __onap_private_net_cidr__: { get_param: onap_private_net_cidr } |
| 342 | __cloud_env__: { get_param: cloud_env } |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 343 | template: | |
| 344 | #!/bin/bash |
| 345 | |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 346 | # Create configuration files |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 347 | mkdir /opt/config |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 348 | echo "__lb_oam_int__" > /opt/config/lb_oam_int.txt |
| 349 | echo "__lb_private_ipaddr__" > /opt/config/lb_private_ipaddr.txt |
| 350 | echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt |
| 351 | echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt |
| 352 | echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt |
| 353 | echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt |
| 354 | echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt |
| 355 | echo "__install_script_version__" > /opt/config/install_script_version.txt |
| 356 | echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt |
| 357 | echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt |
| 358 | echo "__cloud_env__" > /opt/config/cloud_env.txt |
| 359 | |
| 360 | # Download and run install script |
| 361 | curl -k __repo_url_blob__/org.onap.demo/vnfs/vlb/__install_script_version__/v_dns_install.sh -o /opt/v_dns_install.sh |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 362 | cd /opt |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 363 | chmod +x v_dns_install.sh |
| 364 | ./v_dns_install.sh |
jf9860 | 9ab2634 | 2017-02-28 15:07:36 -0500 | [diff] [blame] | 365 | |
jf9860 | 9ab2634 | 2017-02-28 15:07:36 -0500 | [diff] [blame] | 366 | |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 367 | vpg_private_0_port: |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 368 | type: OS::Neutron::Port |
| 369 | properties: |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 370 | network: { get_resource: pktgen_private_network } |
| 371 | fixed_ips: [{"subnet": { get_resource: pktgen_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}] |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 372 | |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 373 | vpg_private_1_port: |
DR695H | ccff30b | 2017-02-17 18:44:24 -0500 | [diff] [blame] | 374 | type: OS::Neutron::Port |
| 375 | properties: |
Jerry Flood | c8bd427 | 2017-10-19 13:43:43 -0400 | [diff] [blame^] | 376 | network: { get_param: onap_private_net_id } |
| 377 | fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}] |
| 378 | |
| 379 | vpg_0: |
| 380 | type: OS::Nova::Server |
| 381 | properties: |
| 382 | image: { get_param: vlb_image_name } |
| 383 | flavor: { get_param: vlb_flavor_name } |
| 384 | name: { get_param: vpg_name_0 } |
| 385 | key_name: { get_resource: my_keypair } |
| 386 | networks: |
| 387 | - network: { get_param: public_net_id } |
| 388 | - port: { get_resource: vpg_private_0_port } |
| 389 | - port: { get_resource: vpg_private_1_port } |
| 390 | user_data_format: RAW |
| 391 | user_data: |
| 392 | str_replace: |
| 393 | params: |
| 394 | __repo_url_blob__: { get_param: repo_url_blob } |
| 395 | __repo_url_artifacts__: { get_param: repo_url_artifacts } |
| 396 | __local_private_ipaddr__: { get_param: vpg_private_ip_0 } |
| 397 | __oam_private_ipaddr__: { get_param: vpg_private_ip_1 } |
| 398 | __onap_private_net_cidr__: { get_param: onap_private_net_cidr } |
| 399 | __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr } |
| 400 | __vlb_ipaddr__: { get_param: vlb_private_ip_2 } |
| 401 | __demo_artifacts_version__: { get_param: demo_artifacts_version } |
| 402 | __install_script_version__: { get_param: install_script_version } |
| 403 | __pg_int__: { get_param: pg_int } |
| 404 | __vlb_mac__: { get_attr: [vlb_private_2_port, mac_address] } |
| 405 | __cloud_env__: { get_param: cloud_env } |
| 406 | template: | |
| 407 | #!/bin/bash |
| 408 | |
| 409 | # Create configuration files |
| 410 | mkdir /opt/config |
| 411 | echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt |
| 412 | echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt |
| 413 | echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt |
| 414 | echo "__pktgen_private_net_cidr__" > /opt/config/pktgen_private_net_cidr.txt |
| 415 | echo "__vlb_ipaddr__" > /opt/config/vlb_ipaddr.txt |
| 416 | echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt |
| 417 | echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt |
| 418 | echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt |
| 419 | echo "__install_script_version__" > /opt/config/install_script_version.txt |
| 420 | echo "__pg_int__" > /opt/config/pg_int.txt |
| 421 | echo "__vlb_mac__" > /opt/config/vlb_mac.txt |
| 422 | echo "__cloud_env__" > /opt/config/cloud_env.txt |
| 423 | |
| 424 | # Download and run install script |
| 425 | curl -k __repo_url_blob__/org.onap.demo/vnfs/vlb/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh |
| 426 | cd /opt |
| 427 | chmod +x v_packetgen_install.sh |
| 428 | ./v_packetgen_install.sh |