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
73
Introduction to Docker & Kubernetes @ JavaDays 2019
ondrejsika
1
260
Terraform - Infrastructure as a Code
ondrejsika
1
250
Gitlab CI + Docker (LinuxDays 2018)
ondrejsika
2
250
TechEd 2018, Introduction to Docker
ondrejsika
0
530
Lightning Network aneb Bitcoin 2.0, Plzensky Barcamp, 7.4.2018
ondrejsika
0
99
Python Libraries for Bitcoin and Ethereum, PyCon SK 2018
ondrejsika
1
160
i3 tiling window manager, Install Fest 2018
ondrejsika
1
320
Docker, Zlin, 8. 2. 2018
ondrejsika
0
110
Other Decks in Programming
See All in Programming
Amazon Verified Permissions実践入門 〜Cedar活用とAppSync導入事例/Practical Introduction to Amazon Verified Permissions
fossamagna
2
100
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
ssssota
14
46k
PHPに関数型の魂を宿す〜PHP 8.5 で実現する堅牢なコードとは〜 #phpcon_hiroshima / phpcon-hiroshima-2025
shogogg
1
340
ドメイン駆動設計のエッセンス
masuda220
PRO
4
600
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
290
Claude CodeによるAI駆動開発の実践 〜そこから見えてきたこれからのプログラミング〜
iriikeita
0
340
釣り地図SNSにおける有料機能の実装
nokonoko1203
0
200
One Enishi After Another
snoozer05
PRO
0
160
モテるデスク環境
mozumasu
3
1.3k
SODA - FACT BOOK(JP)
sodainc
1
8.8k
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
3
980
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
650
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.1k
Scaling GitHub
holman
463
140k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
The Straight Up "How To Draw Better" Workshop
denniskardys
238
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
Code Review Best Practice
trishagee
72
19k
Thoughts on Productivity
jonyablonski
70
4.9k
A designer walks into a library…
pauljervisheath
209
24k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
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