11 software delivery problems solved by intelligence software delivery platform  Download
Select Page

Spinnaker Operator for Kubernetes: Setup Guide

Anoop Tej Thotapalli May 5, 2019
Share

Update – Aug 22, 2020:

OpsMx Enterprise for Spinnaker (OES) is now available through the Red Hat Marketplace, an open cloud marketplace that makes it easier to discover and access certified software for container-based environments across the hybrid cloud. Through the marketplace, customers can take advantage of responsive support, streamlined billing and contracting, simplified governance, and single-dashboard visibility across clouds. With the automated deployment, the software is immediately available to deploy on any Red Hat® OpenShift® cluster, providing a fast, integrated experience. Click here for more information, to get a trial, or to purchase OES from the Red Hat Marketplace.

Red_Hat-Marketplace_Button

 

 

Overview

The Spinnaker Operator for Kubernetes allows users to spin up OpsMx Enterprise Spinnaker (OES) to manage deployments etc., using Openshift CRD’s. With the help of Spinnaker Services Operator, users have the convenience and confidence of a simplified approach to execute the CI/CD process with high velocity and quality deployments in all environments.

What is the operator?

  • Operatorhub.io is a home for the Kubernetes community to share software from multiple sources globally.
  • OpsMx is the contributor of Spinnaker Operator. Spinnaker is a multi-cloud Continuous delivery platform to perform software releases with high velocity and confidence.
  • Using Spinnaker, end-users are able to create deployment pipelines that run integration and system tests, spin up and down server groups, and monitor your rollouts.

What are the Prerequisites to download and use Operator?

  • It’s mandatory to have a system setup with Kubernetes cluster/openshift cluster.
  • kubectl Server and Client version should be in sync.
  • The sizing of the k8s and Openshift server needs to be a minimum of 4cores and 16GB RAM.
  • Operator Lifecycle Manager(OLM), is mandatory. OLM is a tool that helps to manage the Operators running on the Cluster. Execute the below command to setup OLM.
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/0.11.0/install.sh | bash -s 0.11.0
  • Note: OLM Installation is already available on OpenShift and OKD. Any other cluster apart from OC and OKD needs OLM Installation.

Step by Step Instructions to Setup Operator

  • From OpsMx, we have contributed a simplified image that brings up the Spinnaker services.
  • To download the Operator and bring access Spinnaker, execute the steps available here
  • On the OpsMx Spinnaker Operator page, there is an Install section. Click on that to get the command for Installation. Execute the command as it provided in the document.
  • Upon, successful execution of the command. Copy the YAML content, available by clicking at the view YAML example. Create a file with any naming as per the requirement.
  • Now, if you prefer to install the Spinnaker and Halyard Latest version. Update the YAML with ‘spinnakerversion'(Latest Spinnaker)’ and ‘(tag)’
  • Now, execute the below command to ensure the YAML is getting deployed to your cluster.
kubectl create -f <FileName> -n operators
  • By doing the above you should have all the containers deployed, which is required to have Spinnaker.
  • Now, login to the halyard container and execute the below steps.

Steps to Provide Spinnaker External Access

  • In this section, we will through the process to open Gate and Deck for external access. To do this for a Local environment, we need to hook into the custom service settings feature of Halyard.
  • As a part of this, we first need to specify the 0.0.0.0 host in both deck.yml and gate.yml in our default halyard deployment.
  • Navigate to the halyard pod and execute the below command to enable host settings
echo “host: 0.0.0.0” | tee \
~/.hal/default/service-settings/gate.yml \
~/.hal/default/service-settings/deck.yml
  • Now exit from the pods to make changes to the gate and deck ports.
  • Execute the below command to list the spinnaker services running
 kubectl get svc -n operators 
  • From the output received by executing the above command, execute the below to edit the ports of gate and deck services.
 kubectl edit svc spin-deck -n operators
kubectl edit svc spin-deck -n operators
  • Note: When the editor is open for the deck & gate change the type: from “ClusterIP” to “NodePort”
  • After making changes to the gate and deck service ports, execute the below commands to ensure, Gate and Deck are now listening for all connections, and the security groups are permitting access to newly generated NodePort.
 hal config security ui edit \
--override-base-url http://spinnaker.mydomain.org:NodePort

hal config security api edit \
--override-base-url http://spinnaker.mydomain.org:NodePort
  • Now restart Spinnaker, to make sure all the above changes reflecting to access the Spinnaker Console.
 hal deploy apply

Refer to the video at the link below, for a detailed walkthrough of the Spinnaker Operator Setup

TroubleShooting

  • In case if you notice Spinnaker Services are not started or hal deploy apply is not bringing up the services.
  • Compare the kubectl version client/server, in the pod. In case of any differences observed, ensure to sync up the version according to the server.

If you are interested in learning more or download the operator, visit operatorhub.io.

If you need assistance, please reach us out at info@opsmx.com.

You May Like