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 vGateway (vG ) for ONAP
38 label: Image name or ID
39 description: Image to be used for compute instance
43 description: Type of instance (flavor) to be used
46 label: Public network name or ID
47 description: Public network that enables remote connection to VNF
50 label: vGMUX private network name or ID
51 description: Private network that connects vGMUX to vGWs
54 label: ONAP management network name or ID
55 description: Private network that connects ONAP components and the VNF
56 onap_private_subnet_id:
58 label: ONAP management sub-network name or ID
59 description: Private sub-network that connects ONAP components and the VNF
60 vgmux_private_net_cidr:
62 label: vGMUX private network CIDR
63 description: The CIDR of the vGMUX private network
64 onap_private_net_cidr:
66 label: ONAP private network CIDR
67 description: The CIDR of the protected private network
70 label: vGW IN private IP address
71 description: Private IP address that is assigned to the vGW IN
74 label: vGW private IP address towards the ONAP management network
75 description: Private IP address that is assigned to the vGW to communicate with ONAP components
78 label: vGW OUT IP address
79 description: Private IP address that is assigned to the vGW OUT
82 label: vGMUX private IP address towards the vGW
83 description: Private IP address that is assigned to the vGMUX to communicate with vGWs
87 description: Name of the vGW
91 description: The VNF ID is provided by ONAP
95 description: The vCPE Module ID is provided by ONAP
98 label: DCAE collector IP address
99 description: IP address of the DCAE collector
102 label: DCAE collector port
103 description: Port of the DCAE collector
107 description: Public/Private key pair name
111 description: Public key to be installed on the compute instance
114 label: Repository URL
115 description: URL of the repository that hosts the demo packages
118 label: Repository URL
119 description: URL of the repository that hosts the demo packages
120 install_script_version:
122 label: Installation script version number
123 description: Version number of the scripts that install the vFW demo app
124 demo_artifacts_version:
126 label: Artifacts version used in demo vnfs
127 description: Artifacts (jar, tar.gz) version used in demo vnfs
130 label: Cloud environment
131 description: Cloud environment (e.g., openstack, rackspace)
142 type: OS::Heat::RandomString
147 type: OS::Nova::KeyPair
153 base: { get_param: key_name }
154 rand: { get_resource: random-str }
155 public_key: { get_param: pub_key }
156 save_private_key: false
158 vgmux_vgw_private_network:
159 type: OS::Neutron::Net
161 name: { get_param: vgmux_vgw_private_net_id }
162 vgmux_vgw_private_subnet:
163 type: OS::Neutron::Subnet
165 name: { get_param: vgmux_vgw_private_net_id }
166 network_id: { get_resource: vgmux_vgw_private_network }
167 cidr: { get_param: vgmux_vgw_private_net_cidr }
168 vgmux_private_network:
169 type: OS::Neutron::Net
171 name: { get_param: vgmux_private_net_id }
172 vgmux_private_subnet:
173 type: OS::Neutron::Subnet
175 name: { get_param: vgmux_private_net_id }
176 network_id: { get_resource: vgmux_private_network }
177 cidr: { get_param: vgmux_private_net_cidr }
180 # Virtual GW Instantiation
182 type: OS::Neutron::Port
184 network: { get_resource: vgmux_vgw_private_network }
185 fixed_ips: [{"subnet": { get_resource: vgmux_vgw_private_subnet}, "ip_address": { get_param: vgw_private_ip_0 }}]
187 vgmux_private_1_port:
188 type: OS::Neutron::Port
190 network: { get_param: onap_private_net_id }
191 fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vgw_private_ip_1 }}]
193 vgmux_private_2_port:
194 type: OS::Neutron::Port
196 network: { get_resource: vgw_private_network }
197 fixed_ips: [{"subnet": { get_resource: vgw_private_subnet}, "ip_address": { get_param: vgw_private_ip_2 }}]
200 type: OS::Nova::Server
202 image: { get_param: vcpe_image_name }
203 flavor: { get_param: vcpe_flavor_name }
204 name: { get_param: vgmux_name_0 }
205 key_name: { get_resource: my_keypair }
207 - network: { get_param: public_net_id }
208 - port: { get_resource: vgw_private_0_port }
209 - port: { get_resource: vgw_private_1_port }
210 - port: { get_resource: vgw_private_2_port }
211 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
212 user_data_format: RAW
216 __gmux_oam_int__ : { get_param: vgw_private_ip_1 }
217 __gmux_private_ipaddr__: { get_param: vgw_private_ip_2 }
218 __local_private_ipaddr__: { get_param: vgw_private_ip_1 }
219 __repo_url_blob__ : { get_param: repo_url_blob }
220 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
221 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
222 __install_script_version__ : { get_param: install_script_version }
223 __cloud_env__ : { get_param: cloud_env }
227 # Create configuration files
229 echo "__gmux_oam_int__" > /opt/config/gw_oam_int.txt
230 echo "__gmux_private_ipaddr__" > /opt/config/gw_private_ipaddr.txt
231 echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt
232 echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
233 echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
234 echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt
235 echo "__install_script_version__" > /opt/config/install_script_version.txt
236 echo "__cloud_env__" > /opt/config/cloud_env.txt
238 # Download and run install script
239 curl -k __repo_url_blob__/org.openecomp.demo/vnfs/vgw/__install_script_version__/v_gw_install.sh -o /opt/v_gw_install.sh
241 chmod +x v_gw_install.sh