Commit 1565b21b by Feanil Patel

Merge pull request #2099 from edx/feanil/rabbit_cluster_changes

Stop using the RABBITMQ_CLUSTERED var and tooling.
parents 1e8b9b35 935a529f
- Role: rabbitmq
- Removed the RABBITMQ_CLUSTERED var and related tooling. The goal of the var was to be able to setup a cluster in the aws environment without having to know all the IPs of the cluster before hand. It relied on the `hostvars` ansible varible to work correctly which it no longer does in 1.9. This may get fixed in the future but for now, the "magic" setup doesn't work.
- Changed `rabbitmq_clustered_hosts` to RABBITMQ_CLUSTERED_HOSTS.
- Role: edxapp - Role: edxapp
- Removed SUBDOMAIN_BRANDING and SUBDOMAIN_COURSE_LISTINGS variables - Removed SUBDOMAIN_BRANDING and SUBDOMAIN_COURSE_LISTINGS variables
......
...@@ -33,7 +33,7 @@ script.disable_dynamic: true ...@@ -33,7 +33,7 @@ script.disable_dynamic: true
# to perform discovery when new nodes (master or data) are started: # to perform discovery when new nodes (master or data) are started:
# #
# discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"] # discovery.zen.ping.unicast.hosts: ["host1", "host2:port", "host3[portX-portY]"]
{%- if ELASTICSEARCH_CLUSTER_MEMBERS|length > 1 -%} {% if ELASTICSEARCH_CLUSTER_MEMBERS|length > 1 -%}
discovery.zen.ping.unicast.hosts: ['{{ELASTICSEARCH_CLUSTER_MEMBERS|join("\',\'") }}'] discovery.zen.ping.unicast.hosts: ['{{ELASTICSEARCH_CLUSTER_MEMBERS|join("\',\'") }}']
......
...@@ -19,11 +19,11 @@ RABBIT_USERS: ...@@ -19,11 +19,11 @@ RABBIT_USERS:
- name: 'celery' - name: 'celery'
password: 'celery' password: 'celery'
RABBITMQ_CLUSTERED: !!null
RABBITMQ_VHOSTS: RABBITMQ_VHOSTS:
- '/' - '/'
RABBITMQ_CLUSTERED_HOSTS: []
# Internal role variables below this line # Internal role variables below this line
# option to force deletion of the mnesia dir # option to force deletion of the mnesia dir
...@@ -56,7 +56,5 @@ rabbitmq_auth_config: ...@@ -56,7 +56,5 @@ rabbitmq_auth_config:
erlang_cookie: "{{ RABBIT_ERLANG_COOKIE }}" erlang_cookie: "{{ RABBIT_ERLANG_COOKIE }}"
admins: "{{ RABBIT_USERS }}" admins: "{{ RABBIT_USERS }}"
rabbitmq_clustered_hosts: []
rabbitmq_plugins: rabbitmq_plugins:
- rabbitmq_management - rabbitmq_management
...@@ -2,19 +2,8 @@ ...@@ -2,19 +2,8 @@
[{rabbit, [ [{rabbit, [
{log_levels, [{connection, info}]}, {log_levels, [{connection, info}]},
{% if RABBITMQ_CLUSTERED -%} {#
{%- set hosts= [] -%}
{%- for host in hostvars.keys() -%}
{% do hosts.append("rabbit@ip-" + host.replace('.','-')) %}
{%- endfor %}
{cluster_nodes, {['{{ hosts|join("\',\'") }}'], disc}}
{%- else -%}
{# If rabbitmq_clustered_hosts is set, use that instead assuming an aws stack.
Note: That these names should include the node name prefix. eg. 'rabbit@hostname' Note: That these names should include the node name prefix. eg. 'rabbit@hostname'
#} #}
{cluster_nodes, {['{{ rabbitmq_clustered_hosts|join("\',\'") }}'], disc}} {cluster_nodes, {['{{ RABBITMQ_CLUSTERED_HOSTS|join("\',\'") }}'], disc}}
{%- endif %}
]}]. ]}].
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
serial: 1 serial: 1
gather_facts: True gather_facts: True
vars: vars:
rabbitmq_clustered_hosts: RABBITMQ_CLUSTERED_HOSTS:
- "rabbit@cluster1" - "rabbit@cluster1"
- "rabbit@cluster2" - "rabbit@cluster2"
- "rabbit@cluster3" - "rabbit@cluster3"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment