IPV6 testing & minor changes and fixes
[samplevnf.git] / VNFs / DPPD-PROX / helper-scripts / rapid / openstack-rapid.yaml
1 heat_template_version: 2015-10-15
2
3 description: >
4   Template for deploying n PROX instances. Teh template allows for deploying
5   multiple groups of PROX VMs. You can create a first group with certain
6   flavors, availability groups, etc... Another group can be created with
7   different characteristics.
8
9 parameters:
10   public_net_name: {description: Public network to allocate (floating) IPs to VMs', type: string, default: admin_floating_net}
11   mgmt_net_name: {description: Name of PROX mgmt network to be created, type: string, default: admin_internal_net}
12   PROX_image: {description: Image name to use for PROX, type: string, default: rapidVM}
13   PROX_key: {description: DO NOT CHANGE THIS DEFAULT KEY NAME, type: string, default: rapid_key}
14   my_availability_zone: {description: availability_zone for Hosting VMs, type: string, default: nova}
15   security_group: {description: Security Group to use, type: string, default: prox_security_group}
16   PROXVM_count: {description: Total number of testVMs to create, type: number, default: 2}
17   PROX2VM_count: {description: Total number of testVMs to create, type: number, default: 1}
18
19 # The following paramters are not used, but are here in case you want to also
20 # create the management and dataplane networks in this template
21   mgmt_net_cidr: {description: PROX mgmt network CIDR, type: string, default: 20.20.1.0/24}
22   mgmt_net_gw: {description: PROX mgmt network gateway address, type: string, default: 20.20.1.1}
23   mgmt_net_pool_start: {description: Start of mgmt network IP address allocation pool, type: string, default: 20.20.1.100}
24   mgmt_net_pool_end: {description: End of mgmt network IP address allocation pool, type: string, default: 20.20.1.200}
25   data_net_name: {description: Name of PROX private network to be created, type: string, default: dataplane-network}
26   data_net_cidr: {description: PROX private network CIDR,type: string, default: 30.30.1.0/24}
27   data_net_pool_start: {description: Start of private network IP address allocation pool, type: string, default: 30.30.1.100}
28   data_net_pool_end: {description: End of private network IP address allocation pool, type: string, default: 30.30.1.200}
29   dns:
30     type: comma_delimited_list
31     label: DNS nameservers
32     description: Comma separated list of DNS nameservers for the management network.
33     default: '8.8.8.8'
34
35 resources:
36   PROXVMs:
37     type: OS::Heat::ResourceGroup
38     description: Group of PROX VMs according to specs described in this section
39     properties:
40       count: { get_param: PROXVM_count }
41       resource_def:
42         type: rapid-openstack-server.yaml
43         properties:
44           PROX_availability_zone : {get_param: my_availability_zone}
45           PROX_security_group : {get_param: security_group}
46           PROX_image: {get_param: PROX_image}
47           PROX_key: {get_param: PROX_key}
48           PROX_server_name: rapidVM-%index%
49           PROX_public_net: {get_param: public_net_name}
50           PROX_mgmt_net_id: {get_param: mgmt_net_name}
51           PROX_data_net_id: {get_param: data_net_name}
52           PROX_config: {get_resource: MyConfig}
53     depends_on: MyConfig
54   
55   PROX2VMs:
56     type: OS::Heat::ResourceGroup
57     description: Group of PROX VMs according to specs described in this section
58     properties:
59       count: { get_param: PROX2VM_count }
60       resource_def:
61         type: rapid-openstack-server.yaml
62         properties:
63           PROX_availability_zone : {get_param: my_availability_zone}
64           PROX_security_group : {get_param: security_group}
65           PROX_image: {get_param: PROX_image}
66           PROX_key: {get_param: PROX_key}
67           PROX_server_name: rapidType2VM-%index%
68           PROX_public_net: {get_param: public_net_name}
69           PROX_mgmt_net_id: {get_param: mgmt_net_name}
70           PROX_data_net_id: {get_param: data_net_name}
71           PROX_config: {get_resource: MyConfig}
72     depends_on: MyConfig
73   
74   MyConfig:
75     type: OS::Heat::CloudConfig
76     properties:
77       cloud_config:
78         users:
79         - default
80         - name: rapid
81           groups: "users,root"
82           lock-passwd: false
83           passwd: 'test'
84           shell: "/bin/bash"
85           sudo: "ALL=(ALL) NOPASSWD:ALL"
86         ssh_pwauth: true
87         chpasswd:
88           list:  |
89               rapid:rapid
90           expire: False
91
92 outputs:
93   number_of_servers:
94     description: List of number or PROX instance
95     value: 
96       - {get_param: PROXVM_count}
97       - {get_param: PROX2VM_count}
98   server_name:
99     description: List of list of names of the PROX instances
100     value: 
101       - {get_attr: [PROXVMs, name]}
102       - {get_attr: [PROX2VMs, name]}
103   mngmt_ips:
104     description: List of list of Management IPs of the VMs
105     value: 
106       - {get_attr: [PROXVMs, mngmt_ip]}
107       - {get_attr: [PROX2VMs, mngmt_ip]}
108   data_plane_ips:
109     description: List of list of list of DataPlane IPs of the VMs
110     value: 
111       - {get_attr: [PROXVMs, data_plane_ips]}
112       - {get_attr: [PROX2VMs, data_plane_ips]}
113   data_plane_macs:
114     description: List of list of list of DataPlane MACs of the VMs
115     value: 
116       - {get_attr: [PROXVMs, data_plane_mac]}
117       - {get_attr: [PROX2VMs, data_plane_mac]}