Deploy Spinnaker Pipelines in Kubernetes

Deploy Spinnaker CD Pipelines in Kubernetes

Welcome to the OpsMx’s Tech Talk series about quick insight into Spinnaker. In this edition we will explain how to build your first Continuous Delivery pipeline that deploys to a Kubernetes cluster. 

Here is a short video for the topic:

What is a pipeline in Spinnaker?

Pipelines are a way of managing deployments in a consistent, repeatable, and safe way. The pipeline is a sequence of stages provided by Spinnaker ranging from functions that manipulate infrastructure – like deploy, resize or disable, as well as a utility scaffolding function like manual judgment or run Jenkins job. These together precisely define your runbook for managing your deployments.

Prerequisites

  1. Have a working Kubernetes cluster
  2. Have the opensource Spinnaker installed with all other services

Getting Started

Steps:

  1. Login to Spinnaker UI
  2. Select Applications from the top menu

Select Applications in Spinnaker UI
Select Applications in Spinnaker UI

Create a new application

  1. Choose Actions-> Create Applications

Select Actions and Create Application
Select Actions and Create Application

The Create Applications window will pop up. Insert suitable values into the form fields. 

New Application Window
New Application Window

  1. Insert your application’s name in the ‘Name’ field e.g. Tech Talk
  2. Insert your email id in the ‘Owners Email’ field.
  3. Click on the ‘Create’ button.

Create the New Application
Create the New Application

A new application is created by the name of Tech Talk.

New Application is created
A new application is created

Click on the application name. The application screen appears.

Create and configure Load Balancer

  1. Choose the tab  ‘Load Balancers’ under Infrastructure. 

By default, the ‘Show Server Groups’ option remains checked and a message is displayed notifying “No load balancers match the filters you’ve selected”.

Create Load Balancers
Create Load Balancers

Click the ‘Create Load Balancer’ button on the right.

The ‘Deploy Manifest’ window for the load balancer is displayed.

Deploy Manifest window
Deploy Manifest window

    1. Under ‘Basic Settings’, the Account name is Spinnaker
    2. Insert your yaml manifest code in the Manifest textarea.
    3. Click the “Create” button.

      The window screen is refreshed. A new screen labeled “Deploying your manifest” displays the steps while a green progress bar highlights the progress of completion. On completion, a success message ‘Operation succeeded!’ is displayed.

      Deploying your Manifest window
      Deploying your Manifest window
    4. Click the ‘Close’ button.

The Load Balancer is successfully created.

Load Balancer is created
Load Balancer is created

Create and configure pipelines

  1. Choose ‘Pipelines’. By default, a message prompts that “No pipeline is configured for this application”.

    Configure a new pipeline
    Configure a new pipeline
  2. Click on the link “Create a new pipeline”. The “Create New Pipeline” window appears.
    Create a new pipeline
    Create a new pipeline
  3. Insert a suitable name for the pipeline in the ‘Pipeline Name’ field e.g. Deploy Application.
  4. Click the ‘Create’ button.  

    The pipeline ‘Configuration’ form is displayed.

    Pipeline configuration form
    Pipeline configuration form

In the Parameters section, click ‘Add Parameter’. A new parameter field is added.

Parameters Section
Parameters Section
Add new parameter
Add new parameter

      1. Insert a parameter name in the Name field e.g. Tag
      2. Check to select the options ‘Required’ and “Pin Parameters”. Insert Monday to the Default Value field.
      3. Click the button at the top ‘Add Stage’. The new stage screen appears.

        Deploy Application Configuration
        Deploy Application Configuration
      4. Select Deploy manifest option from the dropdown field Type.
      5. Change the  Stage Name field as ‘Deploy Dev’.
      6. In the Deploy Manifest section under Basic Settings, select Account as Spinnaker.
      7. Check to select the option “Override the Namespace”.
      8. Select the Namespace field as Dev.
      9. Insert the yaml code in the Manifest textarea.
      10. Click the ‘Create’ button. 

Under the Pipeline menu, the newly created and configured pipeline will be displayed.

configured pipeline
configured pipeline

Manually trigger pipeline 

Manually trigger pipeline
Manually trigger pipeline

  1. Click on the button “Start Manual Execution”. The ‘Select Pipeline’ window appears.
  2. In the Pipeline field, select the pipeline you created above “Deploy Pipeline” and click the ‘Run’ button. 

This executes the pipeline and the progress of the job is displayed on the screen. Clicking on the pipeline progress image will display some more information:

    1. Deploy Status 
    2. Task Status
    3. Artifact Status

pipeline progress status
pipeline progress status

Clicking the ‘Details’ link in the Deploy Status tab reveals detailed information about the application you are deploying to the Kubernetes cluster.

pipeline deployment status
Pipeline deployment status

Validate the Deployment  

Validate the application that was successfully deployed by opening it in the browser. 

You can reach out to Marky Jackson at:

If you want to know more about the Spinnaker or request a demonstration, please book a meeting with us.


OpsMx is a leading provider of Continuous Delivery solutions that help enterprises safely deliver software at scale and without any human intervention. We help engineering teams take the risk and manual effort out of releasing innovations at the speed of modern business. For additional information, contact us

Leave a Comment

Your email address will not be published.

You may like