puntonim / ansible-biostar

An Ansible playbook to automatize the deployment of a Biostar-based project using Docker containers
http://painl.es/ansible-biostar/
GNU General Public License v3.0
10 stars 3 forks source link

Cloud-agnostic deployment #11

Closed puntonim closed 10 years ago

puntonim commented 10 years ago

We want to be able to deploy to different cloud services.

@brainstorm suggests something like:

ansible-playbook site.yml --extra-vars "cloud_provider=aws aws_access_key=..."
ansible-playbook site.yml --extra-vars="cloud_provider=gce gce_service_email=..."

But, why not the following?

ansible-playbook aws.yml --extra-vars "aws_access_key=..."
ansible-playbook gce.yml --extra-vars="gce_service_email=..."
brainstorm commented 10 years ago

Good call, it does seem cleaner from user perspective. Then calling site.yml from gce.yml and aws.yml, right?

puntonim commented 10 years ago

I would get rid of site.yml because this name is too generic in this case. And I'll add/edit aws.yml and gce.yml such that they start and provision a new machine first and then they call biostar.yml. I'll do it when I'm done with other high priority things.

brainstorm commented 10 years ago

The reason why I chose to stick with site.yml is because it's stated on Ansible's best practice docs:

http://docs.ansible.com/playbooks_best_practices.html#directory-layout

In order to comply with the "least surprise" principle, I would keep site.yml anyway, but I'll ask around and see what the community has to say about that.

brainstorm commented 10 years ago

RT == <3

https://twitter.com/braincode/status/481041753093734400

brainstorm commented 10 years ago

@nimiq, In case you missed it, here's the response of the actual main author of Ansible, Michael Dehaan:

https://groups.google.com/forum/#!topic/ansible-project/WWRit56iYrg

puntonim commented 10 years ago

Ok, Michael recommends to keep the provisioning playbooks separate. Which means the solution I proposed or 2 different GitHub repos? Did you get that @brainstorm?

puntonim commented 10 years ago

Done https://github.com/nimiq/ansible-biostar/commit/c8bd0a49c7b1536abe8f18519d713db94d8b593d