SlideShare a Scribd company logo
Built-in CI/CD
with Docker, K8s, Jenkins and AKS
Who am I?
Pau
@netcorebcn
@netcorebcn
netcorebcn.group
Who is doing
Continuous Integration?
@netcorebcn
Who is doing Continuous
Delivery/Deployment?
@netcorebcn
Big Team, Legacy, Manual Tests
@netcorebcn
CI/CD Smells
Devops or CI/CD Department
@netcorebcn
CI/CD Smells
Hard to run CI/CD Pipelines locally
@netcorebcn
CI/CD Smells
@netcorebcn
https://technologyconversations.com/2017/03/06/the-ten-commandments-of-continuous-delivery/
How to start CI/CD?
@netcorebcn
LOCAL DEVELOPMENT ENVIRONMENT
FIRST
@netcorebcn
Choose your tools
• Docker
• Minikube - local K8s
• AKS - Azure managed K8s
• Jenkins
• Bash
@netcorebcn
Example: Quiz Application
@netcorebcn
quiz-ui
quiz-commands quiz-queries
MessageBroker
@netcorebcn
db
Using a local k8s cluster
$ minikube start
$ minikube dashboard
$ minikube stop
@netcorebcn
minikube local node: namespaces
@netcorebcn
CI Staging Production
Create namespaces
$ kubectl create namespace ci
$ kubectl create namespace staging
$ kubectl create namespace production
@netcorebcn
minikube local node: secrets
@netcorebcn
CI Staging Production
${JENKINS_PASS}
${REGISTRY_PASS}
${GITHUB_TOKEN}
${DB_CONNECTION}
${MESSAGE_BROKER}
${DB_CONNECTION}
${MESSAGE_BROKER}
Create secrets
$ kubectl create secret quiz-secrets 
—from-literal= 
dbconnection=${DB_CONNECTION} 
—namespace staging
@netcorebcn
minikube local node: ci pods
@netcorebcn
CI Staging Production
registry
jenkins
Deploy private registry
$ kubectl apply -f registry.yml —namespace ci
@netcorebcn
Jenkins Dockerfile
@netcorebcn
FROM Jenkins:lts
INSTALL DOCKER CLI
INSTALL KUBERNETES CLI
JENKINS PLUGINS
GROOVY SCRIPTS
build, push and deploy jenkins
$ docker-compose build
$ docker-compose push
$ ./deploy.sh ci jenkins-ci
@netcorebcn
Jenkinsfile CI/CD Pipeline
@netcorebcn
Checkout
TAG=commit-sha
Build.sh Push.sh
${TAG} ${REGISTRY} ${ENVIRONMENT}
Deploy.sh
ENVIRONMENT=Staging
Integration-tests.sh
Deploy.sh
ENVIRONMENT=Production
@netcorebcn
Jenkinsfile
minikube local node: build and push
@netcorebcn
CI Staging Production
registry
jenkins
3.Push1.Checkout
2.Build
Build Process
@netcorebcn
Jenkinsfile Docker-compose.yml
Dockerfile
Dockerfile
Dockerfile
quiz-commands
quiz-queries
quiz-ui
Build with docker compose
@netcorebcn
Quiz Commands
Dockerfile
Quiz Queries
Dockerfile
Quiz UI
Dockerfile
${MainProject}
${Libraries}
${UnitTests}
${MainProject}
${Libraries}
${UnitTests} ${MainProject}
Quiz UI
Image
Quiz Queries
Image
Quiz Commands
Image
@netcorebcn
docker-compose.yml
Dockerfile multistage builds
FROM dotnet:sdk 1,4 GB
@netcorebcn
FROM dotnet:runtime 170 MB
STAGE 2
COPY Published App
COPY Source Code
dotnet restore
dotnet test
dotnet publish
STAGE 1
quiz-commands
200 MB
RESULT
@netcorebcn
STAGE 1
STAGE 2
Dockerfile
minikube local node: integration tests
@netcorebcn
CI Staging Production
registry
jenkins
quiz-queries
quiz-ui
quiz-commands
broker
integration
tests
4.Deploy
minikube local node: deploy
@netcorebcn
CI Staging Production
registry
jenkins
quiz-queries
quiz-ui
quiz-commands
broker
quiz-queries
quiz-ui
quiz-commands
broker
integration
tests5.Deploy
AKS
Azure Managed Kubernetes
@netcorebcn
Using aks k8s cluster
$ az aks get-credentials —resource-group —name
$ az aks browse
$ az aks show
$ az aks upgrade
@netcorebcn
How to deploy to AKS?
@netcorebcn
broker
quiz-result
quiz-ui
quiz-voting
jenkins
Quiz app with built-in CI/CD architecture in Azure
@netcorebcn
broker
quiz-result
quiz-ui
quiz-voting
Staging
Production
CI
integration
tests
quiz.westeurope.cloudapp.azure.com
github.com/netcorebcn/quiz
@netcorebcn
Thanks!
Questions?
netcorebcn.group
@netcorebcn

More Related Content

What's hot (20)

PDF
JUC Europe 2015: Scaling Your Jenkins Master with Docker
CloudBees
 
PDF
Brujug Jenkins pipeline scalability
Damien Coraboeuf
 
PDF
Using Docker for Testing
Carlos Sanchez
 
PPTX
2016 Docker Palo Alto - CD with ECS and Jenkins
Tracy Kennedy
 
PDF
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
Eric Smalling
 
PDF
CI/CD with Docker on AWS
Hart Hoover
 
PDF
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Docker, Inc.
 
PDF
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Marcel Birkner
 
PDF
Enabling Microservices @Orbitz - DockerCon 2015
Steve Hoffman
 
PDF
Git and GitHub for Documentation
Anne Gentle
 
PDF
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
CloudBees
 
PDF
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
CloudBees
 
PDF
Continuous Delivery with Jenkins Workflow
Udaypal Aarkoti
 
PDF
OpenStack Preso: DevOps on Hybrid Infrastructure
rhirschfeld
 
PDF
How to Improve Your Image Builds Using Advance Docker Build
Docker, Inc.
 
PPTX
Developer South Coast 2018: Modernizing .NET Apps with Docker
Elton Stoneman
 
PDF
Democratizing Development - Scott Gress
Docker, Inc.
 
PPTX
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
PDF
From Virtual Machines to Containers
camunda services GmbH
 
PDF
Continuous Delivery Pipeline with Docker and Jenkins
Camilo Ribeiro
 
JUC Europe 2015: Scaling Your Jenkins Master with Docker
CloudBees
 
Brujug Jenkins pipeline scalability
Damien Coraboeuf
 
Using Docker for Testing
Carlos Sanchez
 
2016 Docker Palo Alto - CD with ECS and Jenkins
Tracy Kennedy
 
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...
Eric Smalling
 
CI/CD with Docker on AWS
Hart Hoover
 
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Docker, Inc.
 
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
Marcel Birkner
 
Enabling Microservices @Orbitz - DockerCon 2015
Steve Hoffman
 
Git and GitHub for Documentation
Anne Gentle
 
JUC Europe 2015: Scaling of Jenkins Pipeline Creation and Maintenance
CloudBees
 
JUC Europe 2015: Continuous Integration and Distribution in the Cloud with DE...
CloudBees
 
Continuous Delivery with Jenkins Workflow
Udaypal Aarkoti
 
OpenStack Preso: DevOps on Hybrid Infrastructure
rhirschfeld
 
How to Improve Your Image Builds Using Advance Docker Build
Docker, Inc.
 
Developer South Coast 2018: Modernizing .NET Apps with Docker
Elton Stoneman
 
Democratizing Development - Scott Gress
Docker, Inc.
 
7 Habits of Highly Effective Jenkins Users
Jules Pierre-Louis
 
From Virtual Machines to Containers
camunda services GmbH
 
Continuous Delivery Pipeline with Docker and Jenkins
Camilo Ribeiro
 

Similar to Build in continuous integration, delivery and deploy (20)

PPTX
Devops CI-CD pipeline with Containers
NuSpace
 
PPTX
VOLODYMYR TSAP, BAQ, "CI/CD Infrastructure as a Code"
Dakiry
 
PPTX
Continuous Integration & Development with Gitlab
Ayush Sharma
 
PPTX
CI_CD_Pipelines_java_---Presentation.pptx
ajaysahu931430
 
PDF
CI/CD (DevOps) 101
Hazzim Anaya
 
PDF
CI/CD with Kubernetes
Hart Hoover
 
PPTX
SDLC Using Docker for Fun and Profit
dantheelder
 
PDF
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Lean IT Consulting
 
PPTX
Devops architecture
Ojasvi Jagtap
 
PDF
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
CloudBees
 
PPTX
Devops phase-1
G R VISHAL
 
PDF
Docker Meetup at Docker HQ: Docker Cloud
Docker, Inc.
 
PDF
Cicd pixelfederation
Juraj Hantak
 
PDF
Running CI/CD with VMWare Cloud PKS and Jenkins X
Cojan van Ballegooijen
 
PPTX
Transforming Organizations with CI/CD
Cprime
 
PPTX
DevOps intro
Abdelrhman Shawky
 
PDF
Cloud native - CI/CD
Elad Hirsch
 
PDF
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
naveencwana55
 
PDF
How automated cloud infrastructure setups can help with Continuous Delivery
Edmund Siegfried Haselwanter
 
PPTX
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
devopsdaysaustin
 
Devops CI-CD pipeline with Containers
NuSpace
 
VOLODYMYR TSAP, BAQ, "CI/CD Infrastructure as a Code"
Dakiry
 
Continuous Integration & Development with Gitlab
Ayush Sharma
 
CI_CD_Pipelines_java_---Presentation.pptx
ajaysahu931430
 
CI/CD (DevOps) 101
Hazzim Anaya
 
CI/CD with Kubernetes
Hart Hoover
 
SDLC Using Docker for Fun and Profit
dantheelder
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Lean IT Consulting
 
Devops architecture
Ojasvi Jagtap
 
JUC Europe 2015: Bringing CD at Cloud-Scale with Jenkins, Docker and "Tiger"
CloudBees
 
Devops phase-1
G R VISHAL
 
Docker Meetup at Docker HQ: Docker Cloud
Docker, Inc.
 
Cicd pixelfederation
Juraj Hantak
 
Running CI/CD with VMWare Cloud PKS and Jenkins X
Cojan van Ballegooijen
 
Transforming Organizations with CI/CD
Cprime
 
DevOps intro
Abdelrhman Shawky
 
Cloud native - CI/CD
Elad Hirsch
 
Pipeline as Code Continuous Delivery with Jenkins Kubernetes and Terraform 1s...
naveencwana55
 
How automated cloud infrastructure setups can help with Continuous Delivery
Edmund Siegfried Haselwanter
 
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
devopsdaysaustin
 
Ad

Recently uploaded (20)

PPTX
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PPTX
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PPTX
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PPTX
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
PDF
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PPT
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Revolutionizing Code Modernization with AI
KrzysztofKkol1
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
Writing Better Code - Helping Developers make Decisions.pptx
Lorraine Steyn
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
A Complete Guide to Salesforce SMS Integrations Build Scalable Messaging With...
360 SMS APP
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
Mobile CMMS Solutions Empowering the Frontline Workforce
CryotosCMMSSoftware
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Understanding the Need for Systemic Change in Open Source Through Intersectio...
Imma Valls Bernaus
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
Executive Business Intelligence Dashboards
vandeslie24
 
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Ad

Build in continuous integration, delivery and deploy