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)
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_subnet_id:
56 label: vBNG private sub-network name or ID
57 description: vBNG private sub-network name or ID
58 vbrgemu_bng_private_net_cidr:
60 label: vBNG IN private network CIDR
61 description: The CIDR of the input side of vBNG private network
62 # vbrgemu_private_net_id:
64 # label: vBRGEMU Home private network name or ID
65 # description: Private network that connects vBRGEMU to local devices
66 #vbrgemu_private_net_cidr:
68 # label: vBRGEMU Home private network CIDR
69 # description: The CIDR of the input side of vBRGEMU Home private network
72 label: vGW private IP address
73 description: Private IP address towards the BRGEMU-BNG network
74 #vbrgemu_private_ip_1:
76 # label: vGW private IP address
77 # description: Private IP address towards the BRGEMU private network
81 description: Name of the vGW
85 description: The VNF ID is provided by ONAP
89 description: The vCPE Module ID is provided by ONAP
93 description: Public/Private key pair name
97 description: Public key to be installed on the compute instance
100 label: Repository URL
101 description: URL of the repository that hosts the demo packages
104 label: Repository URL
105 description: URL of the repository that hosts the demo packages
106 install_script_version:
108 label: Installation script version number
109 description: Version number of the scripts that install the vFW demo app
110 demo_artifacts_version:
112 label: Artifacts version used in demo vnfs
113 description: Artifacts (jar, tar.gz) version used in demo vnfs
116 label: Cloud environment
117 description: Cloud environment (e.g., openstack, rackspace)
120 label: VPP Source Git Repo
121 description: URL for VPP source codes
122 vpp_source_repo_branch:
124 label: VPP Source Git Branch
125 description: Git Branch for the VPP source codes
126 hc2vpp_source_repo_url:
128 label: Honeycomb Source Git Repo
129 description: URL for Honeycomb source codes
130 hc2vpp_source_repo_branch:
132 label: Honeycomb Source Git Branch
133 description: Git Branch for the Honeycomb source codes
137 description: URL for VPP patch for vBRG Emulator
140 label: SDNC ip address
141 description: SDNC ip address used to set NAT
145 description: State to compile code or not
155 type: OS::Heat::RandomString
160 type: OS::Nova::KeyPair
166 base: { get_param: key_name }
167 rand: { get_resource: random-str }
168 public_key: { get_param: pub_key }
169 save_private_key: false
171 #vbrgemu_private_network:
172 # type: OS::Neutron::Net
174 # name: { get_param: vbrgemu_private_net_id }
176 #vbrgemu_private_subnet:
177 # type: OS::Neutron::Subnet
179 # name: { get_param: vbrgemu_private_net_id }
180 # network_id: { get_resource: vbrgemu_private_network }
181 # cidr: { get_param: vbrgemu_private_net_cidr }
183 # Virtual BRG Emulator Instantiation
184 # 0_port should get IP address from DHCP discover through vBNG once the VNF is running
185 vbrgemu_private_0_port:
186 type: OS::Neutron::Port
188 network: { get_param: vbrgemu_bng_private_net_id }
189 fixed_ips: [{"subnet": { get_param: vbrgemu_bng_private_subnet_id }, "ip_address": { get_param: vbrgemu_private_ip_0 }}]
191 #vbrgemu_private_1_port:
192 # type: OS::Neutron::Port
194 # network: { get_resource: vbrgemu_private_network }
195 # fixed_ips: [{"subnet": { get_resource: vbrgemu_private_subnet }, "ip_address": { get_param: vbrgemu_private_ip_1 }}]
198 type: OS::Nova::Server
200 image: { get_param: vcpe_image_name }
201 flavor: { get_param: vcpe_flavor_name }
202 name: { get_param: vbrgemu_name_0 }
203 key_name: { get_resource: my_keypair }
205 - network: { get_param: public_net_id }
206 - port: { get_resource: vbrgemu_private_0_port }
207 #- port: { get_resource: vbrgemu_private_1_port }
208 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
209 user_data_format: RAW
213 # __brgemu_net_ipaddr__: { get_param: vbrgemu_private_ip_1 }
214 # __brgemu_cidr__: { get_param: vbrgemu_private_net_cidr }
215 __brgemu_bng_private_net_cidr__: { get_param: vbrgemu_bng_private_net_cidr }
216 __repo_url_blob__ : { get_param: repo_url_blob }
217 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
218 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
219 __install_script_version__ : { get_param: install_script_version }
220 __cloud_env__ : { get_param: cloud_env }
221 __vpp_source_repo_url__ : { get_param: vpp_source_repo_url }
222 __vpp_source_repo_branch__ : { get_param: vpp_source_repo_branch }
223 __hc2vpp_source_repo_url__ : { get_param: hc2vpp_source_repo_url }
224 __hc2vpp_source_repo_branch__ : { get_param: hc2vpp_source_repo_branch }
225 __vpp_patch_url__ : { get_param: vpp_patch_url }
226 __sdnc_ip__ : { get_param: sdnc_ip }
227 __compile_state__ : { get_param: compile_state }
231 # Create configuration files
233 #echo "__brgemu_net_ipaddr__" > /opt/config/brgemu_net_ipaddr.txt
234 #echo "__brgemu_cidr__" > /opt/config/brgemu_net_cidr.txt
235 echo "__brgemu_bng_private_net_cidr__" > /opt/config/brgemu_bng_private_net_cidr.txt
236 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
237 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
238 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
239 echo "__install_script_version__" > /opt/config/install_script_version.txt
240 echo "__cloud_env__" > /opt/config/cloud_env.txt
241 echo "__vpp_source_repo_url__" > /opt/config/vpp_source_repo_url.txt
242 echo "__vpp_source_repo_branch__" > /opt/config/vpp_source_repo_branch.txt
243 echo "__hc2vpp_source_repo_url__" > /opt/config/hc2vpp_source_repo_url.txt
244 echo "__hc2vpp_source_repo_branch__" > /opt/config/hc2vpp_source_repo_branch.txt
245 echo "__vpp_patch_url__" > /opt/config/vpp_patch_url.txt
246 echo "__sdnc_ip__" > /opt/config/sdnc_ip.txt
247 echo "__compile_state__" > /opt/config/compile_state.txt
249 # Download and run install script
250 curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_brgemu_install.sh -o /opt/v_brgemu_install.sh
252 chmod +x v_brgemu_install.sh
253 ./v_brgemu_install.sh