abrekhov / mks-gitlab-werf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mKS Gitlab Werf setup

GitLab & mKS

Enable kubernetes agent service (kas) in Gitlab config

    environment:
        GITLAB_OMNIBUS_CONFIG: |
            ...
            gitlab_kas['enable'] = true
            ...

Define Gitlab Agent config

# cat .gitlab/agents/mks-agent
ci_access:
  groups:
  - id: <group_id>
  projects:
  - id: <project_id>

Connect cluster

Inside Gitlab Project with .gitlab/agent folder go to Infrastructure > Kubernetes Clusters > Connect a cluster.

Choose your agent.

Execute commands proposed by Gitlab.

More info here

Setting up Werf

cd werf
kubectl -n kube-system apply -f werf-fuse-device-plugin-ds.yaml
kubectl create namespace gitlab-ci
kubectl apply -f enable-fuse-pod-limit-range.yaml
kubectl apply -f sa-runner.yaml
cd ..

More info here

Install Gitlab Runner

cd gitlab-runner
helm repo add gitlab https://charts.gitlab.io 
vim values.yaml # set your domain and registry token
helm install --namespace gitlab-ci gitlab-runner -f values.yaml gitlab/gitlab-runner

More info here

About