Download - Continuous Integration for Fun and Profit
![Page 1: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/1.jpg)
Continuous Integration for Fun and Profit
Arnold Bechtoldt
Darmstadt, 16.06.2016v2
![Page 2: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/2.jpg)
Arnold BechtoldtSystems Engineer / Consultant @ inovex
〉 Software-Defined Datacenters
〉 Continuous Integration/Delivery
〉 DevOps
2
![Page 3: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/3.jpg)
Scenario
![Page 4: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/4.jpg)
The Product
4
Frontend Middleware
MySQL Backend
SMTP Backend
IMAP/POP Backend
![Page 5: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/5.jpg)
Test Matrix
5
Rails-FE
Mail-MW
Calendar-MW
DBMS
K/V 1
K/V 2
MDA Mail-Store
MDA IMAP/POP Proxy
Mail-FTS
MTA Mail-In
MTA Mail-Out
Customer Feature Set 1
Customer Feature Set 2
Customer Feature Set 3
Customer Feature Set 4
...
v1, v2, v3, ...
v1, v2, v3, ...
v1, v2, v3, ...
v1, v2, v3, ...
...
X X
![Page 6: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/6.jpg)
Sad Stories from Real World
![Page 7: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/7.jpg)
We can‘t run integration tests in parallel.
![Page 8: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/8.jpg)
Running all of our tests takes ages.
![Page 9: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/9.jpg)
Our integration tests are fragile.
![Page 10: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/10.jpg)
Producing a bugfix release is hard work.
![Page 11: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/11.jpg)
Time For A Plan
![Page 12: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/12.jpg)
The Plan: Building A Private Travis CI Clone
12
![Page 13: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/13.jpg)
GitLab to the Rescue!
gitlab.com/bechtoldt/tabellarius 13
![Page 14: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/14.jpg)
1. Git-Pushes go to feature/bugfix branches
2. Every Git-Push triggers a test
3. Tests run in prod-like environments
4. Tests run in isolated/dedicated environments
5. Master branch keeps “stable”
6. Make it easy to improve/add tests
Improving the Workflow
14
![Page 15: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/15.jpg)
15
Pipeline (simplified)
run-tests.node5
run-tests.node4
release-artifact deploy-artifactGit Push
IntegrationDelivery
![Page 16: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/16.jpg)
GitLab CI Config
16
stages:
- tests
- release
- deploy
run-tests.node4:
stage: tests
image: node4
script:
- npm test
run-tests.node5:
stage: tests
image: node5
script:
- npm test
release-artifact:
stage: release
script:
- npm release.prod
deploy-artifact:
stage: deploy
script:
- npm deploy.qa
![Page 17: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/17.jpg)
17
GitLab Code Build Status
![Page 18: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/18.jpg)
18
GitLab CI Pipeline
![Page 19: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/19.jpg)
19
GitLab CI Pipeline (2)
![Page 20: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/20.jpg)
Conclusions
![Page 21: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/21.jpg)
〉 Spawning integration test environments at ludicrous speed
〉 Similarity to production leads to faster bugfixing
〉 Isolated testing improves test (=product) quality
〉 Parallel testing increases work efficiency
Conclusions
21
![Page 22: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/22.jpg)
A voice in my head..
22
![Page 23: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/23.jpg)
Arnold Bechtoldtinovex GmbH
CC BY-NC-ND inovex.de +ArnoldBechtoldtGER
github.com/bechtoldt arbe.io youtube.com/inovexGmbH
![Page 24: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/24.jpg)
24
Backup
![Page 25: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/25.jpg)
25
GitHub/Travis Code Build Status
![Page 26: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/26.jpg)
26
Travis CI Pipeline
![Page 27: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/27.jpg)
27
Travis CI Pipeline (2)
![Page 28: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/28.jpg)
28
Jenkins CI Pipeline
![Page 29: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/29.jpg)
29
Jenkins CI Pipeline (3)
![Page 30: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/30.jpg)
30
Jenkins CI Pipeline (4)
![Page 31: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/31.jpg)
31
Gitlab Jenkins Master
Jenkins CI Architecture
Jenkins Slave
ArtifactoryJenkins Slave
Jenkins Slave
![Page 32: Continuous Integration for Fun and Profit](https://reader030.vdocuments.net/reader030/viewer/2022021423/58ae8b761a28abdf068b50d9/html5/thumbnails/32.jpg)
Toolset
32
Tool PurposeGitLab Git Repository + CI ServerDocker Container TechnologyDocker-Compose Container/Service ManagementBash + Confd Image/Container ConfigurationArtifactory Artifact Repository