Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
30374207
Commit
30374207
authored
Sep 29, 2014
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cluster all to one machine.
Alsa, add connection logging to rabbitmq.
parent
b01577ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
playbooks/edx-east/cluster_rabbitmq.yml
+8
-8
playbooks/roles/rabbitmq/templates/etc/rabbitmq/rabbitmq.config.j2
+5
-5
No files found.
playbooks/edx-east/cluster_rabbitmq.yml
View file @
30374207
# ansible-playbook -i ec2.py c
ommoncluster
.yml --limit tag_Name_stage-edx-commoncluster -e@/path/to/vars/env-deployment.yml -T 30 --list-hosts
# ansible-playbook -i ec2.py c
luster_rabbitmq
.yml --limit tag_Name_stage-edx-commoncluster -e@/path/to/vars/env-deployment.yml -T 30 --list-hosts
-
hosts
:
all
sudo
:
True
...
...
@@ -28,14 +28,14 @@
tasks
:
-
debug
:
msg="{{ ansible_ec2_local_ipv4 }}"
with_items
:
list.results
-
shell
:
echo "rabbit@ip-{{ item|replace('.', '-') }}"
when
:
item != ansible_ec2_local_ipv4
with_items
:
hostvars.keys()
register
:
list
# - name: The main ip to cluster to.
# shell: echo "rabbit@ip-{{ item|replace('.', '-') }}"
# when: item != ansible_ec2_local_ipv4
# with_items: hostvars.keys()
# register: list
-
command
:
rabbitmqctl stop_app
-
command
:
rabbitmqctl join_cluster {{ item.stdout }}
when
:
item.stdout is defined
with_items
:
list.results
-
command
:
rabbitmqctl join_cluster rabbit@ip-{{ hostvars.keys()[0]|replace('.', '-') }}
when
:
hostvars.keys()[0] != ansible_ec2_local_ipv4
-
command
:
rabbitmqctl start_app
post_tasks
:
-
debug
:
var="{{ ansible_ec2_instance_id }}"
...
...
playbooks/roles/rabbitmq/templates/etc/rabbitmq/rabbitmq.config.j2
View file @
30374207
% {{ ansible_managed }}
[{rabbit,
{log_levels, [{connection, info}]},
{% if RABBITMQ_CLUSTERED -%}
{%- set hosts= [] -%}
...
...
@@ -7,14 +9,12 @@
{% do hosts.append("rabbit@ip-" + host.replace('.','-')) %}
{%- endfor %}
[{rabbit,
[{cluster_nodes, {['{{ hosts|join("\',\'") }}'], disc}}]}].
[{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'
#}
[{rabbit,
[{cluster_nodes, {['{{ rabbitmq_clustered_hosts|join("\',\'") }}'], disc}}]}].
[{cluster_nodes, {['{{ rabbitmq_clustered_hosts|join("\',\'") }}'], disc}}]
{%- endif -%}
}].
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment