Newer
Older
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
---
# This playbook is for nova services. Due to support for deployment of cells,
# nova is separated into two roles - nova and nova-cell. This makes it more
# complicated than other services, as we may execute each role several times
# for a given operation.
#
# The nova role now deploys the global services:
#
# * nova-api
# * nova-scheduler
# * nova-super-conductor (if enable_cells is true)
#
# The nova-cell role handles services specific to a cell:
#
# * nova-compute
# * nova-compute-ironic
# * nova-conductor
# * nova-libvirt
# * nova-novncproxy
# * nova-serialproxy
# * nova-spicehtml5proxy
# * nova-ssh
# We need to perform database bootstrapping before deploying or upgrading any
# containers, to ensure all database schema migrations have been performed,
# both in the API and cell databases. Note that this should not be disruptive
# to the Nova services, which will continue to run against the new schema.
- name: Bootstrap nova API databases
gather_facts: false
hosts:
- nova-api
- '&enable_nova_True'
tags:
- nova
- nova-bootstrap
- nova-api
- nova-api-bootstrap
serial: '{{ kolla_serial|default("0") }}'
tasks:
# * Create nova API & cell0 DBs & users
# * API DB schema migrations
# * Map cell0
# * Cell0 DB schema migrations
- name: Bootstrap deploy
include_role:
name: nova
tasks_from: bootstrap
when:
- enable_nova | bool
- kolla_action in ['deploy', 'reconfigure']
# * API DB schema migrations
# * Cell0 DB schema migrations
- name: Bootstrap upgrade
include_role:
name: nova
tasks_from: bootstrap_upgrade
when:
- enable_nova | bool
- kolla_action == 'upgrade'
- name: Bootstrap nova cell databases
gather_facts: false
hosts:
- nova-conductor
- '&enable_nova_True'
tags:
- nova
- nova-bootstrap
- nova-cell
- nova-cell-bootstrap
serial: '{{ kolla_serial|default("0") }}'
# Fail all hosts if any of these once-per-cell tasks fails.
any_errors_fatal: true
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
tasks:
# * Create nova cell DBs & users
# * Create RabbitMQ vhost & user
# * Cell DB schema migrations
# * Create cell mappings
- name: Bootstrap deploy
include_role:
name: nova-cell
tasks_from: bootstrap
when:
- enable_nova | bool
- kolla_action in ['deploy', 'reconfigure']
# * Cell DB schema migrations
- name: Bootstrap upgrade
include_role:
name: nova-cell
tasks_from: bootstrap_upgrade
when:
- enable_nova | bool
- kolla_action == 'upgrade'
# Standard {{ kolla_action }}.yml for nova role.
- name: Apply role nova
gather_facts: false
hosts:
- nova-api
- nova-scheduler
- nova-super-conductor
- '&enable_nova_True'
tags:
- nova
- nova-api
- nova-api-deploy
- nova-api-upgrade
serial: '{{ kolla_serial|default("0") }}'
roles:
- role: nova
when: enable_nova | bool
# Standard {{ kolla_action }}.yml for nova-cell role.
- name: Apply role nova-cell
gather_facts: false
hosts:
- compute
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
- nova-conductor
- nova-novncproxy
- nova-serialproxy
- nova-spicehtml5proxy
- '&enable_nova_True'
tags:
- nova
- nova-cell
- nova-cell-deploy
- nova-cell-upgrade
serial: '{{ kolla_serial|default("0") }}'
roles:
- role: nova-cell
when: enable_nova | bool
# Reload nova scheduler to pick up new cells.
# TODO(mgoddard): Ideally we'd only do this when one or more cells have been
# created or updated.
- name: Refresh nova scheduler cell cache
gather_facts: false
hosts:
- nova-scheduler
- '&enable_nova_True'
tags:
- nova
- nova-api
- nova-refresh-scheduler-cell-cache
serial: '{{ kolla_serial|default("0") }}'
tasks:
- import_role:
name: nova
tasks_from: refresh_scheduler_cell_cache
when:
- enable_nova | bool
- kolla_action in ['deploy', 'reconfigure']
# Following an upgrade, Nova services must be restarted once all compute
# services have registered themselves, to remove the RPC version pin.
# Also, when nova_safety_upgrade is true, this starts services which were
# stopped during the upgrade. Nova upgrade documentation recommends starting
# conductors first and API last.
- name: Reload global Nova super conductor services
gather_facts: false
hosts:
- nova-super-conductor
- '&enable_nova_True'
tags:
- nova
- nova-reload
- nova-api
- nova-api-reload
serial: '{{ kolla_serial|default("0") }}'
tasks:
- import_role:
name: nova
tasks_from: reload_super_conductor
when:
- enable_nova | bool
- kolla_action == 'upgrade'
- name: Reload Nova cell services
gather_facts: false
hosts:
- compute
- nova-conductor
- nova-novncproxy
- nova-serialproxy
- nova-spicehtml5proxy
- '&enable_nova_True'
tags:
- nova
- nova-reload
- nova-cell
- nova-cell-reload
serial: '{{ kolla_serial|default("0") }}'
tasks:
- import_role:
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
tasks_from: reload
when:
- enable_nova | bool
- kolla_action == 'upgrade'
- name: Reload global Nova API services
gather_facts: false
hosts:
- nova-api
- nova-scheduler
- '&enable_nova_True'
tags:
- nova
- nova-reload
- nova-api
- nova-api-reload
serial: '{{ kolla_serial|default("0") }}'
tasks:
- import_role:
name: nova
tasks_from: reload_api
when:
- enable_nova | bool
- kolla_action == 'upgrade'
# Following an upgrade, data migrations should be performed for the API
# database. This should be done once all cells have been upgraded.
- name: Run Nova API online data migrations
gather_facts: false
hosts:
- nova-api
- '&enable_nova_True'
tags:
- nova
- nova-api
- nova-online-data-migrations
- nova-api-online-data-migrations
serial: '{{ kolla_serial|default("0") }}'
tasks:
- import_role:
tasks_from: online_data_migrations
when:
- enable_nova | bool
- kolla_action == 'upgrade'
# Following an upgrade, data migrations should be performed for each cell
# database. This should be done once all hosts in the cell have been upgraded,
# and ideally once all hosts in the cloud have been upgraded.
- name: Run Nova cell online data migrations
gather_facts: false
hosts:
- nova-conductor
- '&enable_nova_True'
tags:
- nova
- nova-cell
- nova-online-data-migrations
- nova-cell-online-data-migrations
serial: '{{ kolla_serial|default("0") }}'
# Fail all hosts if any of these once-per-cell tasks fails.
any_errors_fatal: true
tasks_from: online_data_migrations
when:
- enable_nova | bool
- kolla_action == 'upgrade'