Merge "Adapt to Octavia Certificate Configuration Guide."

This commit is contained in:
Zuul 2020-04-29 11:46:54 +00:00 committed by Gerrit Code Review
commit 8d4157a510
7 changed files with 78 additions and 34 deletions

View File

@ -94,9 +94,10 @@
- inventory_hostname in groups[service.group] - inventory_hostname in groups[service.group]
- service.enabled | bool - service.enabled | bool
with_items: with_items:
- cakey.pem - client.cert-and-key.pem
- ca_01.pem - client_ca.cert.pem
- client.pem - server_ca.cert.pem
- server_ca.key.pem
notify: notify:
- Restart octavia-worker container - Restart octavia-worker container
@ -112,9 +113,10 @@
- inventory_hostname in groups[service.group] - inventory_hostname in groups[service.group]
- service.enabled | bool - service.enabled | bool
with_items: with_items:
- cakey.pem - client.cert-and-key.pem
- ca_01.pem - client_ca.cert.pem
- client.pem - server_ca.cert.pem
- server_ca.key.pem
notify: notify:
- Restart octavia-housekeeping container - Restart octavia-housekeeping container
@ -130,9 +132,10 @@
- inventory_hostname in groups[service.group] - inventory_hostname in groups[service.group]
- service.enabled | bool - service.enabled | bool
with_items: with_items:
- cakey.pem - client.cert-and-key.pem
- ca_01.pem - client_ca.cert.pem
- client.pem - server_ca.cert.pem
- server_ca.key.pem
notify: notify:
- Restart octavia-health-manager container - Restart octavia-health-manager container

View File

@ -35,6 +35,13 @@
- container_facts['octavia_health_manager'] is not defined - container_facts['octavia_health_manager'] is not defined
- inventory_hostname in groups['octavia-health-manager'] - inventory_hostname in groups['octavia-health-manager']
- name: Warn about certificate changes
debug:
msg: >-
Octavia's certificate configuration has been changed since Train. The new
configuration requires 4 PEM files. Please check certificate configuration
guide at https://docs.openstack.org/octavia/latest/admin/guides/certificates.html
- name: Checking certificate files exist for octavia - name: Checking certificate files exist for octavia
stat: stat:
path: "{{ node_custom_config }}/octavia/{{ item }}" path: "{{ node_custom_config }}/octavia/{{ item }}"
@ -44,6 +51,7 @@
failed_when: not result.stat.exists failed_when: not result.stat.exists
when: inventory_hostname in groups['octavia-worker'] when: inventory_hostname in groups['octavia-worker']
with_items: with_items:
- cakey.pem - client.cert-and-key.pem
- ca_01.pem - client_ca.cert.pem
- client.pem - server_ca.cert.pem
- server_ca.key.pem

View File

@ -8,20 +8,26 @@
"perm": "0600" "perm": "0600"
}, },
{ {
"source": "{{ container_config_directory }}/cakey.pem", "source": "{{ container_config_directory }}/client.cert-and-key.pem",
"dest": "/etc/octavia/certs/private/cakey.pem", "dest": "/etc/octavia/certs/client.cert-and-key.pem",
"owner": "octavia", "owner": "octavia",
"perm": "0600" "perm": "0600"
}, },
{ {
"source": "{{ container_config_directory }}/ca_01.pem", "source": "{{ container_config_directory }}/client_ca.cert.pem",
"dest": "/etc/octavia/certs/ca_01.pem", "dest": "/etc/octavia/certs/client_ca.cert.pem",
"owner": "octavia", "owner": "octavia",
"perm": "0600" "perm": "0600"
}, },
{ {
"source": "{{ container_config_directory }}/client.pem", "source": "{{ container_config_directory }}/server_ca.cert.pem",
"dest": "/etc/octavia/certs/client.pem", "dest": "/etc/octavia/certs/server_ca.cert.pem",
"owner": "octavia",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/server_ca.key.pem",
"dest": "/etc/octavia/certs/server_ca.key.pem",
"owner": "octavia", "owner": "octavia",
"perm": "0600" "perm": "0600"
} }

View File

@ -8,20 +8,26 @@
"perm": "0600" "perm": "0600"
}, },
{ {
"source": "{{ container_config_directory }}/cakey.pem", "source": "{{ container_config_directory }}/client.cert-and-key.pem",
"dest": "/etc/octavia/certs/private/cakey.pem", "dest": "/etc/octavia/certs/client.cert-and-key.pem",
"owner": "octavia", "owner": "octavia",
"perm": "0600" "perm": "0600"
}, },
{ {
"source": "{{ container_config_directory }}/ca_01.pem", "source": "{{ container_config_directory }}/client_ca.cert.pem",
"dest": "/etc/octavia/certs/ca_01.pem", "dest": "/etc/octavia/certs/client_ca.cert.pem",
"owner": "octavia", "owner": "octavia",
"perm": "0600" "perm": "0600"
}, },
{ {
"source": "{{ container_config_directory }}/client.pem", "source": "{{ container_config_directory }}/server_ca.cert.pem",
"dest": "/etc/octavia/certs/client.pem", "dest": "/etc/octavia/certs/server_ca.cert.pem",
"owner": "octavia",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/server_ca.key.pem",
"dest": "/etc/octavia/certs/server_ca.key.pem",
"owner": "octavia", "owner": "octavia",
"perm": "0600" "perm": "0600"
} }

View File

@ -8,20 +8,26 @@
"perm": "0600" "perm": "0600"
}, },
{ {
"source": "{{ container_config_directory }}/cakey.pem", "source": "{{ container_config_directory }}/client.cert-and-key.pem",
"dest": "/etc/octavia/certs/private/cakey.pem", "dest": "/etc/octavia/certs/client.cert-and-key.pem",
"owner": "octavia", "owner": "octavia",
"perm": "0600" "perm": "0600"
}, },
{ {
"source": "{{ container_config_directory }}/ca_01.pem", "source": "{{ container_config_directory }}/client_ca.cert.pem",
"dest": "/etc/octavia/certs/ca_01.pem", "dest": "/etc/octavia/certs/client_ca.cert.pem",
"owner": "octavia", "owner": "octavia",
"perm": "0600" "perm": "0600"
}, },
{ {
"source": "{{ container_config_directory }}/client.pem", "source": "{{ container_config_directory }}/server_ca.cert.pem",
"dest": "/etc/octavia/certs/client.pem", "dest": "/etc/octavia/certs/server_ca.cert.pem",
"owner": "octavia",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/server_ca.key.pem",
"dest": "/etc/octavia/certs/server_ca.key.pem",
"owner": "octavia", "owner": "octavia",
"perm": "0600" "perm": "0600"
} }

View File

@ -11,8 +11,8 @@ bind_port = {{ octavia_api_listen_port }}
[certificates] [certificates]
ca_private_key_passphrase = {{ octavia_ca_password }} ca_private_key_passphrase = {{ octavia_ca_password }}
ca_private_key = /etc/octavia/certs/private/cakey.pem ca_private_key = /etc/octavia/certs/server_ca.key.pem
ca_certificate = /etc/octavia/certs/ca_01.pem ca_certificate = /etc/octavia/certs/server_ca.cert.pem
{% if enable_barbican | bool %} {% if enable_barbican | bool %}
region_name = {{ openstack_region_name }} region_name = {{ openstack_region_name }}
endpoint_type = internal endpoint_type = internal
@ -20,8 +20,8 @@ ca_certificates_file = {{ openstack_cacert }}
{% endif %} {% endif %}
[haproxy_amphora] [haproxy_amphora]
server_ca = /etc/octavia/certs/ca_01.pem server_ca = /etc/octavia/certs/server_ca.cert.pem
client_cert = /etc/octavia/certs/client.pem client_cert = /etc/octavia/certs/client.cert-and-key.pem
[database] [database]
connection = mysql+pymysql://{{ octavia_database_user }}:{{ octavia_database_password }}@{{ octavia_database_address }}/{{ octavia_database_name }} connection = mysql+pymysql://{{ octavia_database_user }}:{{ octavia_database_password }}@{{ octavia_database_address }}/{{ octavia_database_name }}
@ -68,6 +68,7 @@ amp_image_tag = amphora
amp_secgroup_list = {{ octavia_amp_secgroup_list }} amp_secgroup_list = {{ octavia_amp_secgroup_list }}
amp_flavor_id = {{ octavia_amp_flavor_id }} amp_flavor_id = {{ octavia_amp_flavor_id }}
amp_ssh_key_name = octavia_ssh_key amp_ssh_key_name = octavia_ssh_key
client_ca = /etc/octavia/certs/client_ca.cert.pem
network_driver = allowed_address_pairs_driver network_driver = allowed_address_pairs_driver
compute_driver = compute_nova_driver compute_driver = compute_nova_driver
amphora_driver = amphora_haproxy_rest_driver amphora_driver = amphora_haproxy_rest_driver

View File

@ -0,0 +1,14 @@
---
fixes:
- |
Adapt Octavia to the latest dual CA certificate configuration. The
following files should exist in ``/etc/kolla/config/octavia/``:
* ``client.cert-and-key.pem``
* ``client_ca.cert.pem``
* ``server_ca.cert.pem``
* ``server_ca.key.pem``
See the `Octavia documentation
<https://docs.openstack.org/octavia/latest/admin/guides/certificates.html>`__
for details on generating these files.