Skip to content

Instantly share code, notes, and snippets.

@keyan
Created January 4, 2018 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save keyan/0893ce125ea1a8696ec4e454f496b2e6 to your computer and use it in GitHub Desktop.
Save keyan/0893ce125ea1a8696ec4e454f496b2e6 to your computer and use it in GitHub Desktop.
Some notes on how to setup spinnaker and use halyard

Installation

  • Halyard must be run on Ubuntu 14.04 (Trusty), you will likely use a VM to run it:
$ vagrant init ubuntu/trusty64; vagrant up --provider virtualbox
  • Sync your local kubeconfig with the guest VM by adding the following line to your newly created Vagrantfile:
config.vm.synced_folder "~/.kube/", "/home/vagrant/.kube"
  • Increase VM memory (or else halyard will crash) by changing the virtualbox memory setting to:
vb.memory = "3024"
  • Access the guest VM and complete following steps from within the guest

  • Download and install kubectl (Kubernetes client):

$ wget https://dl.k8s.io/v1.5.6/kubernetes-client-linux-amd64.tar.gz
$ tar -xvf kubernetes-client-linux-amd64.tar.gz
$ sudo mv kubernetes/client/bin/kubectl /usr/local/bin/
  • Download and install Halyard (Spinnaker installation helper CLI):
$ curl -O https://raw.githubusercontent.com/spinnaker/halyard/master/install/stable/InstallHalyard.sh

$ sudo bash InstallHalyard.sh -y

For existing cluster management

  • Obtain the halconfig for the existing cluster. This config YAML contains state information about the Spinnaker installation. There are multiple ways to distribute the source of truth config file, but the most likely is saving it in S3. Check with the administrator to confirm the location of this file then move it to ~/.hal/config

For initial setup

  • Establish an account to provide access to necessary DockerHub repos:
$ hal config provider docker-registry enable
$ hal config provider docker-registry account add main-docker-registry --address index.docker.io --repositories teacherspayteachers/trending-evaluation-tool --username tptjenkins3 --password
  • Enable the Kubernetes installation provider and add a new account for management:
$ hal config provider kubernetes enable
$ hal config provider kubernetes account add main-spinnaker-account --docker-registries main-docker-registry
  • Confirm that the new account has been added to the local list:
$ hal config provider docker-registry account list
  • Establish the deploy configuration as "distributed" (as opposed to "local") and link the account above:
$ hal config deploy edit --type distributed --account-name main-spinnaker-account
  • Add a persistent storage option:
$ hal config storage edit --type redis
  • Deploy Spinnaker:
$ hal deploy apply

Troubleshooting

  1. Connection errors when trying to issue hal commands:
! ERROR Failed to connect to localhost/127.0.0.1:8064
? Is your daemon running?

This is indicative of an issue with the halyard service, first ensure that the service is running:

$ sudo service halyard status

See this ticket for more debugging info.

  1. //TODO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment