Merge "Drop Travis CI support"
diff --git a/README.rst b/README.rst
index fea13b7..a79e1f3 100644
--- a/README.rst
+++ b/README.rst
@@ -665,30 +665,3 @@
* https://github.com/openstack/horizon
* http://dijks.wordpress.com/2012/07/06/how-to-change-screen-resolution-of-novnc-client-in-openstack-essex-dashboard-nova-horizon/
-
-
-Documentation and Bugs
-======================
-
-* http://salt-formulas.readthedocs.io/
- Learn how to install and update salt-formulas
-
-* https://github.com/salt-formulas/salt-formula-horizon/issues
- In the unfortunate event that bugs are discovered, report the issue to the
- appropriate issue tracker. Use the Github issue tracker for a specific salt
- formula
-
-* https://launchpad.net/salt-formulas
- For feature requests, bug reports, or blueprints affecting the entire
- ecosystem, use the Launchpad salt-formulas project
-
-* https://launchpad.net/~salt-formulas-users
- Join the salt-formulas-users team and subscribe to mailing list if required
-
-* https://github.com/salt-formulas/salt-formula-horizon
- Develop the salt-formulas projects in the master branch and then submit pull
- requests against a specific formula
-
-* #salt-formulas @ irc.freenode.net
- Use this IRC channel in case of any questions or feedback which is always
- welcome
diff --git a/debian/control b/debian/control
index 305b378..2974450 100644
--- a/debian/control
+++ b/debian/control
@@ -1,5 +1,5 @@
Source: salt-formula-horizon
-Maintainer: PKG OpenStack <openstack-devel@lists.alioth.debian.org>
+Maintainer: Mirantis Dev <dev@mirantis.com>
Uploaders: Filip Pytloun <filip@pytloun.cz>,
OndÅ™ej Nový <onovy@debian.org>,
Section: admin
@@ -9,7 +9,7 @@
Build-Depends-Indep: python-all,
python-yaml,
Standards-Version: 3.9.6
-Homepage: https://wiki.openstack.org/wiki/OpenStackSalt
+Homepage: https://www.mirantis.com
Vcs-Browser: https://anonscm.debian.org/cgit/openstack/salt-formula-horizon.git/
Vcs-Git: https://anonscm.debian.org/git/openstack/salt-formula-horizon.git
diff --git a/debian/copyright b/debian/copyright
index 10bca0d..9a7d6ac 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -3,7 +3,7 @@
Source: https://github.com/openstack/salt-formula-horizon
Files: *
-Copyright: 2014-2016 tcp cloud
+Copyright: 2014-2019 Mirantis Inc. et al
License: Apache-2.0
Files: debian/*
diff --git a/horizon/files/horizon_settings/_local_settings.py b/horizon/files/horizon_settings/_local_settings.py
index 59fc1d2..cc8d0db 100644
--- a/horizon/files/horizon_settings/_local_settings.py
+++ b/horizon/files/horizon_settings/_local_settings.py
@@ -1,4 +1,4 @@
-{%- from "horizon/map.jinja" import server with context %}
+{%- from "horizon/map.jinja" import server,default_cache_backend with context %}
{%- if server.app is defined %}
{%- set app = salt['pillar.get']('horizon:server:app:'+app_name) %}
@@ -20,7 +20,7 @@
CACHES = {
'default': {
- 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
+ 'BACKEND': "{{ app.cache.get('backend', default_cache_backend) }}",
{%- if app.cache.members is defined %}
'LOCATION': "{%- for member in app.cache.members %}{{ member.host }}:{{ member.port }}{% if not loop.last %};{% endif %}{%- endfor %}"
{%- else %}
diff --git a/horizon/map.jinja b/horizon/map.jinja
index bac43f0..3779d69 100644
--- a/horizon/map.jinja
+++ b/horizon/map.jinja
@@ -2,13 +2,34 @@
{%- set multidomain = salt['pillar.get']('horizon:server:multidomain', 'False') %}
{%- set default_domain = salt['pillar.get']('horizon:server:default_domain', 'default') %}
+{%- set default_cache_backend = 'django.core.cache.backends.memcached.MemcachedCache' %}
+
+{%- if not salt['pillar.get']('horizon:server:cache:backend') %}
+ {%- if salt['pillar.get']('horizon:server:version') not in ['mitaka','newton'] %}
+ {%- set cache_pkgs = ['python-pylibmc'] %}
+ {%- set default_cache_backend = 'django.core.cache.backends.memcached.PyLibMCCache' %}
+ {%- else %}
+ {% if grains['os_family'] == 'RedHat' %}
+ {%- set cache_pkgs = ['python-memcached'] %}
+ {% elif grains['os_family'] == 'Debian' %}
+ {%- set cache_pkgs = ['python-memcache'] %}
+ {% endif %}
+ {%- endif %}
+{%- elif salt['pillar.get']('horizon:server:cache:backend') == 'django.core.cache.backends.memcached.MemcachedCache' %}
+ {% if grains['os_family'] == 'RedHat' %}
+ {%- set cache_pkgs = ['python-memcached'] %}
+ {% elif grains['os_family'] == 'Debian' %}
+ {%- set cache_pkgs = ['python-memcache'] %}
+ {% endif %}
+{%- endif %}
+
{% set server = salt['grains.filter_by']({
'Debian': {
- 'pkgs': [dashboard_package, 'python-lesscpy', 'python-memcache', 'gettext-base'],
- 'pkgs_multi': ['python-memcache', 'python-psycopg2', 'python-imaging',
+ 'pkgs': [dashboard_package, 'python-lesscpy', 'gettext-base'] + cache_pkgs,
+ 'pkgs_multi': ['python-psycopg2', 'python-imaging',
'python-docutils', 'python-simplejson', 'build-essential',
'libxslt1-dev', 'libxml2-dev', 'libffi-dev', 'libssl-dev',
- 'gettext', 'python-lesscpy'],
+ 'gettext', 'python-lesscpy'] + cache_pkgs,
'ssl_pkgs': [dashboard_package],
'service': 'apache2',
'policy_files_path': '/usr/share/openstack-dashboard/openstack_dashboard/conf',
@@ -22,11 +43,11 @@
'cache': {'host': '127.0.0.1', 'port': 11211}
},
'RedHat': {
- 'pkgs': ['httpd', dashboard_package, 'python-lesscpy', 'python-memcached'],
- 'pkgs_multi': ['python-memcached', 'python-psycopg2', 'python-pillow',
+ 'pkgs': ['httpd', dashboard_package, 'python-lesscpy'] + cache_pkgs,
+ 'pkgs_multi': ['python-psycopg2', 'python-pillow',
'python-docutils', 'python-simplejson', 'libxslt-devel', 'gcc',
'libxml2-devel', 'libffi-devel', 'openssl-devel',
- 'gettext', 'python-lesscpy'],
+ 'gettext', 'python-lesscpy'] + cache_pkgs,
'ssl_pkgs': ['mod_ssl'],
'service': 'httpd',
'policy_files_path': '/usr/share/openstack-dashboard/openstack_dashboard/conf',
@@ -41,4 +62,4 @@
},
}, merge=salt['pillar.get']('horizon:server')) %}
-{% set upgrade = pillar.get('horizon', {}).get('upgrade', {}) %}
+{% set upgrade = pillar.get('horizon', {}).get('upgrade', {}) %}
\ No newline at end of file
diff --git a/horizon/upgrade/upgrade/init.sls b/horizon/upgrade/upgrade/init.sls
index e372805..203fb8b 100644
--- a/horizon/upgrade/upgrade/init.sls
+++ b/horizon/upgrade/upgrade/init.sls
@@ -6,9 +6,7 @@
- text: "Running horizon.upgrade.upgrade"
include:
- - horizon.upgrade.upgrade.pre
- horizon.upgrade.service_stopped
- horizon.upgrade.pkgs_latest
- horizon.upgrade.render_config
- horizon.upgrade.service_running
- - horizon.upgrade.upgrade.post
diff --git a/metadata.yml b/metadata.yml
index 20dc81c..aeef4ee 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -3,6 +3,6 @@
source: "https://github.com/openstack/salt-formula-horizon"
dependencies:
- name: linux
- source: "https://github.com/salt-formulas/salt-formula-linux"
+ source: "https://gerrit.mcp.mirantis.com/salt-formulas/linux"
- name: apache
- source: "https://github.com/salt-formulas/salt-formula-apache"
+ source: "https://gerrit.mcp.mirantis.com/salt-formulas/apache"