<div dir="ltr">I'm having trouble finding good examples of how to configure a&nbsp;rabbitmq.config file to do what I've been doing with a set of rabbitmqctl commands. &nbsp;Here's the script I use to configure clustering and federation for one of my rabbitmq clusters:<div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>#!/bin/bash</div></div><div><div><br></div></div><div><div>rabbitmqctl stop_app</div></div><div><div>rabbitmqctl reset</div></div><div><div>rabbitmqctl join_cluster rabbit@rabbit2</div></div><div><div>rabbitmqctl start_app</div></div><div><div>rabbitmq-plugins enable rabbitmq_federation</div></div><div><div>rabbitmq-plugins enable rabbitmq_federation_management</div></div><div><div>rabbitmq-plugins enable rabbitmq_management</div></div><div><div>service rabbitmq-server restart</div></div><div><div><br></div></div><div><div>rabbitmqctl set_parameter federation-upstream cluster1-upstream '{"uri":["amqp://rabbit3.example.com","amqp://rabbit4.example.com"],"expires":3600000}'</div></div><div><div>rabbitmqctl set_policy federate-mything "^Mything$" '{"federation-upstream-set":"all"}' 0</div></div></blockquote><div><br></div><div><br></div><div>How do I convert that into a format that will work in a rabbitmq.config so that all I need to do is drop this config file in, reset the node, then restart rabbitmq-server to get this configuration working? &nbsp;Also, if you put your cluster config into rabbitmq.config &nbsp;on both nodes to be clustered, will they automatically set the correct&nbsp;/var/lib/rabbitmq/.erlang.cookie or must that step still be done manually?</div><div><br></div><div>Thanks in advance</div></div>