• Stars
    star
    174
  • Rank 219,104 (Top 5 %)
  • Language
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Manifests to deploy GitLab on Kubernetes

kubernetes-gitlab

Manifests to deploy GitLab on Kubernetes

Installation process described in blog

Helm chart based on this manifests

https://github.com/lwolf/gitlab-chart

2016-11-24 Update #1 after post was published

Bump versions

  • gitlab-runner:v1.8.0
  • gitlab:8.16.3
  • postgresql:9.5-3
  • redis:3.2.4 (official redis container)

Change in ingress

  • SSH is now available through 1022 service post.
  • NGINX settings is now configurable with configmap nginx-settings-configmap.yml. Which currently sets body-size to 0 and increases timeouts to avoid timeouts.

TL;DR

Deploying GitLab itself

# create gitlab namespace
> $ kubectl create -f gitlab-ns.yml

# deploy redis
> $ kubectl create -f gitlab/redis-svc.yml
> $ kubectl create -f gitlab/redis-deployment.yml

# deploy postgres
> $ kubectl create -f gitlab/postgresql-svc.yml
> $ kubectl create -f gitlab/postgresql-deployment.yml

# deploy gitlab itself
> $ kubectl create -f gitlab/gitlab-svc.yml
> $ kubectl create -f gitlab/gitlab-svc-nodeport.yml
> $ kubectl create -f gitlab/gitlab-deployment.yml

# deploy ingress controller
> $ kubectl create -f ingress/default-backend-svc.yml
> $ kubectl create -f ingress/default-backend-deployment.yml
> $ kubectl create -f ingress/nginx-settings-configmap.yml
> $ kubectl create -f ingress/configmap.yml
> $ kubectl create -f ingress/nginx-ingress-lb.yml
> $ kubectl create -f ingress/gitlab-ingress.yml

Deploying GitLab Runner

# deploy Minio
kubectl create -f minio/minio-svc.yml
kubectl create -f minio/minio-deployment.yml

# check that it's running
kubectl get pods --namespace=gitlab

    gitlab   minio-2719559383-y9hl2    1/1    Running   0   1m

# check logs for AccessKey and SecretKey
> $ kubectl logs -f minio-2719559383-y9hl2 --namespace=gitlab
+ exec app server /export

Endpoint:  http://10.2.23.7:9000  http://127.0.0.1:9000
AccessKey: 9HRGG3EK2DD0GP2HBB53
SecretKey: zr+tKa6fS4/3PhYKWekJs65tRh8pbVl07cQlJfkW
Region:    us-east-1

Browser Access:
   http://10.2.23.7:9000  http://127.0.0.1:9000

Command-line Access: https://docs.minio.io/docs/minio-client-quickstart-guide
   $ mc config host add myminio http://10.2.23.7:9000 9HRGG3EK2DD0GP2HBB53 zr+tKa6fS4/3PhYKWekJs65tRh8pbVl07cQlJfkW

Object API (Amazon S3 compatible):
   Go:         https://docs.minio.io/docs/golang-client-quickstart-guide
   Java:       https://docs.minio.io/docs/java-client-quickstart-guide
   Python:     https://docs.minio.io/docs/python-client-quickstart-guide
   JavaScript: https://docs.minio.io/docs/javascript-client-quickstart-guide


# create bucket named `runner`
> $ kubectl exec -it minio-2719559383-y9hl2 --namespace=gitlab -- bash -c 'mkdir /export/runner'

# register runner with token found on http://yourrunning-gitlab/admin/runners
> $ kubectl run -it runner-registrator --image=gitlab/gitlab-runner:v1.5.2 --restart=Never -- register
Waiting for pod default/runner-registrator-1573168835-tmlom to be running, status is Pending, pod ready: false

Hit enter for command prompt

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci):
http://gitlab.gitlab/ci
Please enter the gitlab-ci token for this runner:
_TBBy-zRLk7ac1jZfnPu
Please enter the gitlab-ci description for this runner:

Please enter the gitlab-ci tags for this runner (comma separated):
shared,specific
Registering runner... succeeded                     runner=_TBBy-zR
Please enter the executor: virtualbox, docker+machine, docker-ssh+machine, docker, docker-ssh, parallels, shell, ssh:
docker
Please enter the default Docker image (eg. ruby:2.1):
python:3.5.1
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
Session ended, resume using 'kubectl attach runner-registrator-1573168835-tmlom -c runner-registrator -i -t' command when the pod is running

# delete temporary registrator
> $ kubectl delete deployment/runner-registrator


Edit gitlab-runner/gitlab-runner-docker-configmap.yml and fill in your runner token and minio credentials.

# deploy configmap and runnner itself
> $ kubectl create -f gitlab-runner/gitlab-runner-docker-configmap.yml
> $ kubectl create -f gitlab-runner/gitlab-runner-docker-deployment.yml

More Repositories

1

kube-cleanup-operator

Kubernetes Operator to automatically delete completed Jobs and their Pods
Go
500
star
2

stolon-chart

Kubernetes Helm chart to deploy HA Postgresql cluster based on Stolon
Smarty
105
star
3

gitlab-chart

Kubernetes Helm chart to deploy GitLab
Smarty
58
star
4

helm-kubectl-docker

docker image with helm and kubectl installed
Shell
47
star
5

kubereplay

Seamless integration of goReplay and Kubernetes
Go
37
star
6

konsumerator

Kafka Consumer Operator. Kubernetes operator to manage consumers of unbalanced kafka topics with per-partition vertical autoscaling based on Prometheus metrics
Go
22
star
7

kubectl-deployer-docker

Alpine based image with kubectl and gettext
Dockerfile
21
star
8

kube-charts

Kubernetes Helm charts
HTML
10
star
9

kube-monitoring

Grafana dashboards for Kubernetes monitoring
5
star
10

docker-multiarch

Multiarch manifest-based dockerfiles [amd64,arm64,arm]
Shell
5
star
11

dodns-docker

Docker container to update DNS record in Digital Ocean
Shell
3
star
12

gitlab-ci-example

Python project example files showing my approach of build/test in gitlab-ci
Shell
3
star
13

srvant-board

[WIP] Carrier board for the CM4 with BMC
Shell
2
star
14

proxy_checker

Small golang script to download and check proxies
Go
2
star
15

dodns-kubernetes

Kubernetes manifests to deploy DoDNS
1
star
16

kube-atlas

[WIP] Opinionated, vendor-everything, GitOps friendly approach to manage Kubernetes cluster state.
Go
1
star
17

golang-glide-docker

Golang alpine image with glide installed used in the build system
1
star
18

tcw122b-scripts

golang based snmp script to control light with PIRs and tcw122b device
Go
1
star
19

bootkube-with-coreos_baremetal

configs to my blogpost
Shell
1
star
20

ironfunction-py-test

IronFunction serverless python example
Python
1
star