1

I am running a Linux VM in Azure (nginx). I want to add multiple instances so that it can be load balanced. What I can't get my head around is how I change, for instance, the nginx conf and apply it to all the instances.

Do I need to write a script to copy the conf files to each instance, then script up sending remote nginx -s reload to each one?

What if I want to add a new instance, my image is now out of date presumably, so I think I'd need to create the new instance and fire the afore mentioned script at it?

2 Answers 2

2

That is a task for a Configuration Management System. There are multiple of them like Chef, Puppet or Ansible. If you only want to keep a basic configuration you could look at Ansible, as it's simpler.

Another option could be using something simpler like Fabric to push configurations from your workstations. You can see in nice tutorial in https://www.digitalocean.com/community/tutorials/how-to-use-fabric-to-automate-administration-tasks-and-deployments

2
  • Yup... ansible would be my number one choice here too. Simple and efficient.
    – Sig-IO
    Jun 18, 2015 at 22:05
  • it does look good, if expensive. I'll investigate the options suggested, thanks.
    – Ian1971
    Jun 19, 2015 at 10:51
0

You can also use Azure Files Storage for sharing configuration. It is SMB as a Service and it is possible to mount it on many VMs in Your virtual network. You can change files on share with REST API (it is CRUD). It is much simpler in implementation than Ansible, but Ansible is better for overall administration tasks.

1
  • That sounds interesting. I'll have to try and find out more about it.
    – Ian1971
    Jul 2, 2015 at 19:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .