aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchenshuai@huawei.com <chenshuai@huawei.com>2016-01-06 16:52:03 +0800
committerchenshuai@huawei.com <chenshuai@huawei.com>2016-01-06 16:52:03 +0800
commitef44ca47c6e8d3fbda915c79630bba0db15a4c84 (patch)
tree4f6a4d184098d691a6ec9f05dd96cd1066a3a7c1
parent946eb1fca19b9d25ec4d55f639b07cbd233f4fe0 (diff)
bugfix: remove rabbitmq codes in opencontrail role
JIRA: COMPASS-253 Change-Id: I53911352eb96a15257a513ea4154f93147dd283c Signed-off-by: chenshuai@huawei.com <chenshuai@huawei.com>
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/main.yml4
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/-rabbitmq-stop.yml30
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-rabbitmq.yml104
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-conf-single.j26
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-conf.j225
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-cookie.j21
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-env-conf.j22
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/vars/main.yml2
8 files changed, 1 insertions, 173 deletions
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
index 93f22117..e3e1b3e5 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
@@ -58,10 +58,6 @@
# when: groups['opencontrail_control']|length !=0
-#- name: Provision rabbitmq on config for Open Contrail
-# include: provision/provision-rabbitmq.yml
-# when: inventory_hostname in groups['opencontrail_config']
-
- name: Provision increase limits for Open Contrail
include: provision/provision-increase-limits.yml
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/-rabbitmq-stop.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/-rabbitmq-stop.yml
deleted file mode 100755
index ec6b2fe0..00000000
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/-rabbitmq-stop.yml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- name: 'stop rabbitmq server'
- service:
- name: 'rabbitmq-server'
- state: 'stopped'
-
-- name: 'check beam process'
- shell: 'ps ax | grep -v grep | grep beam'
- register: beam_process
- changed_when: no
- ignore_errors: yes
-
-- name: 'kill beam processes'
- shell: 'pkill -9 beam'
- when: beam_process.stdout
-
-- name: 'check epmd process'
- shell: 'ps ax | grep -v grep | grep epmd'
- register: epmd_process
- changed_when: no
- ignore_errors: yes
-
-- name: 'kill epmd processes'
- shell: 'pkill -9 epmd'
- when: epmd_process.stdout
-
-- name: 'remove mnesia directory'
- file:
- name: '/var/lib/rabbitmq/mnesia'
- state: 'absent'
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-rabbitmq.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-rabbitmq.yml
deleted file mode 100755
index 58037bce..00000000
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-rabbitmq.yml
+++ /dev/null
@@ -1,104 +0,0 @@
----
-#- hosts: config
-# sudo: yes
-# tasks:
-- name: "start supervisor support service"
-# sudo: True
- service:
- name: "supervisor-support-service"
- state: "started"
-
-
-
-- name: "stop rabbitmq server via supervisor"
-# sudo: True
- supervisorctl:
- name: "rabbitmq-server"
- state: "stopped"
- server_url: "unix:///tmp/supervisord_support_service.sock"
-
-
-
-- name: "-rabbitmq-stop"
-# sudo: True
- include: -rabbitmq-stop.yml
-
-
-
-- name: "update hosts"
-# sudo: True
- lineinfile:
- dest: "/etc/hosts"
-# line: "{{ hostvars[item]['contrail_address'] }}\t{{ hostvars[item]['ansible_hostname'] }} {{ hostvars[item]['ansible_hostname'] }}-ctrl"
- line: "{{ contrail_address }}\t{{ inventory_hostname }} {{ inventory_hostname }}-ctrl"
- with_items: groups['opencontrail_config']
-
-
-
-- name: "fix up rabbitmq env"
-# sudo: True
- template:
- src: "provision/rabbitmq-env-conf.j2"
- dest: "/etc/rabbitmq/rabbitmq-env.conf"
-
-
-
-- name: "fix up rabbitmq config for single node"
-# sudo: True
- template:
- src: "provision/rabbitmq-conf-single.j2"
- dest: "/etc/rabbitmq/rabbitmq.config"
- when: groups['opencontrail_config'][1] is not defined
-
-
-
-- name: fix up rabbitmq config for multi nodes
-# sudo: True
- template:
- src: "provision/rabbitmq-conf.j2"
- dest: "/etc/rabbitmq/rabbitmq.config"
- when: groups['opencontrail_config'][1] is defined
-
-
-
-- name: "-rabbitmq-stop"
-# sudo: True
- include: -rabbitmq-stop.yml
-
-
-
-- name: "create cookie uuid temporary"
-# sudo: True
- local_action:
- module: "template"
- src: "provision/rabbitmq-cookie.j2"
- dest: "/tmp/tmp-rabbitmq-cookie"
- run_once: yes
-
-
-- name: "update cookie uuid"
-# sudo: True
- copy:
- src: "/tmp/tmp-rabbitmq-cookie"
- dest: "/var/lib/rabbitmq/.erlang.cookie"
- owner: "rabbitmq"
- group: "rabbitmq"
- mode: 0400
-
-
-
-- name: "delete temporary cookie uuid"
-# sudo: True
- local_action:
- module: "file"
- dest: "/tmp/tmp-rabbitmq-cookie"
- state: "absent"
- run_once: yes
-
-
-
-- name: "start rabbitmq server"
-# sudo: True
- service:
- name: "rabbitmq-server"
- state: "started"
diff --git a/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-conf-single.j2 b/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-conf-single.j2
deleted file mode 100755
index a276d3e2..00000000
--- a/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-conf-single.j2
+++ /dev/null
@@ -1,6 +0,0 @@
-[
- {rabbit, [ {tcp_listeners, [{"{{ contrail_address }}", 5672}]},
- {loopback_users, []},
- {log_levels,[{connection, info},{mirroring, info}]} ]
- }
-].
diff --git a/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-conf.j2 b/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-conf.j2
deleted file mode 100755
index c8cbe63f..00000000
--- a/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-conf.j2
+++ /dev/null
@@ -1,25 +0,0 @@
-[
- {rabbit, [ {tcp_listeners, [{"{{ contrail_address }}", 5672}]}, {cluster_partition_handling, autoheal},{loopback_users, []},
- {cluster_nodes, {[{% for cur_host in groups['opencontrail_config'] %}'rabbit@{{ cur_host }}-ctrl'{% if not loop.last %}, {% endif %}{% endfor %}], disc}},
- {vm_memory_high_watermark, 0.4},
- {disk_free_limit,50000000},
- {log_levels,[{connection, info},{mirroring, info}]},
- {heartbeat,10},
- {delegate_count,20},
- {channel_max,5000},
- {tcp_listen_options,
- [binary,
- {packet, raw},
- {reuseaddr, true},
- {backlog, 128},
- {nodelay, true},
- {exit_on_close, false},
- {keepalive, true}
- ]
- },
- {collect_statistics_interval, 60000}
- ]
- },
- {rabbitmq_management_agent, [ {force_fine_statistics, true} ] },
- {kernel, [{net_ticktime, 30}]}
-].
diff --git a/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-cookie.j2 b/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-cookie.j2
deleted file mode 100755
index 838d0332..00000000
--- a/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-cookie.j2
+++ /dev/null
@@ -1 +0,0 @@
-{{ ansible_date_time.iso8601_micro | to_uuid }}
diff --git a/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-env-conf.j2 b/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-env-conf.j2
deleted file mode 100755
index 6728eddb..00000000
--- a/deploy/adapters/ansible/roles/open-contrail/templates/provision/rabbitmq-env-conf.j2
+++ /dev/null
@@ -1,2 +0,0 @@
-NODE_IP_ADDRESS={{ contrail_address }}
-NODENAME=rabbit@{{ inventory_hostname }}-ctrl
diff --git a/deploy/adapters/ansible/roles/open-contrail/vars/main.yml b/deploy/adapters/ansible/roles/open-contrail/vars/main.yml
index e19b1fbf..83eea5a3 100755
--- a/deploy/adapters/ansible/roles/open-contrail/vars/main.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/vars/main.yml
@@ -31,7 +31,7 @@ contrail_router_asn: "64512"
### Modify when need openstack provisioning
keystone_provision: no
install_nova: no
-rabbit_password: "console"
+rabbit_password: {{ RABBIT_PASS }}
contrail_tor_agents:
- name: "test01"