Code Monkey home page Code Monkey logo

kubernetes-gitlab's Introduction

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

kubernetes-gitlab's People

Contributors

lwolf avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.