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

Merge "Add ansible support for Horizon"

parents f07f4387 5137f6b3
No related branches found
No related tags found
No related merge requests found
......@@ -127,9 +127,9 @@ enable_neutron: "yes"
enable_nova: "yes"
enable_rabbitmq: "yes"
# Additional option OpenStack services are specified here
# Additional optional OpenStack services are specified here
enable_cinder: "no"
enable_horizon: "yes"
####################
# RabbitMQ options
......
......@@ -12,6 +12,7 @@ localhost ansible_connection=local
[storage]
localhost ansible_connection=local
# You can explicitly specify which hosts run each project by updating the
# groups in the sections below. Common services are grouped together.
[haproxy:children]
......@@ -41,6 +42,9 @@ control
[memcached:children]
control
[horizon:children]
control
# Additional control implemented here. These groups allow you to control which
# services run on which hosts at a per-service level.
......
......@@ -18,6 +18,7 @@ compute01
[storage]
storage01
# You can explicitly specify which hosts run each project by updating the
# groups in the sections below. Common services are grouped together.
[haproxy:children]
......@@ -47,6 +48,9 @@ control
[memcached:children]
control
[horizon:children]
control
# Additional control implemented here. These groups allow you to control which
# services run on which hosts at a per-service level.
......
---
project_name: "horizon"
####################
# Docker
####################
horizon_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-horizon"
horizon_tag: "{{ openstack_release }}"
horizon_image_full: "{{ horizon_image }}:{{ horizon_tag }}"
---
dependencies:
- { role: common }
---
- name: Ensuring config directory exists
file:
path: "{{ node_config_directory }}/horizon/"
state: "directory"
recurse: "yes"
- name: Copying over config(s)
template:
src: "horizon.conf.j2"
dest: "{{ node_config_directory }}/horizon/horizon.conf"
- name: Copying over config(s)
template:
src: "local_settings.j2"
dest: "{{ node_config_directory }}/horizon/local_settings"
---
- include: config.yml
- include: start.yml
---
- name: Starting horizon container
docker:
docker_api_version: "{{ docker_api_version }}"
net: host
pull: "{{ docker_pull_policy }}"
restart_policy: "{{ docker_restart_policy }}"
restart_policy_retry: "{{ docker_restart_policy_retry }}"
state: reloaded
registry: "{{ docker_registry }}"
username: "{{ docker_registry_username }}"
password: "{{ docker_registry_password }}"
insecure_registry: "{{ docker_insecure_registry }}"
name: horizon
image: "{{ horizon_image_full }}"
volumes: "{{ node_config_directory }}/horizon/:/opt/kolla/horizon/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['horizon']
{% set apache_dir = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
Listen {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}:80
<VirtualHost *:80>
LogLevel warn
ErrorLog /var/log/{{ apache_dir }}/horizon.log
CustomLog /var/log/{{ apache_dir }}/horizon-access.log combined
WSGIScriptReloading On
WSGIDaemonProcess horizon-http processes=5 threads=1 user=horizon group=horizon display-name=%{GROUP}
WSGIProcessGroup horizon-http
WSGIScriptAlias / /usr/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi
WSGIPassAuthorization On
<Location "/">
Require all granted
</Location>
Alias /static /usr/lib/python2.7/site-packages/static
<Location "/static">
SetHandler None
</Location>
</Virtualhost>
This diff is collapsed.
......@@ -30,3 +30,7 @@
- hosts: [cinder-api, cinder-backup, cinder-scheduler, cinder-volume]
roles:
- { role: cinder, tags: cinder, when: enable_cinder | bool }
- hosts: horizon
roles:
- { role: horizon, tags: horizon, when: enable_horizon | bool }
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