-
Notifications
You must be signed in to change notification settings - Fork 0
/
ceph.yaml
263 lines (239 loc) · 7.23 KB
/
ceph.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
heat_template_version: 2016-04-08
parameters:
flavor:
type: string
description: Flavor for the server to be created
default: t1.small
constraints:
- custom_constraint: nova.flavor
image:
type: string
description: Image ID or image name to use for the server
default: "rhel-7-LTS"
constraints:
- custom_constraint: glance.image
key_name:
type: string
description: SSH Key Pair
default: "venv-mac"
constraints:
- custom_constraint: nova.keypair
osd_scale:
type: number
description: Number of OSD nodes to deploy
default: 3
haproxy_scale:
type: number
description: Number of HAProxy nodes to deploy
default: 2
rgw_scale:
type: number
description: Number of RadosGW nodes to deploy
default: 2
mon_scale:
type: number
description: Number of RadosGW nodes to deploy
default: 3
resources:
dmz_net:
type: network.yaml
properties:
net_name: dmz_net
allocation_pools: [{"start": "192.168.200.20", "end": "192.168.200.200"}]
cidr: "192.168.200.0/24"
dns: ["8.8.8.8"]
gateway: "192.168.200.1"
obj_gw_net:
type: network.yaml
properties:
net_name: obj_gw_net
allocation_pools: [{"start": "10.1.1.2", "end": "10.1.1.100"}]
cidr: "10.1.1.0/24"
dns: ["8.8.8.8"]
gateway: "10.1.1.1"
obj_client_net:
type: network.yaml
properties:
net_name: obj_client_net
allocation_pools: [{"start": "10.1.2.2", "end": "10.1.2.100"}]
cidr: "10.1.2.0/24"
dns: ["8.8.8.8"]
gateway: "10.1.2.1"
storage_net:
type: network.yaml
properties:
net_name: storage_net
allocation_pools: [{"start": "10.1.3.2", "end": "10.1.3.100"}]
cidr: "10.1.3.0/24"
dns: ["8.8.8.8"]
gateway: "10.1.3.1"
InternetGW:
type: OS::Neutron::Router
properties:
external_gateway_info: { network: Internet }
name: InternetGW
client_gw:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: InternetGW }
subnet: { get_attr: [ obj_client_net, subnet ] }
dmz_gw:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: InternetGW }
subnet: { get_attr: [ dmz_net, subnet ] }
mgmt_port:
type: OS::Neutron::Port
properties:
network: { get_attr: [ dmz_net, network ] }
fixed_ips:
- subnet_id: { get_attr: [ dmz_net, subnet ] }
security_groups:
- default
- { get_resource: ssh_secgroup }
ceph_port:
type: OS::Neutron::Port
properties:
network: { get_attr: [ dmz_net, network ] }
fixed_ips:
- subnet_id: { get_attr: [ dmz_net, subnet ] }
mgmt_floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network: "Internet"
ceph_floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network: "Internet"
mgmt_floating_ip_assoc:
type: OS::Neutron::FloatingIPAssociation
properties:
floatingip_id: { get_resource: mgmt_floating_ip }
port_id: { get_resource: mgmt_port }
ceph_floating_ip_assoc:
type: OS::Neutron::FloatingIPAssociation
properties:
floatingip_id: { get_resource: ceph_floating_ip }
port_id: { get_resource: ceph_port }
ssh_secgroup:
type: OS::Neutron::SecurityGroup
properties:
rules:
- protocol: tcp
remote_ip_prefix: 0.0.0.0/0
port_range_min: 22
port_range_max: 22
jumpbox:
type: OS::Nova::Server
depends_on: [ obj_client_net, mgmt_port ]
properties:
name: mgmt-jumpbox
flavor: { get_param: flavor }
image: { get_param: image }
key_name: { get_param: key_name }
networks:
- port: { get_resource: mgmt_port }
- network: { get_attr: [ obj_client_net, network ] }
user_data_format: SOFTWARE_CONFIG
user_data: { get_attr: [config_agent, config] }
config_agent:
type: collect-config-setup/install_config_agent_rhel7_yum.yaml
jumpbox_ansible_config:
type: OS::Heat::SoftwareConfig
properties:
group: ansible
config:
str_replace:
template: { get_file: 'files/jumpbox-ansible.yaml' }
params:
_ipaddr_: { get_attr: [jumpbox, addresses, { get_attr: [ obj_client_net, network ] }, 0, addr ] }
outputs:
- name: result
deploy_jumpbox_ansible_config:
type: OS::Heat::SoftwareDeployment
depends_on: jumpbox
properties:
signal_transport: CFN_SIGNAL
config:
get_resource: jumpbox_ansible_config
server:
get_resource: jumpbox
haproxy_group:
type: OS::Heat::ResourceGroup
depends_on: [ dmz_net, obj_gw_net]
properties:
count: { get_param: haproxy_scale }
resource_def:
type: server.yaml
properties:
server_name: haproxy-%index%
flavor: { get_param: flavor }
image: { get_param: image }
key_name: { get_param: key_name }
networks:
- network: { get_attr: [ dmz_net, network ] }
- network: { get_attr: [ obj_gw_net, network ] }
test: "test"
radosgw_group:
type: OS::Heat::ResourceGroup
depends_on: [ obj_client_net, obj_gw_net]
properties:
count: { get_param: rgw_scale }
resource_def:
type: server.yaml
properties:
server_name: rgw-%index%
flavor: { get_param: flavor }
image: { get_param: image }
key_name: { get_param: key_name }
networks:
- network: { get_attr: [ obj_client_net, network ] }
- network: { get_attr: [ obj_gw_net, network ] }
test: "test"
osd_group:
type: OS::Heat::ResourceGroup
depends_on: [ obj_client_net, storage_net]
properties:
count: { get_param: osd_scale }
resource_def:
type: server.yaml
properties:
server_name: osd-%index%
flavor: { get_param: flavor }
image: { get_param: image }
key_name: { get_param: key_name }
networks:
- network: { get_attr: [ obj_client_net, network ] }
- network: { get_attr: [ storage_net, network ] }
test: "test"
mon_group:
type: OS::Heat::ResourceGroup
depends_on: [ obj_client_net, storage_net]
properties:
count: { get_param: mon_scale }
resource_def:
type: server.yaml
properties:
server_name: mon-%index%
flavor: { get_param: flavor }
image: { get_param: image }
key_name: { get_param: key_name }
networks:
- network: { get_attr: [ obj_client_net, network ] }
- network: { get_attr: [ storage_net, network ] }
test: "test"
outputs:
jumpbox_IP_2:
value: { get_attr: [ jumpbox, addresses, { get_attr: [ obj_client_net, network ] }, 0, addr ] }
jumpbox_ext_ip:
description: External IP for connection to jump box.
value: { get_attr: [ mgmt_floating_ip, floating_ip_address ] }
osd_ips:
description: IPs of the OSDs
value: { get_attr: [ osd_group, server_ip ] }
mon_ips:
description: IPs of the MONs
value: { get_attr: [ radosgw_group, server_ip ] }
rgw_ips:
description: IPs of the RadosGWs
value: { get_attr: [ mon_group, server_ip ] }