Testing/CI/KubernetesRunners

From QEMU
Revision as of 14:17, 15 March 2023 by Camilla Conte (talk | contribs) (Extend the Setup section with Gitlab, CLI and Agent)

Setup

Kubernetes Cluster

Create a Kubernetes cluster on Azure AKS. Single node pool "agentpool" for the Kubernetes system pods. Enable virtual nodes [1] to have on-demand capacity for the CI workloads.

Gitlab

Follow the docs to Register the agent with GitLab.

Make sure you keep the command under "Recommended installation method" (last step).

CLI

Follow the docs to Install the Azure CLI.

Alternatively, run the Azure CLI in a container [2]:

podman run -it mcr.microsoft.com/azure-cli

Sign in [3]:

az login

Install the Kubernetes CLI (kubectl) [4]:

az aks install-cli

Install the Helm CLI [5]:

curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

Agent

Now it's time to install the agent with Helm [6]. Paste and run the command you got earlier from Gitlab. The "Recommended installation method".

The command you run should look like this:

helm repo add gitlab https://charts.gitlab.io
helm repo update
helm upgrade --install ...