Skip to content
Alex Daigle edited this page Jul 27, 2017 · 10 revisions
  1. Download the latest version from the RabbitMQ Website and install it. On Mac you can use:
$> brew install rabbitmq

You can check to make sure it's running with this command:

$> sudo rabbitmq-server

Mac users: If this doesn’t work, source bash environment, if it doesn’t exist, then create .bash_profile and write inside:

$> PATH=$PATH:/usr/local/sbin
$> export PATH="/usr/local/opt/gettext/bin:$PATH"
$> export PATH="/usr/local/opt/gettext/bin:$PATH"
  1. After installing RabbitMQ, we need to set up a RabbitMQ "account" for Rodan. The "account" consists of three variables: $USERNAME, $PASSWORD, $VHOST, which you must choose.
$> sudo rabbitmqctl add_user $USERNAME $PASSWORD
$> sudo rabbitmqctl add_vhost $VHOST
$> sudo rabbitmqctl set_permissions -p $VHOST $USERNAME ".*" ".*" ".*"

Mac users: You may get an error having to do with the permissions of .erlang.cookie, in this case, locate the file and change it's permissions.

$>sudo chown _yourusername .erlang.cookie
  1. Start the app with:
$> sudo rabbitmqctl start_app

RabbitMQ uses the amqp:// protocol, you can test your credentials this way (be sure to update the script with your own credentials.)

#!/usr/bin/python
import socket
from kombu import Connection

user = "root"
password = "root"
vhost = "rodan"
host = "localhost"
port = 5672
url = 'amqp://{0}:{1}@{2}:{3}/{4}'.format(user, password, host, port, vhost)

with Connection(url) as c:
    try:
        c.connect()
    except socket.error:
        raise ValueError("Requested, but no reply.")
    except IOError:
        raise ValueError("Check Variables.")
    else:
        print ("Eurika! It works!")

The default $HOST is localhost, and $PORT is 5672.

Clone this wiki locally