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, DevHeave...
Search
Ondrej Sika
April 21, 2018
Programming
0
200
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
60
Introduction to Docker & Kubernetes @ JavaDays 2019
ondrejsika
1
220
Terraform - Infrastructure as a Code
ondrejsika
1
210
Gitlab CI + Docker (LinuxDays 2018)
ondrejsika
2
240
TechEd 2018, Introduction to Docker
ondrejsika
0
490
Lightning Network aneb Bitcoin 2.0, Plzensky Barcamp, 7.4.2018
ondrejsika
0
95
Python Libraries for Bitcoin and Ethereum, PyCon SK 2018
ondrejsika
1
140
i3 tiling window manager, Install Fest 2018
ondrejsika
1
300
Docker, Zlin, 8. 2. 2018
ondrejsika
0
100
Other Decks in Programming
See All in Programming
Scaling your build logic
antalmonori
1
130
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
ASP.NET Core の OpenAPIサポート
h455h1
0
150
AWSマネコンに複数のアカウントで入れるようになりました
yuhta28
2
140
Flatt Security XSS Challenge 解答・解説
flatt_security
0
790
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
150
Linux && Docker 研修/Linux && Docker training
forrep
16
3k
AHC041解説
terryu16
0
500
PHPで学ぶプログラミングの教訓 / Lessons in Programming Learned through PHP
nrslib
4
1.1k
Alba: Why, How and What's So Interesting
okuramasafumi
0
230
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
400
.NETでOBS Studio操作してみたけど…… / Operating OBS Studio by .NET
skasweb
0
130
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Making the Leap to Tech Lead
cromwellryan
133
9k
How to Ace a Technical Interview
jacobian
276
23k
A designer walks into a library…
pauljervisheath
205
24k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Gamification - CAS2011
davidbonilla
80
5.1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
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