Skip to content
Snippets Groups Projects
Commit 6cf67a05 authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Replace config-external - horizon"

parents 00f35e55 4d518647
No related branches found
No related tags found
Loading
...@@ -5,6 +5,11 @@ ...@@ -5,6 +5,11 @@
state: "directory" state: "directory"
recurse: "yes" recurse: "yes"
- name: Copying horizon JSON configuration file
template:
src: "horizon.json.j2"
dest: "{{ node_config_directory }}/horizon/config.json"
- name: Copying over config(s) - name: Copying over config(s)
template: template:
src: "horizon.conf.j2" src: "horizon.conf.j2"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
insecure_registry: "{{ docker_insecure_registry }}" insecure_registry: "{{ docker_insecure_registry }}"
name: horizon name: horizon
image: "{{ horizon_image_full }}" image: "{{ horizon_image_full }}"
volumes: "{{ node_config_directory }}/horizon/:/opt/kolla/horizon/:ro" volumes: "{{ node_config_directory }}/horizon/:/opt/kolla/config_files/:ro"
env: env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['horizon'] when: inventory_hostname in groups['horizon']
{% set apache_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{% set apache_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{% set apache_file = '000-default.conf' if kolla_base_distro in ['ubuntu', 'debian'] else 'horizon.conf' %}
{
"command": "/usr/sbin/{{ apache_cmd }} -DFOREGROUND",
"config_files": [
{
"source": "/opt/kolla/config_files/horizon.conf",
"dest": "/etc/{{ apache_dir }}/{{ apache_file }}",
"owner": "horizon",
"perm": "0644"
},
{
"source": "/opt/kolla/config_files/local_settings",
"dest": "/etc/openstack-dashboard/local_settings",
"owner": "horizon",
"perm": "0644"
}
]
}
...@@ -7,17 +7,12 @@ source /opt/kolla/kolla-common.sh ...@@ -7,17 +7,12 @@ source /opt/kolla/kolla-common.sh
if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \
"${KOLLA_BASE_DISTRO}" == "debian" ]]; then "${KOLLA_BASE_DISTRO}" == "debian" ]]; then
CMD="/usr/sbin/apache2"
ARGS="-DFOREGROUND"
# Loading Apache2 ENV variables # Loading Apache2 ENV variables
source /etc/apache2/envvars source /etc/apache2/envvars
else
CMD="/usr/sbin/httpd"
ARGS="-DFOREGROUND"
fi fi
# Execute config strategy # Generate run command
set_configs python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
exec $CMD $ARGS exec $CMD
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment