Pergunta

I'm configuring my AWS EC2 instances with Ansible, but I don't know what's the best way of storing my app configuration.

Now I'm just sending a "app.properties" file to the server, using Ansible, but I'd like to remove that from my source control. Also, I'd like to store everything on environment variables, instead os files, to make it more secure.

Is there a good tool for that? Something simple, like a key-val configuration server, where all your servers will connect and get their own properties?

How do the big guys, like Netflix or Amazon, solve this problem?

Thanks!

Foi útil?

Solução

There are several tools you can use for this purpose. Ansible is one of them. If you want to use Ansible, you can use "Ansible variables". You can assign system environment variables according to the values of these "Ansible variables".

You can also store all your Ansible playbooks with all your variables in a git repository. That way they don't show in the server other than as environment variables after you run your Ansible playbooks.

You can look at setting up environment variables with Ansible here: http://docs.ansible.com/playbooks_environment.html

Having said that there are other tools that can help you do this. Among them: Puppet, Chef, CFEngine, Fabric and SaltStack. All of them will help you accomplish what you want although differently. They have their advantages and disadvantages depending on what you are looking for and what your architecture looks like.

Check my answer here too for more insights: Heroku-like deployment and environment configuration via EC2

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top