GitLab
on GKE








http://godfat.org/slide/2017-03-04-gitlab/

Who?

Lin Jen-Shin (godfat)

Introduction
to
GitLab









http://godfat.org/slide/2016-12-24-gitlab/

GitLab?

GKE?

GKE?

Kubernetes?

It's The Future

-Yeah, I was saying about Kubernetes.

-That let’s you orchestrate all your services.

Idea to production demo

Overview

Prepare GKE

Setup GitLab on GKE


git clone https://gitlab.com/gitlab-org/kubernetes-gitlab-demo.git

env GITLAB_GKE_IP=104.199.210.42 \
    GITLAB_GKE_DOMAIN=gitlab.godfat.org \
    GITLAB_LEGO_EMAIL=jen-shin@gitlab.com \
    bash generate.bash

kubectl create -f gitlab-gitlab-godfat-org.yml

https://gitlab.gitlab.godfat.org/

What's installed

Let's play

server.rb


require 'webrick'

server = WEBrick::HTTPServer.new :Port => 5000

server.mount_proc '/' do |request, response|
  response.body = 'Hello, world!'
end

server.start

Dockerfile


FROM ruby:2.4.0-alpine
ADD ./ /app/
WORKDIR /app
ENV PORT 5000
EXPOSE 5000

CMD ["sh", "-c",
     "while :; do ruby ./server.rb; done"]

Setup Kubernetes for CI/CD

Copy Kubernetes API endpoint

Copy Kubernetes credentials

Setup Mattermost command

Setup Mattermost team

Setup GitLab Auto-Deploy

FINALLY

Idea to production

Idea (Chat)


/minimal-ruby-app issue new Make homepage more descriptive

Currently it is just Hello World.

Issue (Tracker)

Plan (Board)

Code (Terminal)

Program online

Commit (Repo)

Test (CI)

Runner progress (for fun)

Review (MR)

Staging (CD)

Production (ChatOps)

Feedback (Cycle Analytics)

Feedback (Monitoring)

Q?