Initial OpenECOMP MSO commit
[so.git] / packages / arquillian-unit-tests / src / test / resources / resource-examples / asdc / demo-dns-V1 / artifacts / dnsscaling.yaml
1 heat_template_version: 2013-05-23
2
3 description: Heat template to deploy a vDNS for OpenECOMP (scaling-up scenario)
4
5 parameters:
6   vlb_image_name:
7     type: string
8     label: Image name or ID
9     description: Image to be used for compute instance
10   vlb_flavor_name:
11     type: string
12     label: Flavor
13     description: Type of instance (flavor) to be used
14   public_net_id:
15     type: string
16     label: Public network name or ID
17     description: Public network that enables remote connection to VNF
18   vlb_private_net_id:
19     type: string
20     label: vLoadBalancer private network name or ID
21     description: Private network that connects vLoadBalancer with vDNSs
22   ecomp_private_net_id:
23     type: string
24     label: ECOMP management network name or ID
25     description: Private network that connects ECOMP component and the VNF
26   vlb_private_ip_0:
27     type: string
28     label: vLoadBalancer private IP address towards the private network
29     description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs
30   vdns_private_ip_0:
31     type: string
32     label: vDNS private IP address towards the private network
33     description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer
34   vdns_private_ip_1:
35     type: string
36     label: vDNS private IP address towards the ECOMP management network
37     description: Private IP address that is assigned to the vDNS to communicate with ECOMP components
38   vdsn_name_0:
39     type: string
40     label: vDNS name
41     description: Name of the vDNS
42   vnf_id:
43     type: string
44     label: VNF ID
45     description: The VNF ID is provided by ECOMP
46   vf_module_id:
47     type: string
48     label: vFirewall module ID
49     description: The vLoadBalancer Module ID is provided by ECOMP
50   webserver_ip:
51     type: string
52     label: Webserver IP address
53     description: IP address of the webserver that hosts the source code and binaries
54   dcae_collector_ip:
55     type: string
56     label: DCAE collector IP address
57     description: IP address of the DCAE collector
58   key_name:
59     type: string
60     label: Key pair name
61     description: Public/Private key pair name
62   pub_key:
63     type: string
64     label: Public key
65     description: Public key to be installed on the compute instance
66
67 resources:
68   my_keypair:
69     type: OS::Nova::KeyPair
70     properties:
71       name: { get_param: key_name }
72       public_key: { get_param: pub_key }
73       save_private_key: false
74
75   vdns_0:
76     type: OS::Nova::Server
77     properties:
78       image: { get_param: vlb_image_name }
79       flavor: { get_param: vlb_flavor_name }
80       name: { get_param: vdsn_name_0 }
81       key_name: { get_resource: my_keypair }
82       networks:
83         - network: { get_param: public_net_id }
84         - port: { get_resource: vdns_private_0_port }
85         - port: { get_resource: vdns_private_1_port }
86       metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
87       user_data_format: RAW
88       user_data:
89         str_replace:
90           params:
91             __webserver__: { get_param: webserver_ip }
92             __fw_ipaddr__: { get_param: vlb_private_ip_0 }
93           template: |
94             #!/bin/bash
95
96             WEBSERVER_IP=__webserver__
97             LB_IPADDR=__lb_ipaddr__
98
99             mkdir /opt/config
100             cd /opt
101             wget http://$WEBSERVER_IP/demo_repo/v_dns_init.sh
102             chmod +x v_dns_init.sh
103             echo $WEBSERVER_IP > config/webserver_ip.txt
104             echo $LB_IPADDR > config/lb_ipaddr.txt
105             ./v_dns_init.sh
106
107   vdns_private_0_port:
108     type: OS::Neutron::Port
109     properties:
110       network: { get_param: vlb_private_net_id }
111       fixed_ips: [{"subnet": { get_param: vlb_private_net_id }, "ip_address": { get_param: vdns_private_ip_0 }}]
112
113   vdns_private_1_port:
114     type: OS::Neutron::Port
115     properties:
116       network: { get_param: ecomp_private_net_id }
117       fixed_ips: [{"subnet": { get_param: ecomp_private_net_id }, "ip_address": { get_param: vdns_private_ip_1 }}]