@@ -16,7 +16,7 @@ be automatically regenerated with a ``kayobe overcloud service deploy``.
16
16
Some secrets require manual input from the operator to change.
17
17
18
18
Following this process, there may be a few seconds of network downtime for
19
- running VMs when Neutron is reconfigured.
19
+ running VMs when Neutron is reconfigured when using ML2/OVS .
20
20
21
21
There will be API downtime for all services. The main reason for the outage is
22
22
that RabbitMQ must be completely stopped to change the secrets it uses. The
@@ -45,7 +45,9 @@ process easier.
45
45
<https://review.opendev.org/c/openstack/kolla/+/902057> `__.
46
46
47
47
This was previously mitigated with a change to the StackHPC fork of
48
- Kolla-Ansible, which has since been reverted due to an unforeseen issue.
48
+ Kolla-Ansible, which has since been reverted due to an unforeseen issue. See
49
+ `here <https://github.com/stackhpc/kolla-ansible/pull/503> ` for more
50
+ details.
49
51
50
52
#. A change to Nova, to automate :ref: `this<nova-change> ` step to change the
51
53
nova cell0 database connection string.
@@ -71,30 +73,41 @@ Full method
71
73
1. Run a Tempest ``refstack `` & check Kibana/OpenSearch Dashboards to check
72
74
the state of the cloud before any changes are made
73
75
76
+ 2. Edit your Kolla-Ansible checkout to include changes not yet included
77
+ upstream.
78
+
74
79
.. _kolla-change :
75
80
76
- 2. Edit your Kolla-Ansible checkout to include this line within the
77
- ``kolla_docker `` dict in ``ansible/roles/nova/tasks/bootstrap_service.yml `` See
78
- `here
79
- <https://github.com/stackhpc/kolla-ansible/pull/496/commits/9da473a63414493517da668075b8c958fec56e96> `__
80
- for an example. (If you are using the latest ``stackhpc/yoga `` branch of
81
- Kolla-Ansible this should already be set)
81
+ 1. Add this line within the ``kolla_docker `` dict in
82
+ ``ansible/roles/nova/tasks/bootstrap_service.yml `` See `here
83
+ <https://github.com/stackhpc/kolla-ansible/pull/496/commits/9da473a63414493517da668075b8c958fec56e96> `__
84
+ for an example.
82
85
83
- .. code ::
86
+ .. code ::
87
+
88
+ command: bash -c 'sudo -E kolla_set_configs && nova-manage api_db sync && nova-manage db sync --local_cell'
84
89
85
- command: bash -c 'sudo -E kolla_set_configs && nova-manage api_db sync && nova-manage db sync --local_cell'
90
+ This change will break new deployments and should be reverted once this
91
+ process is complete
92
+
93
+ .. _k-a-change :
86
94
87
- This change will break new deployments and should be reverted once this
88
- process is complete
95
+ 2. Cherry-pick ` this patch
96
+ <https://review.opendev.org/c/openstack/kolla-ansible/+/903178> `__
89
97
90
- 3. Re-install Kolla-Ansible from source in your Kolla-Ansible Python
91
- environment
98
+ .. code :: bash
92
99
93
- 4. Navigate to the directory containing your ``passwords.yml `` file
100
+ git fetch https://review.opendev.org/openstack/kolla-ansible refs/changes/78/903178/2 && git cherry-pick FETCH_HEAD
101
+
102
+ 3. Re-install Kolla-Ansible from source in your Kolla-Ansible Python
103
+ environment
104
+
105
+
106
+ 3. Navigate to the directory containing your ``passwords.yml `` file
94
107
(``kayobe-config/etc/kolla/passwords.yml `` OR
95
108
``kayobe-config/etc/kayobe/environments/envname/kolla/passwords.yml ``)
96
109
97
- 5 . Create a file called ``deletelist.txt `` and populate it with this content
110
+ 4 . Create a file called ``deletelist.txt `` and populate it with this content
98
111
(including all whitespace):
99
112
100
113
.. code ::
@@ -124,31 +137,42 @@ Full method
124
137
^haproxy_password
125
138
126
139
127
- 6 . Decrypt your ``passwords.yml `` file with ``ansible-vault ``
140
+ 5 . Decrypt your ``passwords.yml `` file with ``ansible-vault ``
128
141
129
- 7 . Delete all the passwords in the deletion list
142
+ 6 . Delete all the passwords in the deletion list
130
143
131
144
.. code :: bash
132
145
133
146
grep -vf deletelist.txt passwords.yml > new-passwords.yml
134
147
135
- 8 . Check the new file for basic formatting errors. If it looks correct,
148
+ 7 . Check the new file for basic formatting errors. If it looks correct,
136
149
replace the existing ``passwords.yml `` file with ``new-passwords.yml ``
137
150
138
151
.. code :: bash
139
152
140
153
rm passwords.yml && mv new-passwords.yml passwords.yml
141
154
142
- 9 . Use the ``rekey-hosts.yml `` playbook to rotate your SSH keys for hosts
155
+ 8 . Use the ``rekey-hosts.yml `` playbook to rotate your SSH keys for hosts
143
156
across the cloud. The playbook should exist under
144
157
``kayobe-config/etc/kayobe/ansible/ `` if not, merge the latest
145
158
``stackhpc-kayobe-config ``
146
159
147
- .. code :: bash
160
+ 1. Run the playbook to generate a new keypair and add it to the authorised
161
+ keys of your hosts.
148
162
149
- kayobe playbook run $KAYOBE_CONFIG_PATH /ansible/rekey-hosts.yml
163
+ .. code :: bash
150
164
151
- 10. Update the Pulp password
165
+ kayobe playbook run $KAYOBE_CONFIG_PATH /ansible/rekey-hosts.yml
166
+
167
+ 2. Ensure you can SSH to other nodes using the new keypair
168
+
169
+ 3. Re-run the playbook with arguments to remove the old keypair.
170
+
171
+ .. code :: bash
172
+
173
+ kayobe playbook run $KAYOBE_CONFIG_PATH /ansible/rekey-hosts.yml -t remove-key -e rekey_remove_existing_key=true
174
+
175
+ 9. Update the Pulp password
152
176
153
177
1. Generate a new Pulp password
154
178
@@ -164,11 +188,10 @@ Full method
164
188
165
189
kayobe seed service deploy -t seed-deploy-containers -kt none
166
190
167
- (note you may need to skip docker registry login since the password will
168
- now be ‘incorrect’ e.g. ``-e ``
169
- ``deploy_containers_registry_attempt_login ``)
191
+ (note you will need to skip Docker registry login since the password will
192
+ now be ‘incorrect’ e.g. ``-e deploy_containers_registry_attempt_login=false ``)
170
193
171
- 11 . Rotate ``horizon_secret_key ``
194
+ 10 . Rotate ``horizon_secret_key ``
172
195
173
196
1. Generate a new secret:
174
197
@@ -189,82 +212,81 @@ Full method
189
212
deleted & redeployed at a later date once all users have closed &
190
213
reopened their sessions.
191
214
192
- 12 . Update ``grafana_admin_password ``
215
+ 11 . Update ``grafana_admin_password ``
193
216
194
217
1. Generate a new Grafana Admin password
195
218
196
219
.. code :: bash
197
220
198
221
pwgen -s 40 1
199
222
200
- 2. Exec into the Grafana container on a controller
223
+ 2. Update the value of ``grafana_admin_password `` in ``passwords.yml ``
224
+
225
+ 3. Exec into the Grafana container on a controller
201
226
202
227
.. code :: bash
203
228
204
229
sudo docker exec -it grafana bash
205
230
206
- 3 . Run the password reset command, then enter the new password
231
+ 4 . Run the password reset command, then enter the new password
207
232
208
233
.. code :: bash
209
234
210
235
grafana-cli admin reset-admin-password --password-from-stdin
211
236
212
- 4. Update the value of ``grafana_admin_password `` in ``passwords.yml ``
213
-
214
- 13. Update the MariaDB database password
237
+ 12. Update the MariaDB database password
215
238
216
239
1. Generate a new secret:
217
240
218
241
.. code :: bash
219
242
220
243
pwgen -s 40 1
221
244
222
- 2. Exec into the MariaDB container on a controller
245
+ 2. Update ``database_password `` in ``passwords.yml `` with your new
246
+ password. Make a note of the old password.
247
+
248
+ 3. Exec into the MariaDB container on a controller
223
249
224
250
.. code :: bash
225
251
226
252
sudo docker exec -it mariadb bash
227
253
228
- 3 . Log in to the database. You will be prompted for the password. Use the
229
- existing value of ``database_password ``
254
+ 4 . Log in to the database. You will be prompted for the password. Use the
255
+ old value of ``database_password ``
230
256
231
257
.. code :: bash
232
258
233
259
mysql -uroot -p
234
260
235
- 4 . Check the current state of the ``root `` user
261
+ 5 . Check the current state of the ``root `` user
236
262
237
263
.. code :: bash
238
264
239
265
SELECT Host,User,Password FROM mysql.user WHERE User=' root' ;
240
266
241
- 5 . Update the password for the ``root `` user
267
+ 6 . Update the password for the ``root `` user
242
268
243
269
.. code :: bash
244
270
245
271
SET PASSWORD FOR ' root' @' %' = PASSWORD(' newpassword' );
246
272
247
- 6 . Check that the password hash has changed in the user list
273
+ 7 . Check that the password hash has changed in the user list
248
274
249
275
.. code :: bash
250
276
251
277
SELECT Host,User,Password FROM mysql.user WHERE User=' root' ;
252
278
253
- 7 . If there are any remaining root users with the old password e.g.
279
+ 8 . If there are any remaining root users with the old password e.g.
254
280
``root@localhost ``, change the password for them too
255
281
256
- 8. Update ``database_password `` in ``passwords.yml `` with your new
257
- password
258
-
259
-
260
282
.. _nova-change :
261
283
262
- 14. Update the Nova Database password
284
+ 13. Update the Nova Database password
285
+
263
286
.. warning ::
264
287
265
288
From this point onward, service may be disrupted
266
289
267
-
268
290
#. Create a new ``nova_database_password `` and store it in
269
291
``passwords.yml ``
270
292
@@ -296,51 +318,15 @@ Full method
296
318
``00000000-0000-0000-0000-000000000000 ``, change the above command
297
319
accordingly)
298
320
321
+ 14. Re-encrypt your ``passwords.yml `` file
299
322
300
- 15. Re-encrypt your ``passwords.yml `` file
301
-
302
-
303
- .. _k-a-change :
304
-
305
- 16. Delete the service users in Keystone. The exact users will depend on the
306
- deployment. Multinode example:
307
-
308
- .. note ::
309
-
310
- Alternatively, cherry-pick
311
- `this patch <https://review.opendev.org/c/openstack/kolla-ansible/+/903178 >`__
312
-
313
-
314
- .. code :: bash
315
-
316
- openstack user delete glance cinder placement nova neutron heat magnum magnum_trustee_domain_admin barbican designate
317
-
318
- 17. Stop services using RabbitMQ
323
+ 15. Stop all OpenStack services
319
324
320
325
.. code :: bash
321
326
322
327
kayobe playbook run $KAYOBE_CONFIG_PATH /ansible/stop-openstack-services.yml
323
328
324
- 18. Nuke RabbitMQ
325
-
326
- .. code :: bash
327
-
328
- kayobe overcloud host command run -l controllers --become --command " docker stop rabbitmq && docker rm rabbitmq && docker volume rm rabbitmq"
329
-
330
- 19. Reconfigure Overcloud services to apply changes
331
-
332
-
333
- .. warning ::
334
-
335
- VMs should continue running, but connections to them will briefly be
336
- disrupted when Neutron is redeployed
337
-
338
- .. code :: bash
339
-
340
- kayobe overcloud service deploy
341
-
342
-
343
- 20. Flush the Memcached data on all controllers (any old data will now be
329
+ 16. Flush the Memcached data on all controllers (any old data will now be
344
330
inaccessible)
345
331
346
332
#. Install Telnet (on one of the controllers)
@@ -367,31 +353,48 @@ Full method
367
353
flush_all
368
354
quit
369
355
370
- 21. Manually update ``heat_domain_admin_password ``
356
+ 17. Nuke RabbitMQ
357
+
358
+ .. code :: bash
359
+
360
+ kayobe overcloud host command run -l controllers --become --command " docker stop rabbitmq && docker rm rabbitmq && docker volume rm rabbitmq"
361
+
362
+ 19. Reconfigure Overcloud services to apply changes
363
+
364
+ .. warning ::
365
+
366
+ VMs should continue running, but connections to them will briefly be
367
+ disrupted when Neutron is redeployed when using ML2/OVS
368
+
369
+ .. code :: bash
370
+
371
+ kayobe overcloud service deploy
372
+
373
+ 20. Manually update ``heat_domain_admin_password ``
371
374
372
375
#. TODO: Instructions
373
376
This has not been tested yet
374
377
375
- 22 . Re-run Tempest to make sure everything has come back
378
+ 21 . Re-run Tempest to make sure everything has come back
376
379
377
- 23 . Inform other users of the steps they’ll need to take now that the secrets
380
+ 22 . Inform other users of the steps they’ll need to take now that the secrets
378
381
have been rotated:
379
382
380
383
1. SSH keys have been rotated, so the new key will have to be distributed
381
384
if individual user accounts are used
382
385
383
386
2. Any existing ``openrc `` files generated by Kolla Ansible will need to be
384
- re-generated or edited to use the new Kolla admin password
387
+ re-generated or edited to use the new Keystone admin password
385
388
386
- 24 . Create a PR to merge the new secrets into your main Kayobe configuration
389
+ 23 . Create a PR to merge the new secrets into your main Kayobe configuration
387
390
branch
388
391
389
392
.. warning ::
390
393
391
394
Unless you **really ** enjoyed this process, RE-ENCRYPT
392
395
``passwords.yml `` BEFORE COMMITTING
393
396
394
- 25 . Approximately 1 week after deploying, remove the old horizon secret key
397
+ 24 . Approximately 1 week after deploying, remove the old horizon secret key
395
398
from ``passwords.yml `` and reconfigure horizon
396
399
397
400
@@ -505,6 +508,7 @@ Full password list
505
508
docker_registry_password
506
509
secrets_pulp_password
507
510
redis_master_password
511
+ haproxy_password
508
512
keystone_ssh_key
509
513
private_key
510
514
public_key
0 commit comments