Use memcache for consoleauth and horizon
Unfortunately there was no was to avoid memcache for consoleauth, so we might as well take advantage of it for Horizon as well. Change-Id: Idd338a025b031f6b50fe0c9f03c2c8d862f9d4c0 Closes-Bug: #1504606 Closes-Bug: #1504800
This commit is contained in:
parent
63a2f61bc8
commit
2ea87ebdb7
@ -134,6 +134,7 @@ openstack_auth_v2:
|
|||||||
enable_glance: "yes"
|
enable_glance: "yes"
|
||||||
enable_haproxy: "yes"
|
enable_haproxy: "yes"
|
||||||
enable_keystone: "yes"
|
enable_keystone: "yes"
|
||||||
|
enable_memcached: "yes"
|
||||||
enable_mariadb: "yes"
|
enable_mariadb: "yes"
|
||||||
enable_neutron: "yes"
|
enable_neutron: "yes"
|
||||||
enable_nova: "yes"
|
enable_nova: "yes"
|
||||||
|
@ -117,21 +117,15 @@ LOCAL_PATH = '/tmp'
|
|||||||
# (usually behind a load-balancer). Either you have to make sure that a session
|
# (usually behind a load-balancer). Either you have to make sure that a session
|
||||||
# gets all requests routed to the same dashboard instance or you set the same
|
# gets all requests routed to the same dashboard instance or you set the same
|
||||||
# SECRET_KEY for all of them.
|
# SECRET_KEY for all of them.
|
||||||
SECRET_KEY='605f2a71e76a686b70eb'
|
SECRET_KEY='{{ horizon_secret_key }}'
|
||||||
|
|
||||||
# We recommend you use memcached for development; otherwise after every reload
|
# We recommend you use memcached for development; otherwise after every reload
|
||||||
# of the django development server, you will have to login again. To use
|
# of the django development server, you will have to login again. To use
|
||||||
# memcached set CACHES to something like
|
# memcached set CACHES to something like
|
||||||
#CACHES = {
|
|
||||||
# 'default': {
|
|
||||||
# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
|
|
||||||
# 'LOCATION': '127.0.0.1:11211',
|
|
||||||
# }
|
|
||||||
#}
|
|
||||||
|
|
||||||
CACHES = {
|
CACHES = {
|
||||||
'default': {
|
'default': {
|
||||||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
|
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
|
||||||
|
'LOCATION': '{% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,9 @@ linuxnet_interface_driver = nova.network.linux_net.BridgeInterfaceDriver
|
|||||||
|
|
||||||
allow_resize_to_same_host = true
|
allow_resize_to_same_host = true
|
||||||
|
|
||||||
|
memcached_servers = {% for host in groups['memcached'] %}{{ hostvars[host]['ansible_' + api_interface]['ipv4']['address'] }}:{{ memcached_port }}{% if not loop.last %},{% endif %}{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
# Though my_ip is not used directly, lots of other variables use $my_ip
|
# Though my_ip is not used directly, lots of other variables use $my_ip
|
||||||
my_ip = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
|
my_ip = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
---
|
---
|
||||||
dependencies:
|
dependencies:
|
||||||
- { role: common }
|
- { role: common }
|
||||||
- { role: memcached }
|
|
||||||
|
@ -7,6 +7,10 @@
|
|||||||
roles:
|
roles:
|
||||||
- { role: haproxy, tags: haproxy, when: enable_haproxy | bool }
|
- { role: haproxy, tags: haproxy, when: enable_haproxy | bool }
|
||||||
|
|
||||||
|
- hosts: memcached
|
||||||
|
roles:
|
||||||
|
- { role: memcached, tags: memcache, memcached, when: enable_memcached | bool }
|
||||||
|
|
||||||
- hosts: mariadb
|
- hosts: mariadb
|
||||||
roles:
|
roles:
|
||||||
- { role: mariadb, tags: mariadb, when: enable_mariadb | bool }
|
- { role: mariadb, tags: mariadb, when: enable_mariadb | bool }
|
||||||
|
@ -93,6 +93,7 @@ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
|
|||||||
python-tuskarclient \
|
python-tuskarclient \
|
||||||
python-zaqarclient \
|
python-zaqarclient \
|
||||||
python-openstackclient \
|
python-openstackclient \
|
||||||
MySQL-python
|
MySQL-python \
|
||||||
|
python-memcached
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -56,6 +56,7 @@ murano_keystone_password: "password"
|
|||||||
ironic_database_password: "password"
|
ironic_database_password: "password"
|
||||||
ironic_keystone_password: "password"
|
ironic_keystone_password: "password"
|
||||||
|
|
||||||
|
horizon_secret_key: "password"
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# RabbitMQ options
|
# RabbitMQ options
|
||||||
|
Loading…
Reference in New Issue
Block a user