Skip to content

Commit 21769b9

Browse files
authored
Merge pull request #32 from stackhpc/cert-rotation
Add useful details on ordering for cert rotation
2 parents 64540f3 + b2c6ed6 commit 21769b9

File tree

2 files changed

+42
-8
lines changed

2 files changed

+42
-8
lines changed

source/operations_and_monitoring.rst

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,21 +113,27 @@ On each controller:
113113
Some services may store data in a dedicated Docker volume, which can be removed
114114
with ``docker volume rm``.
115115

116-
Installing and Updating TLS Certificates
117-
----------------------------------------
116+
Installing TLS Certificates
117+
---------------------------
118118

119119
|tls_setup|
120120

121-
To configure TLS for the first time, we write a PEM file to the ``secrets.yml``
122-
file as ``secrets_kolla_external_tls_cert``. Use a command of this form:
121+
To configure TLS for the first time, we write the contents of a PEM
122+
file to the ``secrets.yml`` file as ``secrets_kolla_external_tls_cert``.
123+
Use a command of this form:
123124

124125
.. code-block:: console
125126
:substitutions:
126127
127128
kayobe# ansible-vault edit ${KAYOBE_CONFIG_PATH}/secrets.yml --vault-password-file=|vault_password_file_path|
128129
129130
Concatenate the contents of the certificate and key files to create
130-
``secrets_kolla_external_tls_cert``.
131+
``secrets_kolla_external_tls_cert``. The certificates should be installed in
132+
this order:
133+
134+
* TLS certificate for the |project_name| OpenStack endpoint |public_endpoint_fqdn|
135+
* Any intermediate certificates
136+
* The TLS certificate private key
131137

132138
In ``${KAYOBE_CONFIG_PATH}/kolla.yml``, set the following:
133139

@@ -136,16 +142,43 @@ In ``${KAYOBE_CONFIG_PATH}/kolla.yml``, set the following:
136142
kolla_enable_tls_external: True
137143
kolla_external_tls_cert: "{{ secrets_kolla_external_tls_cert }}"
138144
139-
To configure TLS, we need to reconfigure all services, as endpoint URLs need to
145+
To apply TLS configuration, we need to reconfigure all services, as endpoint URLs need to
140146
be updated in Keystone:
141147

142148
.. code-block:: console
143149
144150
kayobe# kayobe overcloud service reconfigure
145151
152+
Alternative Configuration
153+
+++++++++++++++++++++++++
154+
155+
As an alternative to writing the certificates as a variable to
156+
``secrets.yml``, it is also possible to write the same data to a file,
157+
``etc/kayobe/kolla/certificates/haproxy.pem``. The file should be
158+
vault-encrypted in the same manner as secrets.yml. In this instance,
159+
variable ``kolla_external_tls_cert`` does not need to be defined.
160+
161+
See `Kolla-Ansible TLS guide
162+
<https://docs.openstack.org/kolla-ansible/latest/admin/tls.html>`__ for
163+
further details.
164+
165+
Updating TLS Certificates
166+
-------------------------
167+
168+
Check the expiry date on an installed TLS certificate from a host that can
169+
reach the |project_name| OpenStack APIs:
170+
171+
.. code-block:: console
172+
:substitutions:
173+
174+
openstack# openssl s_client -connect |public_endpoint_fqdn|:443 2> /dev/null | openssl x509 -noout -dates
175+
176+
*NOTE*: Prometheus Blackbox monitoring can check certificates automatically
177+
and alert when expiry is approaching.
178+
146179
To update an existing certificate, for example when it has reached expiration,
147-
change the value of ``secrets_kolla_external_tls_cert`` and run the following
148-
command:
180+
change the value of ``secrets_kolla_external_tls_cert``, in the same order as
181+
above. Run the following command:
149182

150183
.. code-block:: console
151184

source/vars.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
.. |project_name| replace:: Acme
3636
.. |provisioning_net_cidr| replace:: 192.168.0.0/24
3737
.. |public_api_access_host| replace:: |control_host|
38+
.. |public_endpoint_fqdn| replace:: openstack.acme.example
3839
.. |public_network| replace:: public
3940
.. |public_subnet| replace:: 10.0.0.0/8
4041
.. |public_vip| replace:: 10.0.0.1

0 commit comments

Comments
 (0)