Updated keystone for wsgi in config-external
This will switch config-external to using wsgi vs evenlet for keystone. Partially Implements: blueprint ansible-service Change-Id: I85a88c813ed36d827916796199dad735b2d44b40
This commit is contained in:
parent
c97ccd6a5f
commit
11597cc2f4
@ -6,9 +6,9 @@
|
||||
vars:
|
||||
container_detach: False
|
||||
container_environment:
|
||||
BOOTSTRAP:
|
||||
CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
KOLLA_BOOTSTRAP:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
container_image: "{{ docker_keystone_image_full }}"
|
||||
container_name: "bootstrap_keystone"
|
||||
container_volumes:
|
||||
- "{{ node_config_directory }}/keystone/:/opt/kolla/configs/keystone/:ro"
|
||||
- "{{ node_config_directory }}/keystone/:/opt/kolla/keystone/:ro"
|
||||
|
@ -14,3 +14,8 @@
|
||||
- "{{ node_templates_directory }}/keystone/keystone.conf_messaging"
|
||||
- "{{ node_templates_directory }}/keystone/keystone.conf_augment"
|
||||
config_dest: "{{ node_config_directory }}/keystone/keystone.conf"
|
||||
|
||||
- name: Copying over config(s)
|
||||
template:
|
||||
src: "wsgi-keystone.conf.j2"
|
||||
dest: "{{ node_config_directory }}/keystone/wsgi-keystone.conf"
|
||||
|
@ -2,8 +2,8 @@
|
||||
- include: ../../start.yml
|
||||
vars:
|
||||
container_environment:
|
||||
CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
container_image: "{{ docker_keystone_image_full }}"
|
||||
container_name: "keystone"
|
||||
container_volumes:
|
||||
- "{{ node_config_directory }}/keystone/:/opt/kolla/configs/keystone/:ro"
|
||||
- "{{ node_config_directory }}/keystone/:/opt/kolla/keystone/:ro"
|
||||
|
@ -2,12 +2,7 @@
|
||||
verbose = {{ keystone_logging_verbose }}
|
||||
debug = {{ keystone_logging_debug }}
|
||||
|
||||
bind_host = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
|
||||
|
||||
admin_token = {{ keystone_admin_token }}
|
||||
|
||||
public_endpoint = http://{{ keystone_public_address }}:{{ keystone_public_port }}
|
||||
admin_endpoint = http://{{ keystone_admin_address }}:{{ keystone_admin_port }}
|
||||
|
||||
[database]
|
||||
connection = mysql://{{ keystone_database_user }}:{{ keystone_database_password }}@{{ keystone_database_address }}/{{ keystone_database_name }}
|
||||
|
28
ansible/roles/keystone/templates/wsgi-keystone.conf.j2
Normal file
28
ansible/roles/keystone/templates/wsgi-keystone.conf.j2
Normal file
@ -0,0 +1,28 @@
|
||||
Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ keystone_public_port }}
|
||||
Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:{{ keystone_admin_port }}
|
||||
|
||||
<VirtualHost *:{{ keystone_public_port }}>
|
||||
WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
|
||||
WSGIProcessGroup keystone-public
|
||||
WSGIScriptAlias / /var/www/cgi-bin/keystone/main
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIPassAuthorization On
|
||||
<IfVersion >= 2.4>
|
||||
ErrorLogFormat "%{cu}t %M"
|
||||
</IfVersion>
|
||||
ErrorLog /var/log/keystone/keystone.log
|
||||
CustomLog /var/log/keystone/keystone_access.log combined
|
||||
</VirtualHost>
|
||||
|
||||
<VirtualHost *:{{ keystone_admin_port }}>
|
||||
WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP}
|
||||
WSGIProcessGroup keystone-admin
|
||||
WSGIScriptAlias / /var/www/cgi-bin/keystone/admin
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
WSGIPassAuthorization On
|
||||
<IfVersion >= 2.4>
|
||||
ErrorLogFormat "%{cu}t %M"
|
||||
</IfVersion>
|
||||
ErrorLog /var/log/keystone/keystone.log
|
||||
CustomLog /var/log/keystone/keystone_access.log combined
|
||||
</VirtualHost>
|
@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -f /opt/kolla/keystone/wsgi-keystone.conf ]]; then
|
||||
cp /opt/kolla/keystone/wsgi-keystone.conf /etc/httpd/conf.d/
|
||||
chown root:keystone /etc/httpd/conf.d/wsgi-keystone.conf
|
||||
chmod 0644 /etc/httpd/conf.d/wsgi-keystone.conf
|
||||
fi
|
||||
|
||||
if [[ -f /opt/kolla/keystone/keystone.conf ]]; then
|
||||
cp /opt/kolla/keystone/keystone.conf /etc/keystone/keystone.conf
|
||||
chown keystone: /etc/keystone/keystone.conf
|
||||
|
@ -2,17 +2,19 @@
|
||||
|
||||
set -o errexit
|
||||
|
||||
CMD="/usr/bin/keystone-all"
|
||||
ARGS=""
|
||||
CMD="/usr/sbin/httpd"
|
||||
ARGS="-DFOREGROUND"
|
||||
|
||||
# loading common functions
|
||||
# Loading common functions.
|
||||
source /opt/kolla/kolla-common.sh
|
||||
|
||||
# Config-internal script exec out of this function, it does not return here.
|
||||
set_configs
|
||||
|
||||
# Bootstrap and exit if BOOTSTRAP variable is set
|
||||
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
|
||||
# of the KOLLA_BOOTSTRAP variable being set, including empty.
|
||||
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
|
||||
su -c "keystone-manage db_sync" keystone
|
||||
su -s /bin/sh -c "keystone-manage db_sync" keystone
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user