6 ms·
DevOps from Scratch, Part 1: Vagrant and Ansible
- sp527 10y agoI like the premise of this, but can someone link a more modern guide that deals with Docker, ECS, etc?
- Kaedon 10y agoLooks like this is a little closer to what you're looking for I think: https://medium.com/aws-activate-startup-blog/running-services-using-docker-and-amazon-ec2-container-service-bde16b099cb9#.fhj8j5rj9 https://medium.com/aws-activate-startup-blog/running-service...
- sp527 10y agoThanks. For anyone interested: the above linked medium post doesn't mention config management, but I see that Ansible has some form of ECS support.
- raarts 10y agoThere's a book I can recommend: Devops 2.0 Toolkit.
- geerlingguy 10y agoSorry for the self-promo, but my book (Ansible for DevOps) dives into many more practical examples in later chapters. You can get it on LeanPub (recommended) or other popular platforms. Also check out the code examples: https://github.com/geerlingguy/ansible-for-devops https://github.com/geerlingguy/ansible-for-devops
- matt4077 10y agoAnsible seems to be the best of the bunch, at least for my use-case which is just a handful VMs (Chef seemed to require more infrastructure than what it would be managing). So let me rant about it for a bit: - Whatever that language is, it's not something invented on earth. I've given up on learning when to use quotes or how it wants its indentations and just copy&paste&destroy everything&restart when it doesn't work after 15 minutes. - There are a few thousands tests in their test suite, which makes it quite a feat to introduce a bug that breaks what amounts to "passing variables to a subroutine": https://github.com/ansible/ansible/issues/17356 https://github.com/ansible/ansible/issues/17356. (2 hours today I won't get back). I seriously don't know any other software where I spend most of my time reading through github issues. - It's a tool to manage hosts. Which would make me think that "reboot" shouldn't be a dirty word. But there's actually no function to do (a) ```/bin/sh reboot```, (b) wait for it to come back. First request I found is four years old: https://github.com/ansible/ansible/issues/513 https://github.com/ansible/ansible/issues/513. The current request has a nice summary of the cottage industry of "blog articles that explain how to reboot & wait": https://github.com/ansible/ansible/issues/16186 https://github.com/ansible/ansible/issues/16186 - Projects are structured in a quite "sparse" folder structure. A small project usually has 25 files in 20 folders and 18 of them are "main.yml" which is probably a conspiracy to annoy me. The main feature an editor plugin for ansible needs is not syntax highlighting but "use second-to-last folder name instead of filename on tabs". -
- blakesterz 10y ago>>I seriously don't know any other software where I spend most of my time reading through github issues. Ha! I've found myself doing that with Ansible way more than anything else we use. We've been using it since early 1.x and it's been rather buggy sometimes, but in general it's really great and I'm glad we went with it over the alternatives. New features have been coming fast that have made it worth the occasional bug.
- vacri 10y agoI started out using Puppet, and in a new job chose Ansible instead. I never regretted it one bit - troubleshooting in Ansible, you know exactly where it broke. Troubleshooting in puppet was sometimes a giant mystery. Also, if you used the same step in two different puppet manifests, it would totally freak out and refuse to run, even if the invocations were identical. I got the feeling that Puppet is for giant enterprise environments with automated agents everywhere, and Ansible is better suited for admin-driven runs.
- lazyant 10y agoI also got into quotes and whatnot issues but the file format is YAML, not a devilish Ansible invention.
- amazingman 10y agoYou don't have to run chef-server to run Chef. `chef-client -z` can get you where you need to be.
- hackerboos 10y agoA big selling point for Ansible was that it didn't require an agent or server. Chef has caught up, it still needs the agent but chef-zero [1] makes solo deploying much easier. [1] - https://github.com/chef/chef-zero https://github.com/chef/chef-zero
- dozzie 10y ago> [Ansible is] a tool to manage hosts. What made you think it is? It's not. It's somebody's application deployment script that grew too big and started being marketed as a universal tool. For managing servers its very architecture is too brittle. CFEngine and Puppet are universal tools for managing hosts, though they don't work in (sometimes needed) synchronous manner, like well-prepared RPC daemon would.
- lazyant 10y agoJust a note that Upstart is Ubuntu-only and it's actually going to be replaced by systemd.
- hayd 10y agoWhy go through all this for a simple flask app (or even a more complicated one)? What do you gain over just using Elastic Beanstalk (which handles the monitoring/autoscaling etc.)
- aisofteng 10y agoI feel it's pretty clear that the purpose of this article is to illustrate this general methodology using these tools and is not "how to deploy a Flask app." The nature of the app itself is largely inconsequential to what is being illustrated.
- hayd 10y agoI guess my question was "why use vagrant/ansible over a more simple AWS setup like Elastic Beanstalk"? I agree it being Flask is largely irrelevant.
- Annatar 10y agoHow much more flapping there needs to be? Chef, Puppet, Ansible, Salt, Vagrant, Docker, CoreOS, runC, Kubernetes, OpenStack, the list goes on and on and on. People are going way, waaayyy out of their way just so they wouldn't learn shell programmimg and how to build all this automation with OS packages. Is learning N amounts of discrete orchestration really easier and simpler than writing shell scripts and encapsulating them in OS packaging? Seriously?!? Enough with the flapping and discrete solutions already!!!
- aisofteng 10y agoWhile I understand where you're coming from, I expect that if you've had to manage application deployment and configuration in a large-scale environment you would be quite aware of how much work it is to develop even a one-off robust solution that is fully tested for edge cases, let alone reusable.
- Annatar 10y agoI currently run close to 72,000 servers doing automated deployment and configuration management with nothing but OS packaging and shell code inside of those packages. Does that qualify as large enough?
- pawadu 10y agoThank you! I had always assumed these tools felt over-engineered to me because I don't work with very large deployments. Now I am certain they ARE over-engineered...
- lisivka 10y agoI doing same: shell scripts (or Perl/Python/C) and RPM packages. Works well for more than decade. But I use my own library of modules for bash (bash-modules project on GitHub).
- xref 10y agoExactly! And how about all the flapping in languages; C, C++, Java, Python, Ruby, JavaScript, C#, Go, Swift and the list goes on and on. People are going way, waaayyy out of their way just so they wouldn't learn shell programmimg. Is learning N different languages really easier and simpler than writing shell scripts? Seriously?!? I run close to 72,000 servers and I won't deploy any code on them except shell code. Enough with the flapping languages already!