Copy certifications info octavia housekeeping and health manager container

octavia-housekeeping container need certifications to create spare
amphore instances.

octavia-health-manager container need certifications to create stable
amphore instances.

Change-Id: I90b9c4c39f6542bb1ee5f40a8d0a39ae8d0ab2b0
Closes-Bug: #1719063
This commit is contained in:
Jeffrey Zhang 2017-09-23 14:58:23 +08:00
parent 8103b90325
commit ef85df2335
4 changed files with 73 additions and 1 deletions

View File

@ -39,6 +39,7 @@
- service.enabled | bool
- config_json.changed | bool
or octavia_conf.changed | bool
or octavia_health_manager_certificate.changed | bool
or octavia_health_manager_container.changed | bool
- name: Restart octavia-housekeeping container
@ -60,6 +61,7 @@
- service.enabled | bool
- config_json.changed | bool
or octavia_conf.changed | bool
or octavia_housekeeping_certificate.changed | bool
or octavia_housekeeping_container.changed | bool
- name: Restart octavia-worker container

View File

@ -42,7 +42,7 @@
notify:
- "Restart {{ item.key }} container"
- name: Copying certificate files
- name: Copying certificate files for octavia-worker
vars:
service: "{{ octavia_services['octavia-worker'] }}"
copy:
@ -59,6 +59,40 @@
notify:
- Restart octavia-worker container
- name: Copying certificate files for octavia-housekeeping
vars:
service: "{{ octavia_services['octavia-housekeeping'] }}"
copy:
src: "{{ node_custom_config }}/octavia/{{ item }}"
dest: "{{ node_config_directory }}/octavia-housekeeping/{{ item }}"
register: octavia_housekeeping_certificate
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_items:
- cakey.pem
- ca_01.pem
- client.pem
notify:
- Restart octavia-housekeeping container
- name: Copying certificate files for octavia-health-manager
vars:
service: "{{ octavia_services['octavia-health-manager'] }}"
copy:
src: "{{ node_custom_config }}/octavia/{{ item }}"
dest: "{{ node_config_directory }}/octavia-health-manager/{{ item }}"
register: octavia_health_manager_certificate
when:
- inventory_hostname in groups[service.group]
- service.enabled | bool
with_items:
- cakey.pem
- ca_01.pem
- client.pem
notify:
- Restart octavia-health-manager container
- name: Check octavia containers
kolla_docker:
action: "compare_container"

View File

@ -6,6 +6,24 @@
"dest": "/etc/octavia/octavia.conf",
"owner": "octavia",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/cakey.pem",
"dest": "/etc/octavia/certs/private/cakey.pem",
"owner": "octavia",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/ca_01.pem",
"dest": "/etc/octavia/certs/ca_01.pem",
"owner": "octavia",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/client.pem",
"dest": "/etc/octavia/certs/client.pem",
"owner": "octavia",
"perm": "0600"
}
]
}

View File

@ -6,6 +6,24 @@
"dest": "/etc/octavia/octavia.conf",
"owner": "octavia",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/cakey.pem",
"dest": "/etc/octavia/certs/private/cakey.pem",
"owner": "octavia",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/ca_01.pem",
"dest": "/etc/octavia/certs/ca_01.pem",
"owner": "octavia",
"perm": "0600"
},
{
"source": "{{ container_config_directory }}/client.pem",
"dest": "/etc/octavia/certs/client.pem",
"owner": "octavia",
"perm": "0600"
}
]
}