Services Blog Fran├žais

ansible-compose: deploying docker-compose files over bare ssh

| by jpic | python devops ansible docker docker-compose

In kubernetes, we have the joy of applying configuration directly from maintainer repositories:

kubectl apply -f https://raw.github.../setup.yml

This allows each repository to maintain its own infrastructure configuration as code, and maintaining a core devops framework in between. You will have to deal with particular credentials, that you should use something else to generate and so on.

On the other side of internet, happy docker-composers are also having a lot of fun maintaining them in repositories they contribute to. And there is a new command in town to get a warm automated feeling:

web_image=your/image ansible-compose ./docker-compose.yml --sudo

So, the first time you deploy a compose in a directory it should be as root, so that it can install docker-compose and create the volume directories that it will have parsed from the docker-compose.yml that it generates.

Wait no more and check all the things this new giant sudo can do on PyPi ! It’s not super well documented but who knows, maybe it works for you just like it works in .gitlab-ci.yml !

Have a great day

They trust us