diff options
Diffstat (limited to 'deploy')
-rw-r--r-- | deploy/adapters/ansible/openstack/templates/nova.conf | 5 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/memcached/tasks/main.yml | 15 | ||||
-rwxr-xr-x | deploy/network.sh | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/openstack/templates/nova.conf b/deploy/adapters/ansible/openstack/templates/nova.conf index eb7ec053..114453ee 100644 --- a/deploy/adapters/ansible/openstack/templates/nova.conf +++ b/deploy/adapters/ansible/openstack/templates/nova.conf @@ -37,7 +37,6 @@ instance_usage_audit_period = hour notify_on_state_change = vm_and_task_state notification_driver = nova.openstack.common.notifier.rpc_notifier notification_driver = ceilometer.compute.nova_notifier -memcached_servers = {{ memcached_servers }} osapi_compute_workers = {{ api_workers }} metadata_workers = {{ api_workers }} @@ -119,3 +118,7 @@ rabbit_password = {{ RABBIT_PASS }} rabbit_port = 5672 rabbit_userid = {{ RABBIT_USER }} +[cache] +backend = dogpile.cache.memcached +enabled = True +memcache_servers = {{ memcached_servers }} diff --git a/deploy/adapters/ansible/roles/memcached/tasks/main.yml b/deploy/adapters/ansible/roles/memcached/tasks/main.yml index a4457f36..2b4b7ec7 100644 --- a/deploy/adapters/ansible/roles/memcached/tasks/main.yml +++ b/deploy/adapters/ansible/roles/memcached/tasks/main.yml @@ -19,6 +19,8 @@ - name: install packages action: "{{ ansible_pkg_mgr }} name={{ item }} state=latest update_cache=yes" with_items: "{{ packages | union(packages_noarch) }}" + notify: + - restart memcahed services - name: enable auto start file: @@ -32,4 +34,17 @@ notify: - restart memcahed services +- name: change memcache listen ip + lineinfile: + dest=/etc/sysconfig/memcached + regexp="^OPTIONS=.*" + line="OPTIONS=\"-l 0.0.0.0\"" + when: ansible_os_family == "RedHat" + notify: + - restart memcahed services + +- name: generate memcached service list + lineinfile: dest=/opt/service create=yes line='{{ item }}' + with_items: "{{ services | union(services_noarch) }}" + - meta: flush_handlers diff --git a/deploy/network.sh b/deploy/network.sh index 558d690c..0f5a7d5d 100755 --- a/deploy/network.sh +++ b/deploy/network.sh @@ -47,6 +47,7 @@ function save_network_info() ip_info=`ip addr show $external_nic|grep -Eo '[^ ]+ brd [^ ]+ '` if [ $br_exist -eq 0 ]; then if [ "$external_nic" != "br-external" ]; then + sudo ip link set br-external up sudo ovs-vsctl --may-exist add-port br-external $external_nic sudo ip addr flush $external_nic sudo ip addr add $ip_info dev br-external @@ -54,6 +55,7 @@ function save_network_info() fi else sudo ovs-vsctl add-br br-external + sudo ip link set br-external up sudo ovs-vsctl add-port br-external $external_nic sudo ip addr flush $external_nic sudo ip addr add $ip_info dev br-external |