diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-10-15 15:01:02 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-10-15 15:01:02 +0000 |
| commit | 12ddac000c50f025861221949d9c5388524cf279 (patch) | |
| tree | 79797de2d3dedbaebdc58a6552c54faa23c49769 | |
| parent | f2182332909d670e4f9bf4f0661e042a8c35dcb0 (diff) | |
| parent | 2ea87ebdb7b15011c2825d23dc160ef0aa76fa0e (diff) | |
| download | kolla-12ddac000c50f025861221949d9c5388524cf279.tar.gz kolla-12ddac000c50f025861221949d9c5388524cf279.zip | |
Merge "Use memcache for consoleauth and horizon"
| -rw-r--r-- | ansible/group_vars/all.yml | 1 | ||||
| -rw-r--r-- | ansible/roles/horizon/templates/local_settings.j2 | 12 | ||||
| -rw-r--r-- | ansible/roles/nova/templates/nova.conf.j2 | 3 | ||||
| -rw-r--r-- | ansible/roles/swift/meta/main.yml | 1 | ||||
| -rwxr-xr-x | ansible/site.yml | 4 | ||||
| -rw-r--r-- | docker/openstack-base/Dockerfile.j2 | 3 | ||||
| -rw-r--r-- | etc/kolla/passwords.yml | 1 |
7 files changed, 14 insertions, 11 deletions
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 76dba6f08..845c7e443 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -134,6 +134,7 @@ openstack_auth_v2: enable_glance: "yes" enable_haproxy: "yes" enable_keystone: "yes" +enable_memcached: "yes" enable_mariadb: "yes" enable_neutron: "yes" enable_nova: "yes" diff --git a/ansible/roles/horizon/templates/local_settings.j2 b/ansible/roles/horizon/templates/local_settings.j2 index baf53dcdc..f0ab43030 100644 --- a/ansible/roles/horizon/templates/local_settings.j2 +++ b/ansible/roles/horizon/templates/local_settings.j2 @@ -117,21 +117,15 @@ LOCAL_PATH = '/tmp' # (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 # 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 # of the django development server, you will have to login again. To use # memcached set CACHES to something like -#CACHES = { -# 'default': { -# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', -# 'LOCATION': '127.0.0.1:11211', -# } -#} - CACHES = { '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 %}', } } diff --git a/ansible/roles/nova/templates/nova.conf.j2 b/ansible/roles/nova/templates/nova.conf.j2 index 98300fc03..b8855d3bc 100644 --- a/ansible/roles/nova/templates/nova.conf.j2 +++ b/ansible/roles/nova/templates/nova.conf.j2 @@ -32,6 +32,9 @@ linuxnet_interface_driver = nova.network.linux_net.BridgeInterfaceDriver 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 my_ip = {{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }} diff --git a/ansible/roles/swift/meta/main.yml b/ansible/roles/swift/meta/main.yml index f478e6912..6b4fff8fe 100644 --- a/ansible/roles/swift/meta/main.yml +++ b/ansible/roles/swift/meta/main.yml @@ -1,4 +1,3 @@ --- dependencies: - { role: common } - - { role: memcached } diff --git a/ansible/site.yml b/ansible/site.yml index 00e8f64f9..f89884f23 100755 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -7,6 +7,10 @@ roles: - { role: haproxy, tags: haproxy, when: enable_haproxy | bool } +- hosts: memcached + roles: + - { role: memcached, tags: memcache, memcached, when: enable_memcached | bool } + - hosts: mariadb roles: - { role: mariadb, tags: mariadb, when: enable_mariadb | bool } diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2 index fda017c0c..62d09941f 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -95,6 +95,7 @@ RUN ln -s openstack-base-source/* /requirements \ python-tuskarclient \ python-zaqarclient \ python-openstackclient \ - MySQL-python + MySQL-python \ + python-memcached {% endif %} diff --git a/etc/kolla/passwords.yml b/etc/kolla/passwords.yml index 04a30e797..03afac043 100644 --- a/etc/kolla/passwords.yml +++ b/etc/kolla/passwords.yml @@ -56,6 +56,7 @@ murano_keystone_password: "password" ironic_database_password: "password" ironic_keystone_password: "password" +horizon_secret_key: "password" #################### # RabbitMQ options |
