February 28, 2020

Spinnaker vs Harness - Filming My Journey

Table of Contents

When folks look at a Continuous Delivery solution, most of the time folks would cross-shop a Spinnaker rendition vs. Harness. In technology, we can certainly take sides like the cats vs dogs argument [I have a Siberian Husky; you can see which side I'm on]. Something I wanted to do for a while was to run a pipeline or two through a Spinnaker Pipeline and learn for myself.  

I am pretty familiar with the Spinnaker Project and the goals that the project has, but I've never tried to install the tool myself. I decided to take a video of myself trying to go through an installation and basic pipeline while timing myself. (About a quarter of the way through, though, I decided to stop taking time as I had to look up commands— just fundamental Linux administration stuff that I forgot and had to look up during the filming of the video.)

The video is about two hours long and is filmed over the course of an evening and morning. I had a goal of just deploying the quintessential Nginx image into an Amazon EKS cluster. Unfortunately, I was not able to get my system account creation in Spinnaker to work after some time and tossed up the white flag. I was able to get Nginx deployed from zero to deployed, including installing a Harness Delegate into my EKS cluster in about 5 minutes at the end of the video.   

The Video

Without further ado, here is the video. (Yes, I did wear the same pull over two days in a row.)

Methodology

Being in the distributed systems/platform engineering world for a while, low-hanging fruit for a test process these days is to just deploy Nginx. I am a fan of using Amazon EKS for a Kubernetes Cluster, as I can spin one up pretty fast with EKSCTL

I have the ability to spin up AWS resources as needed and, as an administrator, make sure IAM roles, etc. are in place. I used the answer box (a.k.a. Google) to find answers, and leveraged documentation from the Spinnaker Project and Armory

I ran into some challenges early in which I needed to switch how I was planning to install Spinnaker. I originally had a goal to install Spinnaker in my EKS cluster, but something was mis-wired in my Halyard configuration having AWS as a provider and not liking my EKS cluster. So, I installed Spinnaker on my Halyard EC2 Ubuntu machine. 

After I was able to get the Spinnaker UI up and running, Armory had better documentation than the OSS Spinnaker Project for my specific goal of deploying to Amazon EKS. 

Around hour two of the video, I tossed up the white flag as I just could not get my system account, which needed to perform the deployment on my behalf, to show up in the Spinnaker UI. The tooltip suggested contacting my Spinnaker administrator, which was myself— fail.  I was kind of exhausted after trying for a while. You can see my steps in the video and below. 

My Steps

Before you get started, make sure to brush up on the Spinnaker Architecture and the moving pieces you will need to install and interact with. I went through the Spinnaker Installation Process and the AWS Quickstart Guide from Armory to the best of my ability, having never seen them before.   

I created an AWS EC2 Instance with Ubuntu LTS 18.04, eventually opening the ports up. On my local machine, my MacBook Pro, I have the AWS CLI and KubeCTL wired to my EKS cluster. 

The step that was probably unnecessary was opening Gate and Deck per this blog post

##Spinnaker Commands
#Ubuntu Box - EC2 Public IP: your-ip
ssh -i ~/.ssh/your-key.pem ubuntu@your-ip
#Get Halyard Install for Ubuntu
curl -O https://raw.githubusercontent.com/spinnaker/halyard/master/install/debian/InstallHalyard.sh
#Install Halyard on Ubuntu
sudo bash InstallHalyard.sh
#Get Cloud Formation Template on Local Machine
curl -O https://d3079gxvs8ayeg.cloudfront.net/templates/managed.yaml
#CF Template for Halyard from Local Machine with AWS CLI
aws cloudformation deploy --stack-name spinnaker-managing-infrastructure-setup --template-file managing.yaml \
--parameter-overrides UseAccessKeyForAuthentication=false --capabilities CAPABILITY_NAMED_IAM --region us-east-1
#Need to create a user that isn't root on Ubuntu.
sudo adduser someUser
pw: somePassword
#Wire a Hal Provider to check Installation Options
hal config provider aws account add yourAccount \
   --account-id xxxx \
   --assume-role role/spinnakerManaged
#Install Locally in my case
hal config deploy edit --type localdebian
##Don't set S3 region - https://github.com/spinnaker/spinnaker/issues/4554
#Configure Storage
hal config storage s3 edit \
   --access-key-id xxxxx \
   --secret-access-key xxxxx
#Set Version
hal config version edit --version 1.18.3
#Restart
sudo hal deploy apply
#Tunnel
sudo hal deploy connect
#Edit IPs
hal config security ui edit --override-base-url https://yourIP:9000
hal config security api edit --override-base-url https://yourIP:8084
#Restart
sudo hal deploy apply
#Add AWS as Environment on Ubuntu EC2 Box
export AWS_ACCOUNT_NAME=YourAWSAccount \
export ACCOUNT_ID=xxxxx \
export ROLE_NAME=role/Spinnaker-Managed-Role
#Add Provider
hal config provider aws account add ${AWS_ACCOUNT_NAME} \
    --account-id ${ACCOUNT_ID} \
    --assume-role ${ROLE_NAME} \
    --regions us-east-1
#Enable
hal config provider aws enable
sudo hal deploy apply
sudo systemctl daemon-reload
##Deploy EKS - Armory Help
#https://docs.armory.io/spinnaker/Armory-Spinnaker-Quickstart-2/#second-connect-spinnaker-to-an-amazon-eks-cluster
#Tool on Local Machine
curl -L https://github.com/armory/spinnaker-tools/releases/download/0.0.7/spinnaker-tools-darwin -o spinnaker-tools
chmod +x spinnaker-tools
#Run on Local Machine
./spinnaker-tools create-service-account
#Copy Local KubeConfig-SA file
scp -i ~/.ssh/your-key.pem kubeconfig-sa ubuntu@your-ip:/home/ubuntu
#This location is TBD, MV was successful but had to move back to Ubuntu Home
sudo mv kubeconfig-sa /home/someUser/.hal/.secret
#Add KubeConfig to Halyard
hal config provider kubernetes account add kubeconfig-sa-eks \
 --provider-version v2 \
 --kubeconfig-file /home/ubuntu/kubeconfig-sa \
 --only-spinnaker-managed true
##Incase of error
hal config provider kubernetes account delete kubeconfig-sa-eks
#Redeploy
sudo hal deploy apply --wait-for-completion
##Helper Stuff
#Local Hal Config for User of someUser
/home/someUser/.hal/config
#EC2 NetStat for UI and API
sudo netstat -tulpn | grep 9000
sudo netstat -tulpn | grep 8084

Looking Forward

At the end of the video, I decided to fire up a rapid Harness Workflow and directly execute the Workflow in our Harness Community Edition. I went searching for help to take a SaaS self-paced test drive of Spinnaker and could not find one readily available to double-check my work. Potentially there was one in Mesosphere’s DC/OS, but that would require a professional edition of DC/OS. You can sign up for a Harness Account for free and execute the same Harness Workflow I did in a similar amount of time as myself.

Cheers!

-Ravi

You might also like
No items found.

Similar Blogs

No items found.
Continuous Delivery & GitOps