Out-of-the-Box Rollbacks With Spinnaker
Feb 21, 2017 by Isaac Mosquera
What Spinnaker Considers a Version
One of the great features from Spinnaker is the ability to have consistent & dependable rollbacks to previous version of your service. This is distinct from your application which Spinnaker consider as one component of the service. While it’s true that the main driver for change in your service will certainly be your application (e.g. my-mobile-api-v1.23.3), consumers of that service experience the integration of all it’s parts (e.g. my-mobile-api-v1.23.3, Nginx 4.23, Ubuntu 14.04, OpenSSH 12.4, etc). This also includes the mechanisms to deliver the service such as networking and load balancing. A customer is concerned with the service a whole and less about which one of those components caused a failure. What Spinnaker considers a version is the combination of all these dependencies, not just your application package (e.g. my-mobile-api-v1.23.3)
How Spinnaker Implements Versioning on AWS
Spinnaker leverages AutoScaling Groups (ASG) to manage versioning of as many of those components as possible. Spinnaker does depend on an AMI to be “baked” but that isn’t what is considered the immutable deployment object, it’s the ASG which includes the AMI along with other deployment details. In Spinnaker parlance this is called a
Server Group. Every-time there is a new deployment, the service doesn’t update the existing ASG but instead releases a new version and appends that version to the ASG name. Below is an example of an ASG in the AWS console deployments by Spinnaker.
Below is an internal application called
hellodeploy and how that same ASG appears in Spinnaker. The active version of the entire deployment is
v012 and because it was deployed with a blue/green deployment strategy, Spinnaker leaves
v011 in an inactive state. The ASG contains the AMI information but all of the ELB, VPC and subnet details as well as shown in the previous screenshot.
When ASGs are versioned in this manner it makes rolling back trivial because we can enable old ASGs and disable the new ones when the old ASG becomes operational. This is also because much of the custom operational complexity from service to service is encapsulated in the ASG and baked AMI.
This provides the safest most reproducible way to rollback because the ASG is immutable and doesn’t change over time. The blue/green deployment strategy will leave as many versions behind as you configure. Additionally, the workflow engine provided by Spinnaker allows you to do sophisticated deployments that help you scale server groups up and down as needed.
Recently Published Posts
How to Take the Pain of Rollbacks out of Deployments
Software applications have become an integral part of the business climate in most modern organizations. With an ever-increasing demand for new features and enhancement of already-existing ones, software teams constantly face novel challenges, and the pace of software development is growing by the day. To keep up with this fast-paced business climate, software teams […]
Read more →
Monitoring Spinnaker: Part 1
Overview One of the questions that comes up a lot is how you monitor Spinnaker itself. Not the apps Spinnaker is deploying, but Spinnaker itself and how it’s performing. This is a question that has a lot of different answers. There are a few guidelines, but many of the answers are the same as how […]
Read more →
The Importance of Patents: Interview with Nick Petrella, Head of Legal
In honor of Armory’s recent acquisition of a patent for continuous software deployment, we sat down with Nick Petrella, Head of Legal, for a casual conversation covering a wide range of subjects, from patent law to Nick’s background as a software engineer and why he made the leap to the law. Check out […]
Read more →