Testing/CI/KubernetesRunners: Difference between revisions

From QEMU
(Create)
 
(Extend the Setup section with Gitlab, CLI and Agent)
Line 1: Line 1:
== Setup ==
== Setup ==
Create a Kubernetes cluster on Azure AKS. Single node pool "agentpool" for the Kubernetes system pods. Enable [https://learn.microsoft.com/en-us/azure/aks/virtual-nodes virtual nodes] to have on-demand capacity for the CI workloads.
 
=== Kubernetes Cluster ===
Create a Kubernetes cluster on Azure AKS. Single node pool "agentpool" for the Kubernetes system pods.
Enable virtual nodes [https://learn.microsoft.com/en-us/azure/aks/virtual-nodes] to have on-demand capacity for the CI workloads.
 
=== Gitlab ===
Follow the docs to [https://docs.gitlab.com/ee/user/clusters/agent/install/index.html#register-the-agent-with-gitlab Register the agent with GitLab].
 
Make sure you keep the command under "Recommended installation method" (last step).
 
=== CLI ===
Follow the docs to [https://learn.microsoft.com/en-us/cli/azure/install-azure-cli Install the Azure CLI].
 
Alternatively, run the Azure CLI in a container [https://learn.microsoft.com/en-us/cli/azure/run-azure-cli-docker]:
 
podman run -it mcr.microsoft.com/azure-cli
 
Sign in [https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli]:
 
az login
 
Install the Kubernetes CLI (kubectl) [https://learn.microsoft.com/en-us/cli/azure/aks?view=azure-cli-latest#az-aks-install-cli]:
 
az aks install-cli
 
Install the Helm CLI [https://helm.sh/docs/intro/install/]:
 
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
 
=== Agent ===
Now it's time to install the agent with Helm [https://docs.gitlab.com/ee/user/clusters/agent/install/index.html#install-the-agent-with-helm].
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 ...

Revision as of 14:17, 15 March 2023

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 ...