Skip to content

Commit

Permalink
added RABBITMQ_NET_TICKTIME and RABBITMQ_CLUSTER_PARTITION_HANDLING e…
Browse files Browse the repository at this point in the history
…nv variables, due to #11
  • Loading branch information
Erhan KESKEN committed Oct 27, 2016
1 parent d83bbdb commit 265302f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ENV RABBITMQ_ERLANG_COOKIE= \
RABBITMQ_DEFAULT_VHOST=/ \
RABBITMQ_NODE_PORT=5672 \
RABBITMQ_DIST_PORT=25672 \
RABBITMQ_NET_TICKTIME=60 \
RABBITMQ_CLUSTER_PARTITION_HANDLING=ignore \
ERL_EPMD_PORT=4369 \
RABBITMQ_MANAGEMENT_PORT=15672 \
MARATHON_URI=http://marathon.mesos:8080
Expand Down
4 changes: 4 additions & 0 deletions rabbitmq-cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,20 @@ def create_rabbitmq_config_file(node_ips=None):
default_user = os.getenv('RABBITMQ_DEFAULT_USER', 'guest')
default_pass = os.getenv('RABBITMQ_DEFAULT_PASS', 'guest')
default_vhost = os.getenv('RABBITMQ_DEFAULT_VHOST', '/')
net_ticktime = os.getenv('RABBITMQ_NET_TICKTIME', '60')
cluster_partition_handling = os.getenv('RABBITMQ_CLUSTER_PARTITION_HANDLING', 'ignore')
rabbitmq_management_port = os.getenv('RABBITMQ_MANAGEMENT_PORT', '/')
with open(rabbitmq_config_file, 'w') as f:
f.write('[\n')
f.write(' {kernel, [{net_ticktime, %s}]},\n' % net_ticktime)
f.write(' {rabbit,\n')
f.write(' [\n')
f.write(' {loopback_users, []},\n')
f.write(' {heartbeat, 580},\n')
f.write(' {default_user, <<"%s">>},\n' % default_user)
f.write(' {default_pass, <<"%s">>},\n' % default_pass)
f.write(' {default_vhost, <<"%s">>},\n' % default_vhost)
f.write(' {cluster_partition_handling, %s},\n' % cluster_partition_handling)
f.write(' {cluster_nodes, {[\n')
if node_ips:
nodes_str = ','.join(["'rabbit@%s'" % get_node_name(n)
Expand Down

0 comments on commit 265302f

Please sign in to comment.