Reputation: 1
We are looking for a way to trigger a rolling update or a reset of all instances in an autoscale group without changing the CloudFormation JSON or Launch Configuration user data.
The reason we are trying to do this is that we have multiple JBoss Application servers in our autoscale group. To keep these servers fairly stateless we have the deployable wars on the S3 and whenever a new server gets spun up its grabs the wars and then deploys them. Sometimes there is an update to the war files that we need to have deployed to the instances in the group. Since these servers always grab the new files, we are hoping to have a way that AWS just deletes everything and then rebuilds. Really we need the same behavior as the autoscale update policies but in a way we can run them via CloudFormation or CLI without changing any JSON or user data. Where we are putting our deployable files on the S3 there is no need to change AMI's or anything JSON or user data related.
Update Policies for the behavior we are looking for: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html
Upvotes: 0
Views: 899
Reputation: 269191
To update your Auto Scaling fleet:
OldestInstance
.war
files. This can be done by increasing the Desired
quantity on the Auto Scaling group.Desired
quantity back to the original level. This will cause instances to be terminated, starting with the oldest instances first.This is a neat way to roll-out updates to a fleet while maintaining accessibility to the application.
Upvotes: 1