blob: f6a5e6f184ad4baa1b64a0c1c9d34556f4418b79 [file] [log] [blame]
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +01001heat_template_version: queens
2
3parameters:
4 key_name:
5 type: string
6 description: Name of keypair to assign to servers
7 image:
8 type: string
9 description: Name of image to use for servers
10 flavor:
11 type: string
12 description: Flavor to use for servers
13 public_net_id:
14 type: string
15 description: >
16 ID of public network for which floating IP addresses will be allocated
17 masters_size:
18 type: number
19 description: Number of masters instances to deploy
20 default: 2
21 worker_size:
22 type: number
23 description: Number of workers to deploy
24 default: 5
25 cmp_size:
26 type: number
27 description: Number of cmp workers to deploy
28 default: 0
29 gtw_size:
30 type: number
31 description: Number of gtw workers to deploy
32 default: 0
33 ucp_boot_timeout:
34 type: number
35 description: Boot timeout for UCP instance
36 default: 1200
37 cluster_public_key:
38 type: string
39 worker_metadata:
40 type: json
41 cmp_metadata:
42 type: json
43 gtw_metadata:
44 type: json
45
46resources:
47 key_pair:
48 type: OS::Nova::KeyPair
49 properties:
50 name: { get_param: "OS::stack_name" }
51 public_key: { get_param: cluster_public_key}
52 save_private_key: false
53
54 network:
55 type: OS::Neutron::Net
56 subnet:
57 type: OS::Neutron::Subnet
58 properties:
59 network: { get_resource: network }
60 cidr: 10.10.0.0/24
61 dns_nameservers:
Vasyl Saienkoa096c482020-01-03 09:54:27 +020062 - 172.18.224.6
63 - 172.18.176.6
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +010064 router:
65 type: OS::Neutron::Router
66 properties:
67 external_gateway_info:
68 network: { get_param: public_net_id }
69 router_iface:
70 type: OS::Neutron::RouterInterface
71 properties:
72 router: { get_resource: router }
73 subnet: { get_resource: subnet }
74
75 private_floating_network:
76 type: OS::Neutron::Net
77 properties:
78 port_security_enabled: false
79 private_floating_subnet:
80 type: OS::Neutron::Subnet
81 properties:
82 network: { get_resource: private_floating_network }
83 cidr: 10.11.12.0/24
84 enable_dhcp: false
85 gateway_ip: ~
86
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +010087 ucp:
88 depends_on: router_iface
89 type: ./srv-group.yaml
90 properties:
91 image: { get_param: image }
92 flavor: { get_param: flavor }
93 key_name: { get_param: "OS::stack_name" }
94 public_net_id: { get_param: public_net_id }
95 private_net_id: { get_resource: network }
96 private_subnet_id: { get_resource: subnet }
97 private_floating_network: { get_resource: private_floating_network }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +010098 metadata: {"role":"ucp"}
Vasyl Saienko3ab29c92020-01-03 10:39:03 +020099 node_type: "ucp"
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100100
101 masters:
102 type: OS::Heat::ResourceGroup
103 depends_on:
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200104 - ucp
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100105 properties:
106 count: { get_param: masters_size }
107 resource_def:
108 type: ./srv-group.yaml
109 properties:
110 image: { get_param: image }
111 flavor: { get_param: flavor }
112 key_name: { get_param: "OS::stack_name" }
113 public_net_id: { get_param: public_net_id }
114 private_net_id: { get_resource: network }
115 private_subnet_id: { get_resource: subnet }
116 private_floating_network: { get_resource: private_floating_network }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100117 metadata: {"role":"master"}
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200118 node_type: "master"
119 ucp_master_host: { get_attr: [ucp, server_private_ip] }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100120
121 workers:
122 type: OS::Heat::ResourceGroup
123 depends_on:
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200124 - ucp
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100125 properties:
126 count: { get_param: worker_size }
127 resource_def:
128 type: ./srv-group.yaml
129 properties:
130 image: { get_param: image }
131 flavor: { get_param: flavor }
132 key_name: { get_param: "OS::stack_name" }
133 public_net_id: { get_param: public_net_id }
134 private_net_id: { get_resource: network }
135 private_subnet_id: { get_resource: subnet }
136 private_floating_network: { get_resource: private_floating_network }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100137 metadata: { get_param: worker_metadata}
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200138 node_type: "worker"
139 ucp_master_host: { get_attr: [ucp, server_private_ip] }
140
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100141 cmps:
142 type: OS::Heat::ResourceGroup
143 depends_on:
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200144 - ucp
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100145 properties:
146 count: { get_param: cmp_size }
147 resource_def:
148 type: ./srv-group.yaml
149 properties:
150 image: { get_param: image }
151 flavor: { get_param: flavor }
152 key_name: { get_param: "OS::stack_name" }
153 public_net_id: { get_param: public_net_id }
154 private_net_id: { get_resource: network }
155 private_subnet_id: { get_resource: subnet }
156 private_floating_network: { get_resource: private_floating_network }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100157 metadata: { get_param: cmp_metadata}
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200158 node_type: "worker"
159 ucp_master_host: { get_attr: [ucp, server_private_ip] }
160
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100161 gtws:
162 type: OS::Heat::ResourceGroup
163 depends_on:
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200164 - ucp
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100165 properties:
166 count: { get_param: gtw_size }
167 resource_def:
168 type: ./srv-group.yaml
169 properties:
170 image: { get_param: image }
171 flavor: { get_param: flavor }
172 key_name: { get_param: "OS::stack_name" }
173 public_net_id: { get_param: public_net_id }
174 private_net_id: { get_resource: network }
175 private_subnet_id: { get_resource: subnet }
176 private_floating_network: { get_resource: private_floating_network }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100177 metadata: { get_param: gtw_metadata}
Vasyl Saienko3ab29c92020-01-03 10:39:03 +0200178 node_type: "worker"
179 ucp_master_host: { get_attr: [ucp, server_private_ip] }
Gerrit MCPbbf9d5d2019-12-19 13:47:41 +0100180
181
182outputs:
183 ucp_ips:
184 description: Private IP addresses of the deployed ucp instances
185 value: { get_attr: [ucp, server_public_ip] }
186 masters_ips:
187 description: Private IP addresses of the deployed masters instances
188 value: { get_attr: [masters, server_public_ip] }
189 workers_ips:
190 description: Private IP addresses of the deployed worker instances
191 value: { get_attr: [workers, server_public_ip] }
192 cmps_ips:
193 description: Private IP addresses of the deployed cmp instances
194 value: { get_attr: [cmps, server_public_ip] }
195 gtws_ips:
196 description: Private IP addresses of the deployed gtw instances
197 value: { get_attr: [gtws, server_public_ip] }