4 ms·
What is the role of Ansible in the world of Docker, Kubernetes and Swarm?
by amq 9y ago
What is the role of Ansible in the world of Docker, Kubernetes and Swarm?
- zerkten 9y agoI was wondering the same thing and found this recent video on Ansible Containers (https://www.ansible.com/ansible-roles-as-containers https://www.ansible.com/ansible-roles-as-containers). The project overview is https://www.ansible.com/ansible-container https://www.ansible.com/ansible-container. It'd be interesting to hear from others with experience combining these.
- alexnewman 9y agoansible and containers do not mix well. Don't even bother. They take totally different approaches. Use ansible for what it is good for. Using it to automate all the things ... in container world... I mean why have docker-compose or k8s at all. Just launch containers willy nilly and instead of - self healing - automatic failover - Docker centric tools You can have a python s*it show where you use containers like processes. In fact they are processes that probably can't handle signals or pipes. Maybe use tini and that at least works, but it misses the point. Ansible and docker are fundamentally at odds. When ansible was created it had the promise of a simple layer of abstraction over ssh. now It just does all the things because it jelly. Don't give into the h8
- mi100hael 9y agoAnsible works quite well for automating docker deployments. Something still has to execute the docker commands to spin up a container/swarm/cluster/whatever. Better to have those commands be idempotent and checked in to version control. http://docs.ansible.com/ansible/latest/docker_container_module.html http://docs.ansible.com/ansible/latest/docker_container_modu...
- geerlingguy 9y agoAnd if you control networking, Ansible can manage that... and if you control local workstation management, Ansible can manage that... and if you need something to manage things like CloudFormation with automation... Ansible fits all the automation gaps that exist between all the different infrastructure tools.
- alexnewman 9y agoI just click the google cluster or Ecs button and choose auto scale . Startups are often wasting time with code as infra.
- ojosilva 9y agoWould you mind expanding on that please? I'm really curious about the role of configuration management tools in a containerized world.
- RRRA 9y agoManaging the setting up the container system of your choice, deployment of those containers, moving yaml around, calling APIs, etc.
- Spivak 9y agoYes they do, and if you're willing to go all in with Ansible you can entirely replace docker-compose.
- RRRA 9y agoWhy not simply call docker-compose through ansible and template the yml? I've had issues or a lack of features with ansible's docker support, but use it otherwise for pretty much everything. I just don't see a point to moving to a wrapper than can never have all the latest support / options that upstream has.
- geerlingguy 9y agoI've done it both ways—both are valid approaches. The nice thing about using Ansible for all the management is consistency (especially in mixed container / not-container environments). The nice thing about templating a compose file is being able to track the latest Docker / Compose versions more easily.
- corford 9y agoLow level machine setup (e.g. user accounts, log shipping, backups, sshd etc.); configuring systems and services that don't make sense in containers; and now, with ansible-container, container management. Also, not every org has (or would want) to go 100% 'all in' on containers. Any hybrid infrastructure will always need configuration management tools like Ansible, Chef or Salt.
- RRRA 9y agoI'm deploying docker, kubernetes, gluster, etc. through terraform + ansible.
- est 9y ago> Ansible in the world of Docker, Kubernetes and Swarm a tool for guys that setup your docker, k8s and Swarm.