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
210
Terraform - Infrastructure as a Code
ondrejsika
1
190
Gitlab CI + Docker (LinuxDays 2018)
ondrejsika
2
240
TechEd 2018, Introduction to Docker
ondrejsika
0
480
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
290
Docker, Zlin, 8. 2. 2018
ondrejsika
0
99
Other Decks in Programming
See All in Programming
RubyLSPのマルチバイト文字対応
notfounds
0
120
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.5k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
初めてDefinitelyTypedにPRを出した話
syumai
0
400
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
【Kaigi on Rails 2024】YOUTRUST スポンサーLT
krpk1900
1
330
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
910
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
Outline View in SwiftUI
1024jp
1
330
3rd party scriptでもReactを使いたい! Preact + Reactのハイブリッド開発
righttouch
PRO
1
600
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
The Cult of Friendly URLs
andyhume
78
6k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Code Review Best Practice
trishagee
64
17k
We Have a Design System, Now What?
morganepeng
50
7.2k
What's new in Ruby 2.0
geeforr
343
31k
Navigating Team Friction
lara
183
14k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
Six Lessons from altMBA
skipperchong
27
3.5k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
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