Download presentation
Presentation is loading. Please wait.
Published byChrystal Sanders Modified over 8 years ago
1
Cycling Instances Or, don’t hurt me, I’m ephemeral!
3
Getting security updates on Ubuntu AMI’s The auto-scaling group is in control! Rebooting will spook the scaling group The Problem
4
AWS Linux AMI Get updates at first boot with cloud-config Based on RHEL CoreOS Nice FastPatch updating scheme It’s different The Solution(s)
6
Use cloud-init to update ubuntu ami on first boot Use unattended upgrades to keep mostly up to date Pros Standard approach Easy to implement Cons Pfaff Basic implementation, intelligence requires more change The Minimal Solution
7
Autoscale up, getting the new ubuntu AMI with security updates and salt installing new stuff too Once Autoscaling is complete, check that new EC2 instance is ‘good’ by checking the ELB health check Terminate old instance to return to desired instance count Cycling Instances – The Plan
8
ASG sets new instance to Inservice/Healthy when EC2 checks pass Only calls the ELB healthcheck after the HealthCheckGracePeriod So we only know we’ve been successful after… Start instance EC2 Healthcheck Passed HealthCheckGracePeriod ELB healthcheck passed Actually up! Cycling Instances – The Problem(s)
10
The ASG Lifecycle
11
Scale out the ASG by one New instance goes from pending -> in service and healthy ASG has new instance as in-service and healthy EC2 Healthcheck has been passed ELB has instance out-of-service as no health check passed
12
Waiting for grace period before checking ELB health check ASG checks ELB health check for the first time Health check fails, EC2 instance is terminated
13
Create new instance as before New instance has not passed health check yet New instance in healthy and on-service in ASG
14
This time, ELB health check has passed There are 2 healthy instances in the ELB
15
The new instance was created successfully The old instance has been terminated
16
Standard way of getting security updates Enforces cloudy design principles Can be automated Cloudy By Design
18
More intelligent scaling, scale-out, scale-in, with specific policy Auto-scaling group has Scheduled Actions, we can cycle instances by default on a cron-like schedule Switch to a more cloud friendly AMI? The Future
20
The End
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.