Spinbox — Spinnaker in a box
From spinnaker.io, Spinnaker is “an open source, multi-cloud continuous delivery platform for releasing software changes with high velocity and confidence”
It is a continuous delivery tool used to facilitate the delivery of software. In this blog post, we will focus on setting up a local instance of Spinnaker for proof-of-concept (POC) purposes. We will be creating a small boat in a bottle
In practice, Spinnaker is a really rough-y tough-y tool to deal with. It can be hard to understand and nearly impossible to install to run as a proof-of-concept for any beginner.
The idea of usability is very important when it comes to using any new tool. We know in theory and practice that a student has an attention span of 10 -18 minutes during lectures, refer to this study. Software tool docs should be very easy to learn and pick up for wider adoption and acceptance, especially in the early stages. Unfortunately, when reading through Spinnaker’s docs, you don’t see a straightforward success path to actually install the tool. This can make for a very frustrating and time-consuming installation experience, which could turn some people away from using Spinnaker altogether.
This difficulty in installing Spinnaker was the main motivation for me to come up with a Vagrant-y Box-y solution. Being inspired by projects like HashiQube, providing a vagrant up solution is just gold!
Spinbox is a simple open-source project to provide a quick and easy setup to have a Spinnaker node up and ready in no time. In around ~10 minutes, you should be able to spin up the Spinnaker node. In this blog, I will not cover creating spinnaker pipelines but only how to install spinnaker.
What do you need to know:
- Basic knowledge of Vagrant
- Basic knowledge of CI/CD concepts
- Basic knowledge of Virtualbox
- Basic knowledge of Kubernetes
- Virtualbox Version 6.1.26
- Vagrant Version 2.2.18
Here’s what you need to get started. First, open up a terminal and type:
git clone firstname.lastname@example.org:buamod/spinbox.git
Open the virtualbox VM and type
sudo hal deploy connect
vagrant@ubuntu-bionic:~$ sudo hal deploy connect
+ Get current deployment
+ Connect to Spinnaker deployment.
Forwarding from 127.0.0.1:8084 -> 8084
Forwarding from [::1]:8084 -> 8084
Forwarding from 127.0.0.1:9000 -> 9000
Forwarding from [::1]:9000 -> 9000
Open a new browser window and type:
Spinbox uses Vagrant to spin everything in one place but this doesn’t mean you can’t replicate this in another platform, here is the tech stack and structure in detail.
The Spinbox tech stack relies on Vagrant to spin up a virtual machine using Virtualbox. Spinnaker runs on Kubernetes and requires AWS S3- compatible storage. For this reason, I have chosen to run Kubernetes using k3s, and use MinIO to provide AWS S3-compatible storage on the VM image. The Vagrant machine’s base image is Ubuntu 18, with docker installed to host MinIO.
We will break down the project structure into simple steps
1- Vagrant box, bumoad/spinbox which is an ubuntu 18 with openjdk11 and docker installed.
2- I used these settings.YAML to contain the configuration of the setup, like memory, CPU, and Kubernetes version.
3- Now we will be using the Minio storage as our S3 compatible solution, running from a container on the host server (spinbox).
Now we need to configure Halyard and then install Spinnaker.
Finally, we need to expose our Spinnaker URLs to be available so we can reach them from the virtual machine browser.
sudo hal deploy connect
- This could be used as a POC locally, data could be backed up and restored on another spinnaker setup. For example, you can use the Halyard configuration backup feature. You can reconfigure and reproduce the spinnaker configuration.
hal backup create
hal backup restore — backup-path <backup-name>.tar
- The whole setup could be replicated in any cloud (e.g. AWS, Azure, Google Cloud).
- Using Spinnaker-Operator could be an option for Spinbox in the future!
- Please feel free to contribute, open issue/comment or fork the project.
I would like to thank my mentor Adri Villela for all the support and help to get me into working on this project and blogging it too. Many thanks, Captin :D.