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 private IP address
69 description: Private IP address towards the BRGEMU-BNG network
72 label: vGW private IP address
73 description: Private IP address towards the BRGEMU private network
77 description: Name of the vGW
81 description: The VNF ID is provided by ONAP
85 description: The vCPE Module ID is provided by ONAP
89 description: Public/Private key pair name
93 description: Public key to be installed on the compute instance
97 description: URL of the repository that hosts the demo packages
100 label: Repository URL
101 description: URL of the repository that hosts the demo packages
102 install_script_version:
104 label: Installation script version number
105 description: Version number of the scripts that install the vFW demo app
106 demo_artifacts_version:
108 label: Artifacts version used in demo vnfs
109 description: Artifacts (jar, tar.gz) version used in demo vnfs
112 label: Cloud environment
113 description: Cloud environment (e.g., openstack, rackspace)
116 label: VPP Source Git Repo
117 description: URL for VPP source codes
118 vpp_source_repo_branch:
120 label: VPP Source Git Branch
121 description: Git Branch for the VPP source codes
122 hc2vpp_source_repo_url:
124 label: Honeycomb Source Git Repo
125 description: URL for Honeycomb source codes
126 hc2vpp_source_repo_branch:
128 label: Honeycomb Source Git Branch
129 description: Git Branch for the Honeycomb source codes
133 description: URL for VPP patch for vBRG Emulator
136 label: SDNC ip address
137 description: SDNC ip address uesd to set NAT
148 type: OS::Heat::RandomString
153 type: OS::Nova::KeyPair
159 base: { get_param: key_name }
160 rand: { get_resource: random-str }
161 public_key: { get_param: pub_key }
162 save_private_key: false
164 vbrgemu_private_network:
165 type: OS::Neutron::Net
167 name: { get_param: vbrgemu_private_net_id }
169 vbrgemu_private_subnet:
170 type: OS::Neutron::Subnet
172 name: { get_param: vbrgemu_private_net_id }
173 network_id: { get_resource: vbrgemu_private_network }
174 cidr: { get_param: vbrgemu_private_net_cidr }
176 # Virtual BRG Emulator Instantiation
177 # 0_port should get IP address from DHCP discover through vBNG once the VNF is running
178 vbrgemu_private_0_port:
179 type: OS::Neutron::Port
181 network: { get_param: vbrgemu_bng_private_net_id }
182 fixed_ips: [{"subnet": { get_param: vbrgemu_bng_private_net_id }, "ip_address": { get_param: vbrgemu_private_ip_0 }}]
184 vbrgemu_private_1_port:
185 type: OS::Neutron::Port
187 network: { get_resource: vbrgemu_private_network }
188 fixed_ips: [{"subnet": { get_resource: vbrgemu_private_subnet }, "ip_address": { get_param: vbrgemu_private_ip_1 }}]
191 type: OS::Nova::Server
193 image: { get_param: vcpe_image_name }
194 flavor: { get_param: vcpe_flavor_name }
195 name: { get_param: vbrgemu_name_0 }
196 key_name: { get_resource: my_keypair }
198 - network: { get_param: public_net_id }
199 - port: { get_resource: vbrgemu_private_0_port }
200 - port: { get_resource: vbrgemu_private_1_port }
201 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
202 user_data_format: RAW
206 __brgemu_net_ipaddr__: { get_param: vbrgemu_private_ip_1 }
207 __brgemu_cidr__: { get_param: vbrgemu_private_net_cidr }
208 __brgemu_bng_private_net_cidr__: { get_param: vbrgemu_bng_private_net_cidr }
209 __repo_url_blob__ : { get_param: repo_url_blob }
210 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
211 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
212 __install_script_version__ : { get_param: install_script_version }
213 __cloud_env__ : { get_param: cloud_env }
214 __vpp_source_repo_url__ : { get_param: vpp_source_repo_url }
215 __vpp_source_repo_branch__ : { get_param: vpp_source_repo_branch }
216 __hc2vpp_source_repo_url__ : { get_param: hc2vpp_source_repo_url }
217 __hc2vpp_source_repo_branch__ : { get_param: hc2vpp_source_repo_branch }
218 __vpp_patch_url__ : { get_param: vpp_patch_url }
219 __sdnc_ip__ : { get param: sdnc_ip }
223 # Create configuration files
225 echo "__brgemu_net_ipaddr__" > /opt/config/brgemu_net_ipaddr.txt
226 echo "__brgemu_cidr__" > /opt/config/brgemu_net_cidr.txt
227 echo "__brgemu_bng_private_net_cidr__" > /opt/config/brgemu_bng_private_net_cidr.txt
228 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
229 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
230 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
231 echo "__install_script_version__" > /opt/config/install_script_version.txt
232 echo "__cloud_env__" > /opt/config/cloud_env.txt
233 echo "__vpp_source_repo_url__" > /opt/config/vpp_source_repo_url.txt
234 echo "__vpp_source_repo_branch__" > /opt/config/vpp_source_repo_branch.txt
235 echo "__hc2vpp_source_repo_url__" > /opt/config/hc2vpp_source_repo_url.txt
236 echo "__hc2vpp_source_repo_branch__" > /opt/config/hc2vpp_source_repo_branch.txt
237 echo "__vpp_patch_url__" > /opt/config/vpp_patch_url.txt
238 echo "__sdnc_ip__" > /opt/config/ip.txt
240 # Download and run install script
241 curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_brgemu_install.sh -o /opt/v_brgemu_install.sh
243 chmod +x v_brgemu_install.sh
244 ./v_brgemu_install.sh