Merge "tripleo_keystone: Use tripleo_container_standalone"

This commit is contained in:
Zuul 2022-05-13 18:08:03 +00:00 committed by Gerrit Code Review
commit 0af8894d9b
7 changed files with 48 additions and 114 deletions

View File

@ -23,19 +23,6 @@ tripleo_keystone_debug: "{{ (ansible_verbosity | int) >= 2 | bool }}"
tripleo_keystone_hide_sensitive_logs: true
tripleo_keystone_image: ""
tripleo_keystone_common_volumes:
- /etc/hosts:/etc/hosts:ro
- /etc/localtime:/etc/localtime:ro
# OpenSSL trusted CAs
- /etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:ro
- /etc/pki/ca-trust/source/anchors:/etc/pki/ca-trust/source/anchors:ro
- /etc/pki/tls/certs/ca-bundle.crt:/etc/pki/tls/certs/ca-bundle.crt:ro
- /etc/pki/tls/certs/ca-bundle.trust.crt:/etc/pki/tls/certs/ca-bundle.trust.crt:ro
- /etc/pki/tls/cert.pem:/etc/pki/tls/cert.pem:ro
# Syslog socket
- /dev/log:/dev/log
# required for bootstrap_host_exec
- /etc/puppet:/etc/puppet:ro
tripleo_keystone_volumes:
- /etc/openldap:/etc/openldap:ro

View File

@ -0,0 +1,18 @@
command: /usr/sbin/httpd
config_files:
- source: "/var/lib/kolla/config_files/src/etc/keystone/fernet-keys"
dest: "/etc/keystone/fernet-keys"
merge: false
preserve_properties: true
- source: "/var/lib/kolla/config_files/src/etc/httpd/conf.d"
dest: "/etc/httpd/conf.d"
merge: false
preserve_properties: true
- source: "/var/lib/kolla/config_files/src/etc/httpd/conf.modules.d"
dest: "/etc/httpd/conf.modules.d"
merge: false
preserve_properties: true
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true

View File

@ -0,0 +1,6 @@
command: /usr/sbin/crond -n
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"
merge: true
preserve_properties: true

View File

@ -15,40 +15,13 @@
# under the License.
# "tripleo_keystone" will search for and load any operating system variable file
# found within the "vars/" path. If no OS files are found the task will skip.
- name: Gather variables for each operating system
include_vars: "{{ item }}"
with_first_found:
- skip: true
files:
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
- "{{ ansible_facts['distribution'] | lower }}.yml"
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
- "{{ ansible_facts['os_family'] | lower }}.yml"
tags:
- always
- name: Create /var/lib/tripleo-config/container-startup-config/keystone-bootstrap
file:
path: /var/lib/tripleo-config/container-startup-config/keystone-bootstrap
state: directory
- name: Render keystone-bootstrap container definitions
copy:
content: "{{ lookup('template', item ~ '.yaml.j2') | from_yaml }}"
dest: /var/lib/tripleo-config/container-startup-config/keystone-bootstrap/{{ item }}.json
with_items:
- keystone_bootstrap
- keystone_cron
- name: Run keystone-bootstrap containers
- name: Manage keystone-bootstrap containers
include_role:
name: tripleo_container_manage
name: tripleo_container_standalone
vars:
tripleo_container_manage_config: '/var/lib/tripleo-config/container-startup-config/keystone-bootstrap'
tripleo_container_manage_config_patterns: '*.json'
tripleo_container_manage_config_id: keystone-bootstrap
tripleo_container_standalone_service: keystone-bootstrap
tripleo_container_standalone_container_defs:
keystone_cron: "{{ lookup('template', 'keystone_cron.yaml.j2') | from_yaml }}"
keystone_bootstrap: "{{ lookup('template', 'keystone_bootstrap.yaml.j2') | from_yaml }}"
tripleo_container_standalone_kolla_config_files:
keystone_cron: "{{ lookup('file', 'files/keystone_cron.yaml') | from_yaml }}"

View File

@ -15,37 +15,12 @@
# under the License.
# "tripleo_keystone" will search for and load any operating system variable file
# found within the "vars/" path. If no OS files are found the task will skip.
- name: Gather variables for each operating system
include_vars: "{{ item }}"
with_first_found:
- skip: true
files:
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
- "{{ ansible_facts['distribution'] | lower }}.yml"
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
- "{{ ansible_facts['os_family'] | lower }}.yml"
tags:
- always
- name: Create /var/lib/tripleo-config/container-startup-config/keystone-db-sync
file:
path: /var/lib/tripleo-config/container-startup-config/keystone-db-sync
state: directory
- name: Render keystone_db_sync container definition
copy:
content: "{{ lookup('template', 'keystone_db_sync.yaml.j2') | from_yaml }}"
dest: /var/lib/tripleo-config/container-startup-config/keystone-db-sync/keystone_db_sync.json
- name: Run keystone_db_sync container
- name: Manage keystone-db-sync containers
include_role:
name: tripleo_container_manage
name: tripleo_container_standalone
vars:
tripleo_container_manage_config: '/var/lib/tripleo-config/container-startup-config/keystone-db-sync'
tripleo_container_manage_config_patterns: '*.json'
tripleo_container_manage_config_id: keystone-db-sync
tripleo_container_standalone_service: keystone-db-sync
tripleo_container_standalone_container_defs:
keystone_db_sync: "{{ lookup('template', 'keystone_db_sync.yaml.j2') | from_yaml }}"
tripleo_container_standalone_kolla_config_files:
keystone: "{{ lookup('file', 'files/keystone.yaml') | from_yaml }}"

View File

@ -15,37 +15,13 @@
# under the License.
# "tripleo_keystone" will search for and load any operating system variable file
# found within the "vars/" path. If no OS files are found the task will skip.
- name: Gather variables for each operating system
include_vars: "{{ item }}"
with_first_found:
- skip: true
files:
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
- "{{ ansible_facts['distribution'] | lower }}.yml"
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
- "{{ ansible_facts['os_family'] | lower }}.yml"
tags:
- always
- name: Create /var/lib/tripleo-config/container-startup-config/keystone
file:
path: /var/lib/tripleo-config/container-startup-config/keystone
state: directory
- name: Render keystone container definition
copy:
content: "{{ lookup('template', 'keystone.yaml.j2') | from_yaml }}"
dest: /var/lib/tripleo-config/container-startup-config/keystone/keystone.json
- name: Run keystone container
- name: Manage keystone containers
include_role:
name: tripleo_container_manage
name: tripleo_container_standalone
vars:
tripleo_container_manage_config: '/var/lib/tripleo-config/container-startup-config/keystone'
tripleo_container_manage_config_patterns: '*.json'
tripleo_container_manage_config_id: keystone
tripleo_container_standalone_service: keystone
tripleo_container_standalone_container_defs:
keystone: "{{ lookup('template', 'keystone.yaml.j2') | from_yaml }}"
keystone_bootstrap: "{{ lookup('template', 'keystone_bootstrap.yaml.j2') | from_yaml }}"
tripleo_container_standalone_kolla_config_files:
keystone: "{{ lookup('file', 'files/keystone.yaml') | from_yaml }}"

View File

@ -9,7 +9,6 @@ volumes:
{% set keystone_volumes = [] %}
{%- set keystone_volumes =
keystone_volumes +
tripleo_keystone_common_volumes +
tripleo_keystone_volumes +
tripleo_keystone_logging_volumes +
tripleo_keystone_internal_tls_volumes -%}
@ -17,6 +16,6 @@ volumes:
{%- set keystone_volumes =
keystone_volumes + tripleo_keystone_internal_tls_ca_file -%}
{%- endif -%}
{{ keystone_volumes }}
{{ tripleo_container_standalone_common_volumes | default([]) + keystone_volumes }}
environment:
KOLLA_CONFIG_STRATEGY: COPY_ALWAYS