Dynamic RabbitMQ cluster in Docker Swarm Mode

You can find concrete implementation in the GitHub repository - rabbitmq (autocluster branch). Build docker image There is an excellent article on RabbitMQ web site that describes different clustering options in different scenarios. This post goes through setting up autocluster plugin that is capable to automatically discover new nodes as well as cleanup dead nodes of RabbitMQ cluster. For those who is interested in how Dockerfile can look like for building RabbitMQ image that has autocluster plugin enabled, here it is (make sure to install plugin files from official repository):

Setting up GoCD in Docker Swarm Mode

Establish overlay network 1 docker network create -d overlay ci Start GoCD Server Choose one node that will run gocd-server and create following folders: 1 2 3 4 5 6 /data/godata/addons /data/godata/artifacts /data/godata/config /data/godata/db /data/godata/logs /data/godata/plugins Label this node as following (choose one inspecting the output of docker node ls): 1 docker node update --label-add server=on <SERVER_NODE_ID> Here is how to create go-server service:

Triggering a build on file change in Linux

inotifywait is a very nice tool that emits stream of events that happen to files in your project. That can help you setup a simple monitoring script that will trigger the build every time your change certain files. In my case it is F# files I am after: 1 2 3 4 5 6 7 8 9 10 #!/usr/bin/env bash while true; do inotifywait -q -r -e moved_to,moved_from . | while read path events file; do if [[ $file =~ .

Building F# projects on NixOS

Building F# projects on NixOS with mono Building F# on NixOS might result in Microsoft.FSharp.Targets target file not found. In order to cope with this, locate appropriate version of the Microsoft.FSharp.Targets file first: 1 echo $(dirname $(which fsharpc))/../lib/mono/4.5/Microsoft.FSharp.Targets You might want to modify the version of mono currently used on your system. Then just change all of your F# *.fsproj files from having this:

Fixed RabbitMQ cluster in Docker Swarm Mode

You can find concrete implementation in the GitHub repository - rabbitmq (Tree: 391be14915). Setting up RabbitMQ cluster in Docker Swarm (Mode) Official clustering guidelines suggest that there are a few ways to create RabbitMQ cluster. There are also options that will allow creating clusters that could discover its nodes automatically through some discovery service like Etcs or Consul. Due to the fact that our runtime environment is Docker Swarm where we will need to mount volumes to ensure that data is getting persisted and not lost over the course of RabbitMQ upgrade or a restart.