Docker provisioning with AppFlow
Hey there, some time ago we developed a tool called AppFlow (for our own needs), it’s a multitenant environment automation tool based on Ansible which eases up the maintenance and automation of the infrastructures we’re help keep running. We also open sourced the whole thing which is always a good idea.
With the DevOps concept in mind AppFlow may help you setting up your legacy infrastructure and it’s components, like HAProxy, Percona MySQL Galera Clusters, etc — all things HA. But it can do more, it can also provision Docker containers.
Here’s a code snippet which will run Traefik load balancer, Portainer, MariaDB and WordPress locally as example:
Be sure to adapt line 8 accordingly to your local user(s).
To get the whole thing up and running do the following:
sudo pip3 install appflowecho "127.0.0.1 docker.test lb.test wp.test" | sudo tee --append /etc/hostsappflow init --env development --tenant examplegit clone https://github.com/ttssdev/appflow-example.git ~/.appflow/tenant/appflow-examplemkdir -p ~/.appflow/vault/example
echo "test" > ~/.appflow/vault/example/developmentappflow provision --tenant example --limit local --tags docker
This will spin up http://docker.test on your local machine

Traefik load balancer at http://lb.test

and finally the WordPress container, http://wp.test

Of course you can also use AppFlow to run the whole thing in high availability mode with three nodes for example, this is what we do if we don’t want to throw in Kubernetes (maybe due to limited hardware resources).
If all this sounds interesting to you drop use a line at AppFlow community Slack or check out the whole documentation over at read the docs.
