SlideShare a Scribd company logo
@rafaelbenvenuti
@StGebert
Jenkins vs. AWS CodePipeline
Rafael Schleetz Benvenuti & Steffen Gebert
Berlin AWS User Group Meetup – 14.01.2020
@rafaelbenvenuti
@StGebert
Abstract
Who has not used Jenkins? Who does not have a love-hate relationship with it?
At EMnify, we are heavy Jenkins users, but we re also always considering
alternatives where hosted services could make our life easier.
Therefore, we recently - once again - looked at AWS CodePipeline and its friends
CodeCommit, CodeBuild, and CodeDeploy. In this talk, we will compare the current
state of the two ecosystems regarding their simplicity and flexibility for implementing
both trivial as well as complex pipelines. Further, we cover topics like: deployment,
maintenance, security, costs, and usability.
2
@rafaelbenvenuti
@StGebert
Agenda
3
Current
State
Costs Feature
Comparison
Combining
Both
@rafaelbenvenuti
@StGebert
Your Guides
4
Dr. Steffen Gebert
@StGebert
Director Technology, Infrastructure
Würzburg
Rafael Schleetz Benvenuti
@rafaelbenvenuti
Site Reliability Engineer
Berlin
@rafaelbenvenuti
@StGebert
EMnify
5
One of the first cellular
providers on AWS -
dedicated for IoT businesses
We’re where customers are -
on AWS offering
simple integrations
(TGW, Kinesis)
Programmable SIM that
works all over the world in
~600 networks
Web portal and APIs
for managing SIMs and their
policies
@rafaelbenvenuti
@StGebert
EMnify GmbH
• Privately founded in 2014
• ~95 in total
• ~25 people touching code
• Engineering teams in Würzburg & Berlin
• Technology stack: AWS, Terraform, Java, Akka, Perl, C++, Go
7
@rafaelbenvenuti
@StGebert
Jenkins and AWS CodePipeline
Current State
@rafaelbenvenuti
@StGebert
Running Jenkins
• Jenkins Master
• EC2 instance, ECS+EFS, or EKS, Fargate (requires RWO file system)
• Recommendation: run it in Docker and include your plugins
• Build Agents
• Optional J (building on master is usually a bad idea)
• EC2 spot (using ec2 plugin) or EKS (using kubernetes plugin)
9
@rafaelbenvenuti
@StGebert
Job Definition
Job DSL Organization Folder
Everything as Code
10
Jenkins Pipeline
Build Agents
Configuration
as Code
Jenkins Master
AWS
CloudFormation
@rafaelbenvenuti
@StGebert
Out of Scope: Jenkins X
11
@rafaelbenvenuti
@StGebert
AWS CodePipeline
12
@rafaelbenvenuti
@StGebert
Pipeline
Implementation
@rafaelbenvenuti
@StGebert
Jenkins Pipeline
14
Domain-specific language
Built-in control structures
Steps
•sh, bat
•readFile, readMavenPom
•stash, archiveArtifacts
•build
pipeline {
stages {
stage("Build") {
steps {
echo "Starting engines.."
sh "make"
}
}
stage("Unit") {
steps {
sh "mvn test"
}
}
}
agent {
docker { label "maven:latest"
}
}
}
@rafaelbenvenuti
@StGebert
Jenkins Pipeline Steps
• Plugins contribute additional steps
• Online reference: https://jenkins.io/doc/pipeline/steps/
15
@rafaelbenvenuti
@StGebert
CodePipeline Pipeline
16
@rafaelbenvenuti
@StGebert
CodePipeline Actions
17
Source BitBucket Github CodeCommit S3 ECR
Build CodeBuild Cloudbees Jenkins Teamcity
Test CodeBuild
AWS Device
Farm
Jenkins
Deploy CodeDeploy CloudFormation Elastic Beanstalk Service Catalog ECS S3
Invoke AWS Lambda
@rafaelbenvenuti
@StGebert
Pricing
@rafaelbenvenuti
@StGebert
Jenkins
Pricing
19
Setup Costs
•Initial Setup Costs
Usage Costs
•Computing resources used
•EC2 instance costs
•On-Demand
•Reserved
•Spot
•A bit of storage, traffic etc.
Maintenance Costs
•Operational Costs
@rafaelbenvenuti
@StGebert
AWS Pricing
20
CodePipeline
• Each pipeline costs $1.00 per month (when active)
• Pipelines are free for the first 30 days after creation
CodeCommit
• Free for first active 5 users per month
• Each additional active user costs $1.00 per month
CodeBuild
• Small instance (2 vCPUs, 3 GB RAM) - $0.005/min
• Medium instance (4 vCPUs, 7 GB RAM) - $0.01/min
• Large instance (8 vCPUs, 15 GB RAM) - $0.02/min
CodeDeploy
• Free
@rafaelbenvenuti
@StGebert
Price Comparison for Build Capacity
21
Jenkins Master Instance Jenkins Agent Instance
c5.large RESERVED c5.large SPOT
2 vCPUS | 4 GB Ram 2 vCPUS | 4 GB Ram
$39.42/month $0.000325/min
CodeBuild Instance
general1.small
2 vCPUS | 3 GB Ram
$0.005 / min
@rafaelbenvenuti
@StGebert
Price Comparison for Active Pipelines
22
Jenkins Master Instance
c5.large RESERVED
2 vCPUS | 4 GB Ram
CodePipelines
No Instances Required
No Resources Required
@rafaelbenvenuti
@StGebert
Visualization
@rafaelbenvenuti
@StGebert
CodePipeline Basic Pipeline
24
@rafaelbenvenuti
@StGebert
Visualization in Jenkins
25
@rafaelbenvenuti
@StGebert
26
@rafaelbenvenuti
@StGebert
27
@rafaelbenvenuti
@StGebert
28
@rafaelbenvenuti
@StGebert
CodeBuild Log Output
29
@rafaelbenvenuti
@StGebert
CodePipeline Execution Summary
30
@rafaelbenvenuti
@StGebert
Execution History
31
@rafaelbenvenuti
@StGebert
CodeBuild Metrics
32
@rafaelbenvenuti
@StGebert
Let’s Start the
Pipeline
@rafaelbenvenuti
@StGebert
Access Control
@rafaelbenvenuti
@StGebert
Access Control
• Jenkins
• Users and groups, built-in or via
SSO/OAuth
• Per-project/folder permissions
35
• CodePipeline
• IAM users and roles
• Configure and run permissions
AWS Identity and Access
Management
@rafaelbenvenuti
@StGebert
CodePipeline Service Permissions
36
@rafaelbenvenuti
@StGebert
Building
@rafaelbenvenuti
@StGebert
Jenkins Build Environments
• Any agent (running Java) connecting to
the master (Linux, Windows, MacOS, ..)
• Docker images
• Kubernetes Pod with multiple containers
@rafaelbenvenuti
@StGebert
CodeBuild Build Environments
• A CodeBuild build environment represents a combination of:
• operating system / programming language runtime / set of tools
• Essentially, a build environment is a Docker Image by definition.
• You can use Docker Images stored in:
• The Official Codebuild Image Repository
• AWS ECR Repositories
• DockerHub
@rafaelbenvenuti
@StGebert
CodeBuild BuildSpec
40
@rafaelbenvenuti
@StGebert
Secrets Handling
@rafaelbenvenuti
@StGebert
Jenkins Credentials Management
42
@rafaelbenvenuti
@StGebert
CodeBuild Credentials Management
43
@rafaelbenvenuti
@StGebert
Collecting
Test Results
@rafaelbenvenuti
@StGebert
Jenkins: Collecting Test Results
45
@rafaelbenvenuti
@StGebert
CodeBuild: Collecting Test Results
46
@rafaelbenvenuti
@StGebert
Working With
Multiple Branches
@rafaelbenvenuti
@StGebert
Different Behavior per Branch
48
@rafaelbenvenuti
@StGebert
Implementing Gitflow in CodePipeline
49 Source: https://aws.amazon.com/blogs/devops/implementing-gitflow-using-aws-codepipeline-aws-codecommit-aws-codebuild-and-aws-codedeploy/
@rafaelbenvenuti
@StGebert
Getting Approvals
And Input
@rafaelbenvenuti
@StGebert
Approval
51
@rafaelbenvenuti
@StGebert
Getting Input
• Input step
• Simple approval
• Values/text can be dynamically computed
• During pipeline execution
• Jenkins Parametrized build
• Only supplied with job execution
• Can come from other job / via POST
52
@rafaelbenvenuti
@StGebert
Pipeline
Super Powers
@rafaelbenvenuti
@StGebert
Jenkins Scripted Pipelines
• More power compared to Declarative Pipelines
• Full Groovy power
• Control/data structures
• Classes
• Variable assignment
• Groovy errors only triggered during execution
• Build error handling up to user (try/catch)
• Greater flexibility in build agent allocation
• Declarative: use script{} for super powers
• Shared libraries to maintain custom steps
54
@rafaelbenvenuti
@StGebert
CodePipeline Custom Actions
55
@rafaelbenvenuti
@StGebert
Deployment
@rafaelbenvenuti
@StGebert
Deployments
57
@rafaelbenvenuti
@StGebert
Deploying to EC2 Instances
58
AWS CodeDeploy
Jenkins Master
Jenkins Agent
Security
Group
EKS
@rafaelbenvenuti
@StGebert
CodeDeploy AppSpec Example for EC2
59
@rafaelbenvenuti
@StGebert
CodeDeploy Rollbacks
60
@rafaelbenvenuti
@StGebert
Jenkins and CodePipeline
Working Together
@rafaelbenvenuti
@StGebert
From CodePipeline to Jenkins
• AWS CodePipeline Plugin (polls for build jobs, publishes results)
62
@rafaelbenvenuti
@StGebert
From Jenkins to AWS
63
@rafaelbenvenuti
@StGebert
Summary &
Conclusion
@rafaelbenvenuti
@StGebert
Summary & Conclusion
• The best CI/CD tool depends on your situation and requirements (still in 2020)
• Accepting that one tool can‘t cover everything makes switching easier
• Integrating both together allows:
• Getting the best of both / Cheaper solution / Smoother migration
• Advice: Please give CodeDeploy a chance, it is a pretty interesting tool
65

More Related Content

PDF
How to SRE when you have no SRE
PPTX
GitOps - Modern best practices for high velocity app dev using cloud native t...
PPSX
Microservices, DevOps & SRE
PPSX
Microservices Docker Kubernetes Istio Kanban DevOps SRE
PDF
The What, Why, and How of DevSecOps
PPTX
Tour of Azure DevOps
PPTX
A Crash Course in Building Site Reliability
PPTX
Azure DevOps
How to SRE when you have no SRE
GitOps - Modern best practices for high velocity app dev using cloud native t...
Microservices, DevOps & SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
The What, Why, and How of DevSecOps
Tour of Azure DevOps
A Crash Course in Building Site Reliability
Azure DevOps

What's hot (20)

PDF
Advanced GitHub Enterprise Administration
PDF
Practical DevSecOps Course - Part 1
PDF
Building an SRE Organization @ Squarespace
PPTX
Microservices Architecture & Testing Strategies
PDF
DevOps Best Practices
PPSX
CI-CD Jenkins, GitHub Actions, Tekton
PDF
DevSecOps What Why and How
PDF
DevSecOps and the CI/CD Pipeline
PPSX
Microservices Testing Strategies JUnit Cucumber Mockito Pact
PDF
Practical DevSecOps - Arief Karfianto
PPTX
DevOps 101 - an Introduction to DevOps
PDF
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
PPTX
Azure DevOps Best Practices Webinar
PPTX
The Journey to DevSecOps
PDF
Getting Started with Infrastructure as Code
PPTX
Software Composition Analysis Deep Dive
PDF
¿Qué es DevOps y por qué es importante en el Ciclo de Software? por michelada.io
PPTX
CI/CD Best Practices for Your DevOps Journey
Advanced GitHub Enterprise Administration
Practical DevSecOps Course - Part 1
Building an SRE Organization @ Squarespace
Microservices Architecture & Testing Strategies
DevOps Best Practices
CI-CD Jenkins, GitHub Actions, Tekton
DevSecOps What Why and How
DevSecOps and the CI/CD Pipeline
Microservices Testing Strategies JUnit Cucumber Mockito Pact
Practical DevSecOps - Arief Karfianto
DevOps 101 - an Introduction to DevOps
Kubernetes Docker Container Implementation Ppt PowerPoint Presentation Slide ...
Azure DevOps Best Practices Webinar
The Journey to DevSecOps
Getting Started with Infrastructure as Code
Software Composition Analysis Deep Dive
¿Qué es DevOps y por qué es importante en el Ciclo de Software? por michelada.io
CI/CD Best Practices for Your DevOps Journey
Ad

Similar to Jenkins vs. AWS CodePipeline (AWS User Group Berlin) (20)

PDF
Jenkins vs. AWS CodePipeline
PDF
When to use Serverless? When to use Kubernetes?
PPTX
Ci with jenkins docker and mssql belgium
PPTX
Jenkins as a Service - Code all the way down
PPTX
[Devopsdays2021] Roll Your Product with Kaizen Culture
PDF
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
PPTX
Continuous Integration With Jenkins Docker SQL Server
PPTX
Kubernetes @ meetic
PPTX
Jenkins advance topic
PPTX
Building a REST API Microservice for the DevNet API Scavenger Hunt
PDF
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
PDF
Devops Online Training.pdf
PDF
Devops Online Training.pdf
PDF
Devops Online Training.pdf
PDF
Devops Online Training.pdf
PDF
Devops Online Training.pdf
PDF
Priming Your Teams For Microservice Deployment to the Cloud
PDF
DevOps for Databricks
PDF
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
PDF
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
Jenkins vs. AWS CodePipeline
When to use Serverless? When to use Kubernetes?
Ci with jenkins docker and mssql belgium
Jenkins as a Service - Code all the way down
[Devopsdays2021] Roll Your Product with Kaizen Culture
Developer Experience Cloud Native - From Code Gen to Git Commit without a CI/...
Continuous Integration With Jenkins Docker SQL Server
Kubernetes @ meetic
Jenkins advance topic
Building a REST API Microservice for the DevNet API Scavenger Hunt
JUC Europe 2015: Configuration as Code: The Job DSL Plugin
Devops Online Training.pdf
Devops Online Training.pdf
Devops Online Training.pdf
Devops Online Training.pdf
Devops Online Training.pdf
Priming Your Teams For Microservice Deployment to the Cloud
DevOps for Databricks
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
04_Azure Kubernetes Service: Basic Practices for Developers_GAB2019
Ad

More from Steffen Gebert (20)

PDF
Please Give Me Back My Network Cables! On Networking Limits in AWS
PDF
Building an IoT SuperNetwork on top of the AWS Global Infrastructure
PDF
Wenn selbst ‘erlaube allen Verkehr von 0.0.0.0/0’ nicht hilft - Verbindungspr...
PDF
Feature Management Platforms
PDF
Serverless Networking - How We Provide Cloud-Native Connectivity for IoT Devices
PDF
How our Cloudy Mindsets Approached Physical Routers
PDF
Monitoring Akka with Kamon 1.0
PDF
(Declarative) Jenkins Pipelines
PDF
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
PPTX
Continuous Delivery
PDF
Jenkins Pipelines
PDF
Let's go HTTPS-only! - More Than Buying a Certificate
PDF
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
PDF
Investigating the Impact of Network Topology on the Processing Times of SDN C...
PDF
SDN interfaces and performance analysis of SDN components
PDF
Git Power-Workshop
PDF
The Development Infrastructure of the TYPO3 Project
PDF
Der Weg zu TYPO3 CMS 6.0 und Einblicke in die TYPO3-Entwicklung
PDF
Official typo3.org infrastructure &
the TYPO3 Server Admin Team
PDF
Neuigkeiten aus dem TYPO3-Projekt
Please Give Me Back My Network Cables! On Networking Limits in AWS
Building an IoT SuperNetwork on top of the AWS Global Infrastructure
Wenn selbst ‘erlaube allen Verkehr von 0.0.0.0/0’ nicht hilft - Verbindungspr...
Feature Management Platforms
Serverless Networking - How We Provide Cloud-Native Connectivity for IoT Devices
How our Cloudy Mindsets Approached Physical Routers
Monitoring Akka with Kamon 1.0
(Declarative) Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Continuous Delivery
Jenkins Pipelines
Let's go HTTPS-only! - More Than Buying a Certificate
Cleaning Up the Dirt of the Nineties - How New Protocols are Modernizing the Web
Investigating the Impact of Network Topology on the Processing Times of SDN C...
SDN interfaces and performance analysis of SDN components
Git Power-Workshop
The Development Infrastructure of the TYPO3 Project
Der Weg zu TYPO3 CMS 6.0 und Einblicke in die TYPO3-Entwicklung
Official typo3.org infrastructure &
the TYPO3 Server Admin Team
Neuigkeiten aus dem TYPO3-Projekt

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Modernizing your data center with Dell and AMD
PPTX
Cloud computing and distributed systems.
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
KodekX | Application Modernization Development
PDF
cuic standard and advanced reporting.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
20250228 LYD VKU AI Blended-Learning.pptx
Modernizing your data center with Dell and AMD
Cloud computing and distributed systems.
Reach Out and Touch Someone: Haptics and Empathic Computing
KodekX | Application Modernization Development
cuic standard and advanced reporting.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
A Presentation on Artificial Intelligence
Digital-Transformation-Roadmap-for-Companies.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Machine learning based COVID-19 study performance prediction
Unlocking AI with Model Context Protocol (MCP)
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

Jenkins vs. AWS CodePipeline (AWS User Group Berlin)