1 ##########################################################################
3 #==================LICENSE_START==========================================
6 # Copyright 2017 AT&T Intellectual Property. All rights reserved.
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
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.
19 #==================LICENSE_END============================================
21 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 ##########################################################################
25 heat_template_version: 2013-05-23
27 description: Heat template to deploy vCPE vBRG Emulator (vBRGEMU) for ONAP
29 #######################################################################
33 # 0_port should get IP address from DHCP discover through vBNG #
34 # DCAE is not monitoring the BRGEMULATOR #
35 #######################################################################
40 label: Image name or ID
41 description: Image to be used for compute instance
45 description: Type of instance (flavor) to be used
48 label: Public network name or ID
49 description: Public network that enables remote connection to VNF
50 vbrgemu_bng_private_net_id:
52 label: vBNG private network name or ID
53 description: Private network that connects vBRGEMU to vBNG
54 vbrgemu_bng_private_net_cidr:
56 label: vBNG IN private network CIDR
57 description: The CIDR of the input side of vBNG private network
58 vbrgemu_private_net_id:
60 label: vBRGEMU Home private network name or ID
61 description: Private network that connects vBRGEMU to local devices
62 vbrgemu_private_net_cidr:
64 label: vBRGEMU Home private network CIDR
65 description: The CIDR of the input side of vBRGEMU Home private network
68 label: vGW IN private IP address
69 description: Private IP address towards the BRGEMU-BNG network
73 description: Name of the vGW
77 description: The VNF ID is provided by ONAP
81 description: The vCPE Module ID is provided by ONAP
85 description: Public/Private key pair name
89 description: Public key to be installed on the compute instance
93 description: URL of the repository that hosts the demo packages
97 description: URL of the repository that hosts the demo packages
98 install_script_version:
100 label: Installation script version number
101 description: Version number of the scripts that install the vFW demo app
102 demo_artifacts_version:
104 label: Artifacts version used in demo vnfs
105 description: Artifacts (jar, tar.gz) version used in demo vnfs
108 label: Cloud environment
109 description: Cloud environment (e.g., openstack, rackspace)
120 type: OS::Heat::RandomString
125 type: OS::Nova::KeyPair
131 base: { get_param: key_name }
132 rand: { get_resource: random-str }
133 public_key: { get_param: pub_key }
134 save_private_key: false
136 vbrgemu_private_network:
137 type: OS::Neutron::Net
139 name: { get_param: vbrgemu_private_net_id }
141 vbrgemu_private_subnet:
142 type: OS::Neutron::Subnet
144 name: { get_param: vbrgemu_private_net_id }
145 network_id: { get_resource: vbrgemu_private_network }
146 cidr: { get_param: vbrgemu_private_net_cidr }
148 # Virtual BRG Emulator Instantiation
149 # 0_port should get IP address from DHCP discover through vBNG
150 vbrgemu_private_0_port:
151 type: OS::Neutron::Port
153 network: { get_param: vbrgemu_bng_private_net_id }
155 vbrgemu_private_1_port:
156 type: OS::Neutron::Port
158 network: { get_resource: vbrgemu_private_network }
159 fixed_ips: [{"subnet": { get_resource: vbrgemu_private_subnet }, "ip_address": { get_param: vbrgemu_private_ip_1 }}]
162 type: OS::Nova::Server
164 image: { get_param: vcpe_image_name }
165 flavor: { get_param: vcpe_flavor_name }
166 name: { get_param: vbrgemu_name_0 }
167 key_name: { get_resource: my_keypair }
169 - network: { get_param: public_net_id }
170 - port: { get_resource: vbrgemu_private_0_port }
171 - port: { get_resource: vbrgemu_private_1_port }
172 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
173 user_data_format: RAW
177 __brgemu_net_ipaddr__: { get_param: vbrgemu_private_ip_1 }
178 __brgemu_cidr__: { get_param: vbrgemu_private_net_cidr }
179 __brgemu_bng_private_net_cidr__: { get_param: vbrgemu_bng_private_net_cidr }
180 __repo_url_blob__ : { get_param: repo_url_blob }
181 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
182 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
183 __install_script_version__ : { get_param: install_script_version }
184 __cloud_env__ : { get_param: cloud_env }
188 # Create configuration files
190 echo "__brgemu_net_ipaddr__" > /opt/config/brgemu_net_ipaddr.txt
191 echo "__brgemu_cidr__" > /opt/config/brgemu_net_cidr.txt
192 echo "__brgemu_bng_private_net_cidr__" > /opt/config/brgemu_bng_private_net_cidr.txt
193 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
194 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
195 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
196 echo "__install_script_version__" > /opt/config/install_script_version.txt
197 echo "__cloud_env__" > /opt/config/cloud_env.txt
199 # Download and run install script
200 curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_brgemu_install.sh -o /opt/v_brgemu_install.sh
202 chmod +x v_brgemu_install.sh
203 ./v_brgemu_install.sh