2015-Middleware-Keynote / demo-ansible

Apache License 2.0
18 stars 24 forks source link

Auto Scaling Groups prevent EC2 instances from being stopped then started again at a later time #148

Closed kenthua closed 8 years ago

kenthua commented 8 years ago

Auto Scaling Groups (ASG) are currently being enabled/created by the CloudFormation stack. When EC2 instances are stopped, the ASG ends up terminating the stopped instances and starts up new instances.

The new instances have new storage volumes, internal IP/hostnames, external IP/hostnames. The new fired up instances are of no use.

Preparing an environment before an event and then stopping it. Then starting the environment before the event is a viable scenario. Being able to stop / start can help reduce costs.

detiber commented 8 years ago

So, shutting down the hosts and bringing them back up was never really fully supported (it might work, it might not depending on IP/hostname changes when bringing the hosts back up).

However, if you wanted to accomplish that with the current deployment method, you could detach the instances from the ASG, shut them down, ..., start up the instances, re-add them to the ASG: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/detach-instance-asg.html

kenthua commented 8 years ago

@detiber Would it be possible to disable ASG all together as part of the install script? At least until we decide that we do want to support it's functions. The actions it performs leads to an unusable environment.

thoraxe commented 8 years ago

I don't think there's a way to do that right now. Definitely not for the masters as the ASG is used to populate the ELB (internal and external).

The CF mechanism was chosen for making cleanup and provisioning tremendously easier. Cost and shutdown/restart have not been a consideration during design.

If you want to look into it we would be happy to take a PR for it, but that is really kind if out of design scope.

If that's what you need it might make more sense for us to consider how to use RHPDS to support these workshops. Realistically that's a better option as it supports shutdown/restart as well as expiration and auto deletion.

kenthua commented 8 years ago

@detiber @thoraxe thanks for the feedback. If the ASG is used to build out the ELB, then taking it out won't be an option ;)

detiber commented 8 years ago

@kenthua one other advantage (that we can't take advantage of until 3.2) is that the ASG allows us to spread nodes out to different Availability Zones.

kenthua commented 8 years ago

@detiber oh that would be nice.