Thanks for the reply! That's the sort of solution I was looking for. - greg
On Saturday, April 25, 2015 at 4:55:37 AM UTC-4, Mark Phillips wrote: > > Hello, > > I've done a lot of demos of this sort of thing using Ansible Tower's > 'callbacks' feature. A playbook is exposed as a URL - embed a call to that > URL[1] in user-data when spinning up an instance, and you have a 'phone > home' solution that keeps the beauty of the push model. > > --Mark > > [1] Here's an example of that exact user-data > https://github.com/phips/tiad_demo/blob/master/scripts/ec2_bootstrap.sh > > ** Full disclosure and all that - I work for Ansible. > > On Thursday, 23 April 2015 04:12:34 UTC+1, [email protected] wrote: >> >> Hi all, >> >> So I've been thinking about how to best use Ansible in an autoscaling >> environment on AWS, and I was wondering if anyone else had dealt with this, >> and if they had any advice. >> >> My thought is to essentially do some kind of push/pull hybrid. Something >> like: >> >> >> - When a new instance comes online, have it pull an artifact (gz >> file, zip, etc.) from a known place on S3 - something like >> s3://bucket/latest.tar.gz. Unzip it into a known location, and run >> whatever >> commands to get it online. >> - When we're pushing a new version of the code out, update the latest >> artifact on the bucket, and from a central server, use the AWS module to >> find all instances with the same Name, and issue a command to force them >> to >> grab the latest copy and install. >> - The code would have some kind of playbook embedded in it, so after >> the latest copy is pulled down, that playbook just gets run. >> >> In this way, we're not refreshing the code every *n* minutes via cron, >> and things stay more steady; the instances only update when they have to. I >> suppose another alternative is to have the instances access a Git >> repository and pull down the code from there, but then you have to deal >> with private repos. >> >> Has anyone done anything like this? >> > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4af41897-45d5-4106-898e-c6eeaa729868%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
