Skip to content

Instantly share code, notes, and snippets.

@misskecupbung
Last active November 10, 2023 08:14
Show Gist options
  • Save misskecupbung/00322b3e8795c1ca9e5842bab6339a29 to your computer and use it in GitHub Desktop.
Save misskecupbung/00322b3e8795c1ca9e5842bab6339a29 to your computer and use it in GitHub Desktop.

This is a simple guide to deploy Spinnaker on Kubernetes Cluster with Minikube and Halyard.

Requirements:

  • Internet Connections
  • Virtual Machine
  • Package: curl, wget, git.

Install Minikube

sudo apt-get install curl apt-transport-https virtualbox virtualbox-ext-pack -y
wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo cp minikube-linux-amd64 /usr/local/bin/minikube
sudo chmod 755 /usr/local/bin/minikube
minikube version

Install k8s with minikube

curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
minikube start --cpus 4 --memory 8192
kubectl get nodes

Install Minio for S3 Storage

wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
sudo MINIO_ACCESS_KEY=minioaddmin MINIO_SECRET_KEY=miniopassword ./minio server /mnt/data_minio

Install Halyard

sudo apt install default-jre default-jdk -y
curl -O https://raw.githubusercontent.com/spinnaker/halyard/master/install/debian/InstallHalyard.sh
sudo bash InstallHalyard.sh

Configure Minio for Spinnaker Storage

echo $MINIO_SECRET_KEY | hal config storage s3 edit --endpoint http://127.0.0.1:9000 \
    --access-key-id $MINIO_ACCESS_KEY \
    --secret-access-key
hal config storage edit --type s3

Configure Docker registry

hal config provider docker-registry account add dockerhub --address index.docker.io --repositories library/nginx
# For Private Registry:
hal config provider docker-registry account add docker-private-repo --address https://my-private-docker-repo.example.com --username myuser  --password

hal config provider docker-registry enable

Configure the Spinnaker Kubernetes provider

hal config provider kubernetes account add my-k8s-account --docker-registries dockerhub --context $(kubectl config current-context)
hal config provider kubernetes enable
hal config deploy edit --type=distributed --account-name my-k8s-account

Set Spinnaker Version

hal version list
hal config version edit --version 1.22.2
echo "host: 0.0.0.0" | tee ~/.hal/default/service-settings/gate.yml ~/.hal/default/service-settings/deck.yml
hal deploy apply
kubectl get pods --namespace spinnaker
hal deploy connect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment