Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Automation using Gitlab CI and Docker, DevHeaven 2018
Search
Ondrej Sika
April 21, 2018
Programming
0
190
Automation using Gitlab CI and Docker, DevHeaven 2018
https://ondrej-sika.cz/blog/2018/talk-automatizace-pomoci-gitlab-ci-a-dockeru/
Ondrej Sika
April 21, 2018
Tweet
Share
More Decks by Ondrej Sika
See All by Ondrej Sika
ZEIT, Serverless Deployments
ondrejsika
0
47
Introduction to Docker & Kubernetes @ JavaDays 2019
ondrejsika
1
190
Terraform - Infrastructure as a Code
ondrejsika
1
170
Gitlab CI + Docker (LinuxDays 2018)
ondrejsika
2
230
TechEd 2018, Introduction to Docker
ondrejsika
0
460
Lightning Network aneb Bitcoin 2.0, Plzensky Barcamp, 7.4.2018
ondrejsika
0
91
Python Libraries for Bitcoin and Ethereum, PyCon SK 2018
ondrejsika
1
130
i3 tiling window manager, Install Fest 2018
ondrejsika
1
280
Docker, Zlin, 8. 2. 2018
ondrejsika
0
98
Other Decks in Programming
See All in Programming
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
470
What We Can Learn From OSS
inouehi
0
440
Sheets API使ってみた
toshi0383
2
160
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
120
dbtのドメイン分割による データ基盤の改善とDigdagとの連携
sakama
0
440
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
1k
Exploring the Implementation of “t.Run”, “t.Parallel”, and “t.Cleanup”
akarin
1
110
PHPはいつから死んでいるかの調査
chiroruxx
2
420
業務ツールとして使うPostman
msys75
0
100
Netty Chicago Java User Group 2024-04-17
sullis
0
200
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
800
"config" ってなんだ? / What is "config"?
okashoi
0
320
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
The Art of Programming - Codeland 2020
erikaheidi
43
12k
Done Done
chrislema
178
15k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Build your cross-platform service in a week with App Engine
jlugia
226
17k
Being A Developer After 40
akosma
66
580k
How to train your dragon (web standard)
notwaldorf
75
5.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
7
3.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
46k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
Building Flexible Design Systems
yeseniaperezcruz
320
37k
What the flash - Photography Introduction
edds
64
11k
Transcript
Automation using Gitlab CI and Docker Ondrej Sika
[email protected]
DevHeaven,
Pilsen CZ, 21. 4. 2018
Goals - Build application - Auto deploy to test -
Manual deploy to production
None
Tools - Git - Gitlab + Gitlab CI - Docker
- Traefik
Setup CI environment
Gitlab CI Runner docker-machine create runner eval $(docker-machine env runner)
git clone
[email protected]
:ondrejsika/gitlab-ci-runner.git cd gitlab-ci-runner ./create-runner.sh ./register-runner.sh GITLAB_CI_TOKEN
Server
Traefik Proxy git clone
[email protected]
:ondrejsika/traefik-ssl.git cd traefik-ssl # put SSL
cert.pem and key.pem to certs/ dit docker-compose up -d
Gitlab
Gitlab - Create Gitlab project - Setup CI sercret variables
- SSLPASS (password to server which runs the app)
Application
Application - Dockerize project - Add .gitlab-ci.yml (CI config)
Clone Jekyll Website git clone
[email protected]
:ondrejsika/jekyll-demo.git cd jekyll-demo git remote
rename origin github git remote add origin
[email protected]
:test/jekyll.git git push origin master -u
Dockerize git reset --hard github/docker cat Dockerfile
Add Gitlab CI configuration git reset --hard github/gitlab-ci cat .gitlab-ci.yml
Push & some magic hapens
Push git push origin master -u
Make some changes git checkout -b awesome-header vim index.md git
commit -am 'make header awesome' git push origin awesome-header -u
Resources - https://github.com/ondrejsika/jekyll-demo - https://github.com/ondrejsika/traefik-ssl - https://github.com/ondrejsika/gitlab-ci-runner - https://github.com/ondrejsika/ondrejsika-ci-docker -
https://traefik.io/
Thank you & Questions Ondrej Sika email:
[email protected]
web: ondrej-sika.cz
twitter: @ondrejsika linkedin: /in/ondrejsika/ Slides: https://sika.link/devheaven2018