Support for RHEL
Change-Id: I829c9e71bc24845e852228d3ced7ec5b29c8a29b
diff --git a/horizon/files/requirements/kilo_contrail.txt b/horizon/files/requirements/kilo_contrail.txt
index c8086c1..db24635 100644
--- a/horizon/files/requirements/kilo_contrail.txt
+++ b/horizon/files/requirements/kilo_contrail.txt
@@ -1,5 +1,5 @@
# PBR should always appear first
-pbr>=0.6,!=0.7,<1.0
+pbr>=0.6,!=0.7
# Horizon Core Requirements
Babel>=1.3
Django>=1.4.2,<1.7
@@ -72,4 +72,4 @@
argparse
cliff>=1.6.0
simplejson>=2.2.0
-python-memcached
\ No newline at end of file
+python-memcached
diff --git a/horizon/files/requirements/kilo_vanilla.txt b/horizon/files/requirements/kilo_vanilla.txt
index 637c842..7222d31 100644
--- a/horizon/files/requirements/kilo_vanilla.txt
+++ b/horizon/files/requirements/kilo_vanilla.txt
@@ -1,5 +1,5 @@
# PBR should always appear first
-pbr>=0.6,!=0.7,<1.0
+pbr>=0.6,!=0.7
# Horizon Core Requirements
Babel>=1.3
Django>=1.4.2,<1.7
@@ -67,4 +67,4 @@
raven
horizon-contrib>=2015.7.6
-python-memcached
\ No newline at end of file
+python-memcached
diff --git a/horizon/map.jinja b/horizon/map.jinja
index be1311c..4e509a9 100644
--- a/horizon/map.jinja
+++ b/horizon/map.jinja
@@ -1,6 +1,10 @@
{% set server = salt['grains.filter_by']({
'Debian': {
'pkgs': ['openstack-dashboard', 'python-lesscpy', 'python-memcache'],
+ 'pkgs_multi': ['python-memcache', 'python-psycopg2', 'python-imaging',
+ 'python-docutils', 'python-simplejson', 'build-essential',
+ 'libxslt1-dev', 'libxml2-dev', 'libffi-dev', 'libssl-dev',
+ 'gettext', 'python-lesscpy'],
'ssl_pkgs': ['openstack-dashboard'],
'service': 'apache2',
'config': '/etc/openstack-dashboard/local_settings.py',
@@ -12,7 +16,11 @@
'cache': {'host': '127.0.0.1', 'port': 11211}
},
'RedHat': {
- 'pkgs': ['openstack-dashboard', 'python-memcached'],
+ 'pkgs': ['openstack-dashboard', 'python-lesscpy', 'python-memcached'],
+ 'pkgs_multi': ['python-memcached', 'python-psycopg2', 'python-pillow',
+ 'python-docutils', 'python-simplejson', 'libxslt-devel', 'gcc',
+ 'libxml2-devel', 'libffi-devel', 'openssl-devel',
+ 'gettext', 'python-lesscpy'],
'ssl_pkgs': ['mod_ssl'],
'service': 'httpd',
'config': '/etc/openstack-dashboard/local_settings',
diff --git a/horizon/server/multi/init.sls b/horizon/server/multi/init.sls
index ae995a7..63fa6f4 100644
--- a/horizon/server/multi/init.sls
+++ b/horizon/server/multi/init.sls
@@ -2,56 +2,6 @@
{%- if server.enabled %}
include:
-- git
-- python
-
-{% if grains.os_family == 'Debian' %}
-
-horizon_packages:
- pkg.installed:
- - names:
- - python-memcache
- - python-psycopg2
- - python-imaging
- - python-docutils
- - python-simplejson
- - build-essential
- - libxslt1-dev
- - libxml2-dev
- - libffi-dev
- - libssl-dev
- - gettext
- - require:
- - pkg: python_packages
- pip.installed:
- - name: lesscpy
- - require:
- - pkg: python_packages
-
-{% endif %}
-
-{% if grains.os_family == 'RedHat' %}
-
-horizon_packages:
- pkg.installed:
- - names:
- - python-imaging
- - python-docutils
- - python-simplejson
- - gettext
- - require:
- - pkg: python_packages
- pip.installed:
- - name: lesscpy
- - require:
- - pkg: python_packages
-
-{%- endif %}
-
-/var/log/horizon:
- file.directory:
- - mode: 770
- - user: horizon
- - group: root
+- horizon.server.multi.service_git
{%- endif %}
diff --git a/horizon/server/multi/service_git.sls b/horizon/server/multi/service_git.sls
index aab3df3..8367190 100644
--- a/horizon/server/multi/service_git.sls
+++ b/horizon/server/multi/service_git.sls
@@ -5,54 +5,11 @@
- git
- python
-{% if grains.os_family == 'Debian' %}
-
horizon_packages:
pkg.installed:
- - names:
- - python-memcache
- - python-psycopg2
- - python-imaging
- - python-docutils
- - python-simplejson
- - build-essential
- - libxslt1-dev
- - libxml2-dev
- - libffi-dev
- - libssl-dev
- - gettext
+ - names: {{ server.pkgs_multi }}
- require:
- pkg: python_packages
- pip.installed:
- - name: lesscpy
- - require:
- - pkg: python_packages
-
-{% endif %}
-
-{% if grains.os_family == 'RedHat' %}
-
-horizon_packages:
- pkg.installed:
- - names:
- - python-imaging
- - python-docutils
- - python-simplejson
- - gettext
- - require:
- - pkg: python_packages
- pip.installed:
- - name: lesscpy
- - require:
- - pkg: python_packages
-
-{%- endif %}
-
-/var/log/horizon:
- file.directory:
- - mode: 770
- - user: horizon
- - group: root
{%- endif %}
diff --git a/horizon/server/multi/site.sls b/horizon/server/multi/site.sls
index 35552af..178d5fb 100644
--- a/horizon/server/multi/site.sls
+++ b/horizon/server/multi/site.sls
@@ -10,6 +10,14 @@
- system: True
- home: /srv/horizon
+/var/log/horizon:
+ file.directory:
+ - mode: 770
+ - user: horizon
+ - group: root
+ - require:
+ - user: horizon_user
+
/srv/horizon/sites:
file.directory:
- makedirs: true
@@ -41,7 +49,6 @@
- require:
- file: /srv/horizon/sites
- pkg: horizon_packages
- - pip: horizon_packages
{{ app_name }}_{{ app.source.address }}:
git.latest: