Frage

Say I've got a PHP site on an ec2 instance in an autoscale group. The group has 10 running instances. I want to add some new php code to the site. Is there a sane way to do this and have it populate to all other instances in the autoscaling group?

The only way I can see is to manually bundle an image from the instance, upload it to S3, register the bundle with aws and attach the bundle to the launch config of the autoscale group. I then have to terminate all my instances and launch new ones with the new image.

I would have to do all this every time I want to make a change to the codebase. Surely this is madness.

War es hilfreich?

Lösung

The best way is NOT to bundle your page into the image. Make the ami download them from s3 on start. In this way you can upload to only one place and call the download script.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top