Skip to content

Instantly share code, notes, and snippets.

@livmackintosh
Last active September 26, 2016 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save livmackintosh/efb13d1da71db1f0ca1c957400456ed7 to your computer and use it in GitHub Desktop.
Save livmackintosh/efb13d1da71db1f0ca1c957400456ed7 to your computer and use it in GitHub Desktop.
Haskell to Python RabbitMQ Test Stack

Haskell to Python RabbitMQ Test Stack

This Gist is intended for BD developers who wish to test Haskell-to-Python RabbitMQ communication.

Instructions

Follow each instruction, skipping any optional segments or those which you've already executed. You'll have to infer certain commands e.g. making sure you're in the right directory. This applies to many of the buildbits commands. The instructions assumes that you're inside a directory containing the following repositories:

  • beautilytics
  • buildbits

1. Build Docker Images

cd ./buildbits/dockerfiles/
./build rabbitmq
./build rabbitmq-pytest
./build ghcjs-env

2. Create Docker Containers

cd ./buildbits/bin
./create-rabbitmq
sleep 10
./create-rabbitmq-pytest

3. Create Beautilytics Container

This is needed so stack can access GitHub

export DO="--link rabbitmq:amqp -v $(dirname $SSH_AUTH_SOCK):$(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK"
./buildbits/bin/c ghcjs-env

4. Change directory to beautilytics

This is probably going to be:

cd beautilytics

5. Build the basic Haskell stack*

stack setup; stack build --fast

*you might not need to do this if already complete

6. Send a test message to the message queue

You can disable database connection if running locally as it's not needed at all. Just invoke the optional argument: --disable-database-connection.

stack exec -- beautilytics-tasks config.json.docker msg-sender "A test message." [--disable-database-connection]
@livmackintosh
Copy link
Author

Be sure to double check the --link command as the host 'ampq' may have changed in Beautilytics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment