SlideShare a Scribd company logo
vsupalov.com
Automated Testing
Environments With
Kubernetes & GitLab
Vladislav Supalov, 15th November 2017
vsupalov.comvsupalov.com
Hi, I’m Vladislav!
2
● Computer science background: ML, CV & data
● Casual web development
● Fascination with DevOps
○ Efficient, reliable, (huge), infrastructure setups
○ Monitoring, automation, processes
● Automation engineer
● Data engineering consulting business
○ Data pipelines! Small data :)
● Co-founding a startup - Pivii Technologies
○ Visual artificial intelligence for social media content marketing
● Building a consulting business around Kubernetes automation
2
vsupalov
vsupalov.comvsupalov.com
One Fine Weekend:
3
3
● How hard can it be from scratch?
● Entirely self-hosted solutions
● Using Kubernetes and GitLab
● Free Google Cloud Platform credits :)
● Project: any changes to a Git feature-x or hotfix-x branch →
● Automatically deploy to individual environments
● Purpose: share intermediate results, review progress, run automated tests
● How far can I get?
vsupalov.com
● What? Why would you?
● Words: CI & CD
● Deployment pipelines
● GitLab & Kubernetes ❤
● Lab: automating QA envs
Envs are non-critical & disposable
Using lazy, off-the-shelf components
4
vsupalov.com
What? Why?
5
vsupalov.com
We’re not doing this for fun.
6
vsupalov.com
I am doing this for fun.
Most of you as well, I assume.
Giving developers superpowers.
Awesome, reliable, neat, tidy setups.
One command → everything works.
7
We’re not doing this for fun.
vsupalov.com
Ideally, good companies and
great teams are investing
resources (time & money) into
adopting and using practices &
tech for very good reasons.
Examples: processes, Scrum, workflows, automation,
fancy/immutable infrastructure, Git, Docker, Kubernetes
8
vsupalov.comvsupalov.com
● Company: Save money or make more money
● Reduce risk
● Fix things which are broken
● Less mistakes, faster iteration times, better for company
● Improve team communication
● Save expensive developer time
● Get more team efficiency
● Reduce friction for devs
● Find issues as early and with as little effort as possible
● Create feedback loop between ops and devs
● Happy developers = less employee churn
Good Reasons
9
9
vsupalov.com
Words & Practices:
Continuous Integration
Continuous Delivery
Continuous Deployment
Testing, Staging, Production
10
vsupalov.comvsupalov.com
Continuous Integration
11
11
“Continuous integration is the practice of
routinely integrating code changes into the
main branch of a repository, and testing the
changes, as early and often as possible.
Ideally, developers will integrate their code
daily, if not multiple times a day.”
Source: atlassian.com
vsupalov.comvsupalov.com
Continuous Delivery & Deployment
12
12 Source: atlassian.com
vsupalov.comvsupalov.com
Testing, Staging, Production Envs
13
13 Source: agiledata.org
vsupalov.com
Deployment Pipelines
14
vsupalov.comvsupalov.com
● Continuous Delivery (2010)
● By Jez Humble and David Farley
● ~440 pages
● Don’t be discouraged by the age
● Really good foundation and !juicy! details
● Literally the best book on the topic
Reading Recommendation
15
15 Image source: amazon.de
vsupalov.comvsupalov.com
Deployment Pipeline
16
16 Image source: Continuous Delivery, 2010, Jez Humble and David Farley, Chapter 5
vsupalov.comvsupalov.com
Basic Deployment Pipeline
17
17 Image source: Continuous Delivery, 2010, Jez Humble and David Farley, Chapter 5
vsupalov.com
GitLab & GitLab CI/CD &
Kubernetes
18
I just want to deploy my app.
Repeatedly. When I want to.
Without busy waiting or thinking too much about it.
vsupalov.com
Personal opinion: Kubernetes is
the best choice for dealing with
containerized apps for anything
beyond toy projects.
19
vsupalov.com
GitLab: betting on Kubernetes!
My interpretation of the founder’s tweets...
20
vsupalov.com
GitLab: open source, reasonably
simple to self-host
GitLab CI/CD: very cool product
Used both in a client projects -
really liked ‘em
21
vsupalov.comvsupalov.com
GitLab CI/CD: Overview
22
22
vsupalov.comvsupalov.com
GitLab CI/CD: Pipeline
23
23 #YOLO
vsupalov.comvsupalov.com
GitLab CI/CD: Job
24
24
vsupalov.com
And now: my weekend project -
steps taken, results & learnings
25
vsupalov.comvsupalov.com
Installing & Configuring - From Scratch
26
26
● New Google Kubernetes Engine cluster
○ Helm, (Prometheus), Nginx ingress, Stackdriver, Deis
● Well-sized Ubuntu Compute Engine VM for GitLab
○ Gitlab omnibus edition (EE)
● Setup, configuration
○ Docker
■ net.ipv4.ip_forward=1
○ GitLab task runner
○ Fixing Gitlab configs
○ GCE free quotas, non-ephemeral (aka static) IP
○ Let’s Encrypt & Nginx reverse proxy config for the fun of it
○ Own Docker registry
○ Toy projects
● Kubernetes integration configuration
○ Token, base64 cert...
vsupalov.comvsupalov.com
gitlab-ci.yml
27
27 Link: docs
vsupalov.comvsupalov.com
Starting Out: A Skeleton Pipeline
28
28
vsupalov.comvsupalov.com
Simplest Project → Deis Workflow → Docker Push
29
29
vsupalov.comvsupalov.com
GitLab’s Auto DevOps (Beta)
30L
k30
“Auto DevOps automatically detects, builds, tests, deploys,
and monitors your applications.”
Links: intro, quickstart
vsupalov.comvsupalov.com
Push A Flask Project
31
31
vsupalov.comvsupalov.com
Building...
32
32
vsupalov.comvsupalov.com
But How? Enable & Configure.
33
33
vsupalov.comvsupalov.com
Building: Python + Flask @ First Try
34
34
vsupalov.comvsupalov.com
Oh.
35
35
vsupalov.comvsupalov.com
Ah.
36
36
vsupalov.comvsupalov.com
Alright, A Rails App Then...
37
37
vsupalov.comvsupalov.com
Whoo!
38
38
vsupalov.comvsupalov.com
Shipped.
39
39
vsupalov.comvsupalov.com
Environment Overview
40
40
vsupalov.comvsupalov.com
41
41
vsupalov.com
In Conclusion
42
vsupalov.com
Works. Not quite what I aimed
for.
It’s a work intensive task.
A month of work if you’re starting
from scratch to get it right?
43
vsupalov.com
Deployment pipeline, team and
product are closely linked. They
should grow together.
No one size fits all - only up to a
certain point.
44
vsupalov.comvsupalov.com
● Auto DevOps might be neat-o eventually
● Neglected here:
○ Integrations
○ Lockdown: Security + VPN
○ Wildcard certs with Let’s Encrypt ~2018 + Kube Lego
○ Handle data
○ Monitoring, usable Logs, dashboards
○ Deploy your own Helm chart
○ Maintenance issues
● Beyond magic:
○ Start with a Skeleton
○ Build what’s needed
○ Deployment pipeline for a specific project & team
Closing Thoughts
45
45
vsupalov.com
Thanks! Want to get regular
tips on building deployment
pipelines and automating
Kubernetes with GitLab & co?
Mail: yt@vsupalov.com

More Related Content

What's hot (20)

PDF
Monitoring at a SAAS Startup: Tradeoffs and Tools
bridgetkromhout
 
PDF
Are your v8 garbage collection logs speaking to you?Joyee Cheung -Alibaba Clo...
NodejsFoundation
 
PPTX
JS performance tools
Dmytro Ovcharenko
 
PDF
Stockholm Jenkins Area Meetup, March 2017
Andrey Devyatkin
 
PDF
Devops For Drupal
Kris Buytaert
 
PDF
Cloud Driven Development: a better workflow, less worries, and more power
Marzee Labs
 
PDF
Terraform GitOps on Codefresh
Codefresh
 
PDF
When JHipster meets Microsoft-JHipster and Microsoft products
Anthony Viard
 
PDF
Promise of DevOps
Juraj Hantak
 
PDF
Gradle build automation tool
Ioan Eugen Stan
 
PDF
Docker based-Pipelines with Codefresh
Codefresh
 
ODP
What grunt?
Lucio Martinez
 
PDF
Beyond OpenStack
Jirayut Nimsaeng
 
PDF
Devoxx : being productive with JHipster
Julien Dubois
 
PPTX
Grunt - The JavaScript Task Runner
Mohammed Arif
 
PDF
wp-cli and plugin development with future and past compatibility (Word Camp P...
Andreas - Creten
 
PDF
Cloud Native CI/CD with GitOps
Kasper Nissen
 
PDF
Foundations for the perfect technology stream
Bernd Alter
 
PPTX
DevOps Practices @Pipedrive
Renno Reinurm
 
PDF
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
César Hernández
 
Monitoring at a SAAS Startup: Tradeoffs and Tools
bridgetkromhout
 
Are your v8 garbage collection logs speaking to you?Joyee Cheung -Alibaba Clo...
NodejsFoundation
 
JS performance tools
Dmytro Ovcharenko
 
Stockholm Jenkins Area Meetup, March 2017
Andrey Devyatkin
 
Devops For Drupal
Kris Buytaert
 
Cloud Driven Development: a better workflow, less worries, and more power
Marzee Labs
 
Terraform GitOps on Codefresh
Codefresh
 
When JHipster meets Microsoft-JHipster and Microsoft products
Anthony Viard
 
Promise of DevOps
Juraj Hantak
 
Gradle build automation tool
Ioan Eugen Stan
 
Docker based-Pipelines with Codefresh
Codefresh
 
What grunt?
Lucio Martinez
 
Beyond OpenStack
Jirayut Nimsaeng
 
Devoxx : being productive with JHipster
Julien Dubois
 
Grunt - The JavaScript Task Runner
Mohammed Arif
 
wp-cli and plugin development with future and past compatibility (Word Camp P...
Andreas - Creten
 
Cloud Native CI/CD with GitOps
Kasper Nissen
 
Foundations for the perfect technology stream
Bernd Alter
 
DevOps Practices @Pipedrive
Renno Reinurm
 
Aprende, contribuye, y surfea Cloud Native Java - GuateJUG 2021
César Hernández
 

Similar to Automated Testing Environments With Kubernetes & GitLab (20)

PDF
Gitlab ci e kubernetes, build test and deploy your projects like a pro
sparkfabrik
 
PPTX
From Zero to DevOps Superhero: The Container Edition (JenkinsWorld SF)
Jessica Deen
 
PDF
Introduction to DevOps and the Practical Use Cases at Credit OK
Kriangkrai Chaonithi
 
PDF
Continuous Delivery With Containers
All Things Open
 
PDF
Default GitLab CI Pipeline - Auto DevOps
Rajith Bhanuka Mahanama
 
PPTX
Cloud Native Transformation (Alexis Richardson) - Continuous Lifecycle 2018 ...
Weaveworks
 
PDF
Gitlab ci, cncf.sk
Juraj Hantak
 
PDF
Continuous Integration/Deployment with Gitlab CI
David Hahn
 
PPTX
SDLC Using Docker for Fun and Profit
dantheelder
 
PDF
Madison PHP 2015 - DevOps For Small Teams
Joe Ferguson
 
PDF
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
PPTX
GCCP JSCOE Session 2
GDSC
 
PDF
The Self-Service Developer - GOTOCon CPH
Laszlo Fogas
 
PPTX
Ship code like a keptn
Rob Jahn
 
PDF
Kubernetes Up Running Dive Into The Future Of Infrastructure Third Edition 3r...
luvoszugrav
 
PDF
Kubernetes Intro
Antonio Ojea Garcia
 
PDF
Speed & Agility of Innovation with Docker & Kubernetes
ICS
 
PDF
Midwest PHP 2017 DevOps For Small team
Joe Ferguson
 
PDF
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
PDF
Free GitOps Workshop + Intro to Kubernetes & GitOps
Weaveworks
 
Gitlab ci e kubernetes, build test and deploy your projects like a pro
sparkfabrik
 
From Zero to DevOps Superhero: The Container Edition (JenkinsWorld SF)
Jessica Deen
 
Introduction to DevOps and the Practical Use Cases at Credit OK
Kriangkrai Chaonithi
 
Continuous Delivery With Containers
All Things Open
 
Default GitLab CI Pipeline - Auto DevOps
Rajith Bhanuka Mahanama
 
Cloud Native Transformation (Alexis Richardson) - Continuous Lifecycle 2018 ...
Weaveworks
 
Gitlab ci, cncf.sk
Juraj Hantak
 
Continuous Integration/Deployment with Gitlab CI
David Hahn
 
SDLC Using Docker for Fun and Profit
dantheelder
 
Madison PHP 2015 - DevOps For Small Teams
Joe Ferguson
 
ZendCon 2015 - DevOps for Small Teams
Joe Ferguson
 
GCCP JSCOE Session 2
GDSC
 
The Self-Service Developer - GOTOCon CPH
Laszlo Fogas
 
Ship code like a keptn
Rob Jahn
 
Kubernetes Up Running Dive Into The Future Of Infrastructure Third Edition 3r...
luvoszugrav
 
Kubernetes Intro
Antonio Ojea Garcia
 
Speed & Agility of Innovation with Docker & Kubernetes
ICS
 
Midwest PHP 2017 DevOps For Small team
Joe Ferguson
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
Pablo Godel
 
Free GitOps Workshop + Intro to Kubernetes & GitOps
Weaveworks
 
Ad

Recently uploaded (20)

PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
PDF
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
PPTX
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
Why aren't you using FME Flow's CPU Time?
Safe Software
 
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
PDF
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
 
PPTX
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PPTX
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Why aren't you using FME Flow's CPU Time?
Safe Software
 
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
 
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
Mastering Authorization: Integrating Authentication and Authorization Data in...
Hitachi, Ltd. OSS Solution Center.
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Ad

Automated Testing Environments With Kubernetes & GitLab