Autoscaling CI on Kubernetes in Kraken CI

Intro

Pre-requisites

Kubernetes Clusters

Install in Minikube

minikube start
helm repo add kraken-ci https://kraken.ci/helm-repo/charts
helm repo update
helm upgrade --install --create-namespace --namespace kraken \
--debug --wait \
--set access.method='external-ips' \
--set access.external_ips={`minikube ip`} \
kraken-ci kraken-ci/kraken-ci
NOTES:
Get the application URL by running these commands:
export NODE_PORT=$(kubectl get — namespace kk-1 -o jsonpath=”{.spec.ports[0].port}” services ui)
export NODE_IP=$(kubectl get nodes — namespace kk-1 -o jsonpath=”{.items[0].status.addresses[0].address}”)
echo http://$NODE_IP:$NODE_PORT
kubectl get all -n kraken

Global Settings

  • Kraken Server URL — an URL with a port of the server that is visible inside the Kubernetes cluster
  • MinIO/S3 Address — the IP address and port of Kraken’s internal artifacts storage address
  • Clickhouse Proxy Address — the IP address and port of Kraken’s internal logs storage address

Configuration in Agents Groups

Job Definition

{
"parent": "root",
"triggers": {
"parent": True
},
"configs": [],
"jobs": [{
"name": "hello",
"timeout": 500,
"steps": [{
"tool": "shell",
"cmd": "echo 'hello world'"
}],
"environments": [{
"system": "ubuntu:20.04",
"agents_group": "k8s",
"config": "default"
}]
}]
}

Run

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michal Nowikowski

Michal Nowikowski

Kraken CI Founder. I’m software engineer focused on full-stack programming and improving software processes.