I have been reading throgh the internet but was unable to find a resource which helps me do this. I think many of you must be using these technologies and doing these common tasks. I would love to know how you do it. I will also love to read any blog that you think can help or repositroy which does these tasks.
Another tool you can look at, which is really worth the small learning curve, is Terraform from Hashicorp (who made Vagrant, Consul, Vault, Packer, ...).
The free chapters from The Terraform Book are really nice to get started (the official docs are really nice, but maybe not easy to get started)
The main differences between provisioning tools usually comes down to 2 criteria:
Both Ansible and Terraform run locally (you don't need some agents to run on the hosts and fetch the tasks to do).
Ansible is very imperative: it provides a nice way to tell what to do.
Terraform is declarative: you describe a desired state, and Terraform apply whatever is needed to reach that state. (Which is why I today use Terraform a lot for infrastructure: it makes update very easy. When you update your config, you don't write the desired change, but only the desired state)
Finally, to come back to your original question, Redis can be fine in a container, depending on the use case, but usually - and especially for your first Docker deployment project - the persistence layer, like PostgreSQL, will not be run in a container. (A good way to see things, ideally, is to treat containers as immutable and disposable stateless processes, which connect to some long-term persistence layer.
You could do it using plain bash (with the Amazon command line tools) or Make, but that's probably no the most efficient way.
The most common option is using a configuration management tool. The one I'm most familiar with is Ansible.
GitLab CI is also a nifty tool for this, and using it could help with learning Ansible later.
Marko Anastasov
Rendered Text, SemaphoreCI.com cofounder
Check out these two tutorials: