1 heat_template_version: 2013-05-23
3 description: Heat template to deploy vLoadBalancer/vDNS demo app for OpenECOMP
8 label: Image name or ID
9 description: Image to be used for compute instance
13 description: Type of instance (flavor) to be used
16 label: Public network name or ID
17 description: Public network that enables remote connection to VNF
20 label: vLoadBalancer private network name or ID
21 description: Private network that connects vLoadBalancer with vDNSs
24 label: ECOMP management network name or ID
25 description: Private network that connects ECOMP component and the VNF
26 ecomp_private_subnet_id:
28 label: ECOMP management sub-network name or ID
29 description: Private sub-network that connects ECOMP component and the VNF
32 label: vLoadBalancer private network CIDR
33 description: The CIDR of the vLoadBalancer private network
34 ecomp_private_net_cidr:
36 label: ECOMP private network CIDR
37 description: The CIDR of the protected private network
40 label: vLoadBalancer private IP address towards the private network
41 description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs
44 label: vLoadBalancer private IP address towards the ECOMP management network
45 description: Private IP address that is assigned to the vLoadBalancer to communicate with ECOMP components
48 label: vDNS private IP address towards the private network
49 description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer
52 label: vDNS private IP address towards the ECOMP management network
53 description: Private IP address that is assigned to the vDNS to communicate with ECOMP components
56 label: vLoadBalancer name
57 description: Name of the vLoadBalancer
61 description: Name of the vDNS
65 description: The VNF ID is provided by ECOMP
68 label: vFirewall module ID
69 description: The vLoadBalancer Module ID is provided by ECOMP
72 label: DCAE collector IP address
73 description: IP address of the DCAE collector
76 label: DCAE collector port
77 description: Port of the DCAE collector
81 description: Public/Private key pair name
85 description: Public key to be installed on the compute instance
89 description: URL of the repository that hosts the demo packages
93 description: URL of the repository that hosts the demo packages
94 demo_artifacts_version:
96 label: Artifacts version used in demo vnfs
97 description: Artifacts (jar, tar.gz) version used in demo vnfs
102 type: OS::Heat::RandomString
107 type: OS::Nova::KeyPair
113 base: { get_param: key_name }
114 rand: { get_resource: random-str }
115 public_key: { get_param: pub_key }
116 save_private_key: false
119 type: OS::Neutron::Net
121 name: { get_param: vlb_private_net_id }
124 type: OS::Neutron::Subnet
126 name: { get_param: vlb_private_net_id }
127 network_id: { get_resource: vlb_private_network }
128 cidr: { get_param: vlb_private_net_cidr }
131 type: OS::Nova::Server
133 image: { get_param: vlb_image_name }
134 flavor: { get_param: vlb_flavor_name }
135 name: { get_param: vlb_name_0 }
136 key_name: { get_resource: my_keypair }
138 - network: { get_param: public_net_id }
139 - port: { get_resource: vlb_private_0_port }
140 - port: { get_resource: vlb_private_1_port }
141 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
142 user_data_format: RAW
146 __dcae_collector_ip__: { get_param: dcae_collector_ip }
147 __dcae_collector_port__: { get_param: dcae_collector_port }
148 __local_private_ipaddr__: { get_param: vlb_private_ip_0 }
149 __repo_url_blob__ : { get_param: repo_url_blob }
150 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
151 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
155 DCAE_COLLECTOR_IP=__dcae_collector_ip__
156 DCAE_COLLECTOR_PORT=__dcae_collector_port__
157 LOCAL_PRIVATE_IPADDR=__local_private_ipaddr__
158 REPO_URL_BLOB=__repo_url_blob__
159 REPO_URL_ARTIFACTS=__repo_url_artifacts__
160 DEMO_ARTIFACTS_VERSION=__demo_artifacts_version__
162 # Download required dependencies
163 add-apt-repository -y ppa:openjdk-r/ppa
165 apt-get install -y make gcc wget openjdk-8-jdk bridge-utils libcurl4-openssl-dev apt-transport-https ca-certificates
166 apt-get install -y maven
169 # Download vLB demo code for load balancer
174 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/v_lb_init.sh
175 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/vlb.sh
176 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/dnsmembership.sh
177 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/add_dns.sh
178 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/remove_dns.sh
180 mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.vlb:dns-manager:$DEMO_ARTIFACTS_VERSION:jar -Dtransitive=false -Ddest=.
181 mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.ves:ves:$DEMO_ARTIFACTS_VERSION:tar.gz:demo -Dtransitive=false -Ddest=.
182 mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.ves:ves_vlb_reporting:$DEMO_ARTIFACTS_VERSION:tar.gz:demo -Dtransitive=false -Ddest=.
184 tar -zxvf ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz
185 mv ves-$DEMO_ARTIFACTS_VERSION VES
186 tar -zxvf ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz
187 mv ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION VESreporting_vLB
189 mv VESreporting_vLB /opt/VES/code/evel_training/VESreporting
190 mv dns-manager-$DEMO_ARTIFACTS_VERSION.jar /opt/FDserver/dns-manager-$DEMO_ARTIFACTS_VERSION.jar
191 mv dnsmembership.sh /opt/FDserver/dnsmembership.sh
192 mv add_dns.sh /opt/FDserver/add_dns.sh
193 mv remove_dns.sh /opt/FDserver/remove_dns.sh
196 chmod +x v_lb_init.sh
198 chmod +x /opt/VES/code/evel_training/VESreporting/go-client.sh
199 chmod +x /opt/FDserver/dnsmembership.sh
200 chmod +x /opt/FDserver/add_dns.sh
201 chmod +x /opt/FDserver/remove_dns.sh
203 echo $DCAE_COLLECTOR_IP > config/dcae_collector_ip.txt
204 echo $DCAE_COLLECTOR_PORT > config/dcae_collector_port.txt
205 echo $LOCAL_PRIVATE_IPADDR > config/local_private_ipaddr.txt
206 LOCAL_PUBLIC_IPADDR=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2)
207 echo $LOCAL_PUBLIC_IPADDR > config/local_public_ipaddr.txt
208 echo $DEMO_ARTIFACTS_VERSION > config/artifacts_version.txt
211 export UBUNTU="trusty"
212 export RELEASE=".stable.1609"
213 rm /etc/apt/sources.list.d/99fd.io.list
214 echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io$RELEASE.ubuntu.$UBUNTU.main/ ./" | sudo tee -a /etc/apt/sources.list.d/99fd.io.list
216 apt-get install -y vpp vpp-dpdk-dkms vpp-lib vpp-dbg vpp-plugins vpp-dev
225 # Run instantiation script
227 mv vlb.sh /etc/init.d
228 update-rc.d vlb.sh defaults
232 type: OS::Neutron::Port
234 network: { get_resource: vlb_private_network }
235 fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}]
238 type: OS::Neutron::Port
240 network: { get_param: ecomp_private_net_id }
241 fixed_ips: [{"subnet": { get_param: ecomp_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_1 }}]
244 type: OS::Nova::Server
246 image: { get_param: vlb_image_name }
247 flavor: { get_param: vlb_flavor_name }
248 name: { get_param: vdns_name_0 }
249 key_name: { get_resource: my_keypair }
251 - network: { get_param: public_net_id }
252 - port: { get_resource: vdns_private_0_port }
253 - port: { get_resource: vdns_private_1_port }
254 metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
255 user_data_format: RAW
259 __lb_oam_int__ : { get_param: vlb_private_ip_1 }
260 __lb_private_ipaddr__: { get_param: vlb_private_ip_0 }
261 __local_private_ipaddr__: { get_param: vdns_private_ip_0 }
262 __repo_url_blob__ : { get_param: repo_url_blob }
263 __repo_url_artifacts__ : { get_param: repo_url_artifacts }
264 __demo_artifacts_version__ : { get_param: demo_artifacts_version }
268 LB_OAM_INT=__lb_oam_int__
269 LB_PRIVATE_IPADDR=__lb_private_ipaddr__
270 LOCAL_PRIVATE_IPADDR=__local_private_ipaddr__
271 REPO_URL_BLOB=__repo_url_blob__
272 REPO_URL_ARTIFACTS=__repo_url_artifacts__
273 DEMO_ARTIFACTS_VERSION=__demo_artifacts_version__
275 # Download required dependencies
276 add-apt-repository -y ppa:openjdk-r/ppa
278 apt-get install -y wget openjdk-8-jdk bind9 bind9utils bind9-doc apt-transport-https ca-certificates
279 apt-get install -y maven
282 # Download vDNS demo code for DNS Server
287 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/v_dns_init.sh
288 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/vdns.sh
289 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/dnsclient.sh
290 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/set_gre_tunnel.sh
292 mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.vlb:dns-client:$DEMO_ARTIFACTS_VERSION:jar -Dtransitive=false -Ddest=.
294 mv dns-client-$DEMO_ARTIFACTS_VERSION.jar /opt/FDclient/
295 mv dnsclient.sh /opt/FDclient/
296 mv set_gre_tunnel.sh /opt/FDclient/
298 chmod +x v_dns_init.sh
300 chmod +x /opt/FDclient/dnsclient.sh
301 chmod +x /opt/FDclient/set_gre_tunnel.sh
303 echo $LB_OAM_INT > config/lb_oam_int.txt
304 echo $LB_PRIVATE_IPADDR > config/lb_private_ipaddr.txt
305 echo $LOCAL_PRIVATE_IPADDR > config/local_private_ipaddr.txt
306 echo $DEMO_ARTIFACTS_VERSION > config/artifacts_version.txt
308 # Download Bind config files
310 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/db_dnsdemo_openecomp_org
311 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/named.conf.options
312 wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/named.conf.local
316 mkdir /etc/bind/zones
317 sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9
318 mv db_dnsdemo_openecomp_org /etc/bind/zones/db.dnsdemo.openecomp.org
319 mv named.conf.options /etc/bind/
320 mv named.conf.local /etc/bind/
323 # Run instantiation script
325 mv vdns.sh /etc/init.d
326 update-rc.d vdns.sh defaults
330 type: OS::Neutron::Port
332 network: { get_resource: vlb_private_network }
333 fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}]
336 type: OS::Neutron::Port
338 network: { get_param: ecomp_private_net_id }
339 fixed_ips: [{"subnet": { get_param: ecomp_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}]