Spinnaker Concepts

Overview

By the end of this chapter, you should be able to explain:

  • Basic features of Spinnaker

  • Spinnaker core terminology such as Pipelines, Stages and Deployment strategies.

Basic features of Spinnaker

Spinnaker has two basic features as below.

  • Application management

  • Application deployment

Application management

Microservices-based architecture is replacing legacy monolithic applications in the industry. This helps to break down a huge monolithic application into a discrete set of services (also called micro-services) that can talk to each other through APIs. Spinnaker's application management feature helps to manage these services across various cloud platforms.

Regardless of the cloud architecture of each individual cloud platform, they are referred to as:

  • Server Groups

  • Clusters

  • Applications

  • Load Balancer

  • Firewall

Server Groups:

The basic unit of an application, The server group is the target environment in which the code is deployed, such as a virtual machine, cloud, or Docker image. Also considers basic configurations like metadata, number of instances, etc. A server group becomes a collection of instances of the currently running software after it is deployed.

Clusters

Clusters are logical collections of server groups in Spinnaker.

Applications

An application is a collection of clusters including firewalls and load balancers. It also includes the specific service which is to be deployed, all the configurations of that service and all the necessary infrastructure on which the service will run.

Load Balancer

Load balancers are responsible for maintaining traffic balance among instances in server groups. Also can enable health checks along with defined health criteria and the health check point. A load balancer is always connected with an ingress protocol and port range.

Firewall

A firewall is a set of rules defined by an IP address range (CIDR) accompanied by a communication protocol and a port range.

Take note of the following in the image above:

  • Both Applications 1 and 2 are cluster collections.

  • Each cluster is a collection server group.

  • The Load Balancer controls the traffic for server groups 1 and 2.

  • The firewall controls the communication using a set of rules and protocols.

Application Deployment

Spinnaker's application deployment feature is responsible for the continuous delivery workflow. Some of the basic concepts of application deployment are:

  • Pipeline

  • Stage

  • Deployment Strategies

Let’s discuss and learn how these concepts work.

Pipeline

The main deployment management constructor of Spinnaker is the pipeline. A pipeline defines a flow of actions in a particular sequence; for the code traversal, from commit all the way until it is deployed in the target deployment environment.

A pipeline comprises a series of actions known as stages. You can add/modify stages to a pipeline as you define it, allowing you to pass parameters from one stage to the next along the pipeline. The image below shows an example pipeline.

Stage

In Spinnaker, an automatically created building block for the pipeline is known as a stage. A stage in a pipeline is used to define a specific and finite activity. Herein, You can specify an action to be performed on a specific pipeline here. You can have as many stages as you wish in a pipeline based on what actions you want to perform; for example, a stage for code build, a stage for static code analysis, a stage for code deploy, etc.

Spinnaker can integrate with a large number of third third-party tools for performing the actions specified in a pipeline. For example, you can integrate Spinnaker with Jenkins, SonarQube, Terraform, Vault, test automation tools, etc.

Deployment Strategies

Spinnaker manages cloud-native deployment strategies as exclusive constructs, handling primary arrangements such as disabling old server groups, enabling new server groups, and verifying health checks. Spinnaker backs the red/black (also known as blue/green) strategy, with rolling red/black and canary strategies in active development. This enables the user to define the custom deployment strategy based on their organization requirements.

Spinnaker supports:

  • Blue/green (AKA Red/Black)

  • Rolling Red/black

  • Highlander

  • Dark Rollout

Blue/Green (AKA Red/Black): Blue/Green strategy, AKA Red/black strategy consists of creating new server groups and once the new server groups become healthy, removing the old server groups from the load balancer.

Highlander: The highlander strategy consists of creating new server groups and once the new server groups become healthy the old server groups are deleted.

Dark rollout (None): Dark roll outs involve doing nothing about the old server groups. Both old and new server groups stay on the load balancer.

Refer to the figure below for a better understanding:

Last updated