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
58
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
470
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
Vue.js学習の振り返り
hiro_xre
2
130
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
1.7k
Honoの来た道とこれから
yusukebe
19
3k
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
440
Synchronizationを支える技術
s_shimotori
1
150
現場で役立つモデリング 超入門
masuda220
PRO
13
2.9k
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
1.7k
/←このスケジュール表に立ち向かう フロントエンド開発戦略 / A front-end development strategy to tackle a single-slash schedule.
nrslib
1
590
gopls を改造したら開発生産性が高まった
satorunooshie
8
240
開発効率向上のためのリファクタリングの一歩目の選択肢 ~コード分割~ / JJUG CCC 2024 Fall
ryounasso
0
370
Tuning GraphQL on Rails
pyama86
2
1k
Featured
See All Featured
A Tale of Four Properties
chriscoyier
156
23k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
290
How to Think Like a Performance Engineer
csswizardry
19
1.1k
The Cost Of JavaScript in 2023
addyosmani
45
6.6k
Ruby is Unlike a Banana
tanoku
96
11k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
We Have a Design System, Now What?
morganepeng
50
7.2k
Navigating Team Friction
lara
183
14k
Code Review Best Practice
trishagee
64
17k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
It's Worth the Effort
3n
183
27k
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