-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhybrid_ref_arch.yaml
215 lines (208 loc) · 6.09 KB
/
hybrid_ref_arch.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
heat_template_version: 2014-10-16
description: >
This template will provision the minimum number of required nodes, as well
it will setup all of the required lbaas vips.
parameters:
release_tag:
type: string
default: "12.0.7"
keystone_admin_api_port:
description: The port keystone-admin-api is listening on.
type: number
default: 35357
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
keystone_api_port:
description: The port keystone-api is listening on.
type: number
default: 5000
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
nova_api_metadata_port:
description: The port nova-api-metadata is listening on.
type: number
default: 8775
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
nova_api_port:
description: The port nova-api is listening on.
type: number
default: 8774
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
nova_api_ec2_port:
description: The port nova-api is listening on.
type: number
default: 8773
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
glance_api_port:
description: The port nova-api is listening on.
type: number
default: 9292
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
glance_registry_port:
description: The port nova-api is listening on.
type: number
default: 9191
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
cinder_api_port:
description: The port cinder-api is listening on.
type: number
default: 8776
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
ceilometer_api_port:
description: The port ceilometer-api is listening on.
type: number
default: 8777
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
heat_api_port:
description: The port heat-api is listening on.
type: number
default: 8004
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
heat_cfn_api_port:
description: The port heat-cfn-api is listening on.
type: number
default: 8000
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
heat_cloudwatch_api_port:
description: The port heat-cloudwatch-api is listening on.
type: number
default: 8003
constraints:
- range:
min: 1025
max: 65535
description: Must be an integer between 1025 and 65535.
lb_algorithm:
description: The algorithm used for the loadbalancer.
type: string
default: LEAST_CONNECTIONS
constraints:
- allowed_values:
- LEAST_CONNECTIONS
- ROUND_ROBIN
description: |
Must be a valid Rackspace Cloud Loadbalancer algorithm.
resources:
deploy_ssh_key:
type: "OS::Nova::KeyPair"
properties:
save_private_key: True
name: deploy_key
deployment_server:
type: "OS::Nova::Server"
properties:
flavor: 1 GB General Purpose v1
image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
key_name: shep
user_data:
str_replace:
template: |
#!/bin/bash
apt-get update
apt-get install -y build-essential git python-dev
# Setup SSH keys
cat << 'EOH' |sudo tee /root/.ssh/id_rsa
%ssh_priv_key%
EOH
chmod 600 /root/.ssh/id_rsa
echo %ssh_pub_key% > /root/.ssh/id_rsa.pub
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
# Checkout openstack-ansible
git clone -b %git_tag% https://github.com/openstack/openstack-ansible.git /opt/openstack-ansible
pushd /opt/openstack-ansible
scripts/bootstrap-ansible.sh
popd
params:
"%ssh_priv_key%": { get_attr: [ deploy_ssh_key, private_key ] }
"%ssh_pub_key%": { get_attr: [ deploy_ssh_key, public_key ] }
"%git_tag%": { get_param: release_tag }
nova-api-metadata:
type: "OS::Heat::ResourceGroup"
properties:
count: 2
resource_def:
type: "OS::Nova::Server"
properties:
flavor: 1 GB General Purpose v1
image: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM)
key_name: shep
user_data:
str_replace:
template: |
#!/bin/bash
apt-get update
# Setup SSH keys
echo %ssh_pub_key% >> /root/.ssh/authorized_keys
params:
"%ssh_pub_key%": { get_attr: [ deploy_ssh_key, public_key ] }
lb_nova_api_metadata:
type: "Rackspace::Cloud::LoadBalancer"
properties:
name: "lb-nova-api-metadata"
nodes:
- addresses: { get_attr: [ nova-api-metadata, addresses, private, 0, addr ] }
port: { get_param: nova_api_metadata_port }
condition: ENABLED
port: { get_param: nova_api_metadata_port }
protocol: HTTP
algorithm: { get_param: lb_algorithm }
virtualIps:
- type: PUBLIC
ipVersion: IPV4
healthMonitor:
attemptsBeforeDeactivation: 3
delay: 10
timeout: 120
type: HTTP
path: "/"
statusRegex: "."
bodyRegex: "."
outputs:
lb-nova-api-metadata:
value: { get_attr: [lb_nova_api_metadata, PublicIp] }
deploy_ssh_priv_key:
value: { get_attr: [ deploy_ssh_key, private_key ] }
metadata-ips:
value: { get_attr: [ nova-api-metadata, addresses, private, 0, addr ] }