SlideShare a Scribd company logo
Drone
13.08.2018
Patrick Jahns
Container native continuous Integration / Delivery
2
• Software Engineer
• ❤ Clean Code // DevOps // SRE
• Solutions Architect at ownCloud
patrick_jahns
patrickjahns
mail@patrickjahns.de
3
4
Drone CI
5
Drone CI
• Open Source (https://github.com/drone) - started in 2014
• Easy to install & maintain (docker pull drone/drone)
• Simple YAML Configuration (superset of docker-compose.yml)
• Container native CI/CD platform (everything runs within containers)
• Isolated builds ( workspace / network )
• Integrates with several VCS Providers ( Github, Gitlab, Bitbucket, Gitea … )
• Rich set of official plugins (any container can be a plugin)
• Management via cli / REST Api ( but also has a WebUI )
• Execute locally with “drone exec”
• Provides prometheus metrics
6
Drone CI
Server
SERVICES
WORKSPACE
STEP1
git clone
STEP2
make
STEP3
publish
Agent
7
Drone - Concepts
• Pipeline
– Steps to be executed
• Workspace
– Ephemeral
– Shared between individual pipeline steps
• Services
– Containers that are available during the pipeline execution
– Yaml key == hostname of service
• Conditions
– Ability to specify conditions when a pipeline/step will be executed
Basic Concepts
Examples: https://github.com/patrickjahns/drone-examples
8
Drone - Concepts
Groups
• Shared workspace
• Run on the same Agent
Matrix Builds
• Completely seperated builds
• Can be scheduled on different Agents
Parallel builts // Concurrency
Examples: https://github.com/patrickjahns/drone-examples
9
Drone - Concepts
• Secrets are injected as environment variables
• Ability to limit secret per build event ( push / pull-request / tag )
• Ability to limit secrets to specific images/plugins
• Secrets can be stored in various backends ( database / “global secrets file”* / vault* )
• For public repositories –> gated builds (changes to .drone.yml need approval )
Secrets
*) requires enterprise subscription
Examples: https://github.com/patrickjahns/drone-examples
10
Drone - Concepts
• Plugins are “just” containers => complete freedom and language agnostic
• Large ecosystem of readily available plugins => http://plugins.drone.io/
• Anything missing => easy to build your own plugin
– Example from ownCloud
Plugins
11
Drone - Concepts
• Run your CI pipeline locally
• Ability to debug // introspect if anything fails on the remote server
• Example:
Drone Exec
Drone@AWS
13
Drone@AWS
• Easy Deployment
– Instance where drone server runs ( EC2 / ECS / Kubernetes )
– Database Server ( RDS ? )
– Instance(s) where drone Agents run
• Various Plugins for direct interaction with AWS services available
– Example: AWS Cloudformation, AWS ECR, AWS ECS, AWS Elastic Beanstalk, AWS Lambda
more at http://plugins.drone.io/
– Most plugins require secret and access_key => currently not possible to use IAM Profiles
14
Drone@AWS
Publishing Container to ECR
• plugins/ecr can publish to ECR via a ACCESS_KEY & Secret
Using Images from ECR in drone pipeline
• Global Registry File *)
• Periodic Job Running on Agent Host Instance ( aws ecr get-login --no-include-email )
• Pipeline step with mounted docker-socket that logs into aws ecr and pulls the image
*) requires enterprise subscription
http://docs.drone.io/setup-global-registry-credentials/#elastic-container-registry-ecr
Working with AWS ECR
Scaling DroneCI
16
Scaling Drone - Autoscaler
• CI/CD volumes are highly dependant on ”daily-business”
• Fast feedback cycles are required for developer velocity
• CI/CD requires compute power -> easily scaleable with cloud providers
17
Scaling Drone - Autoscaler
• Support for AWS, DigitalOcean, Google, HetznerCloud
• Planned to support Azure, Packet.net, Scaleway
• Simple service connected to Drone server
• Hooked into Drone CLI, e.g. “drone server create”
• Checks the Drone queue in a loop
• Launch servers based on a cloud-init config
• Start Drone agent via remote Docker connection (secured by TLS)
• Unregister Drone agent if not needed anymore
• Destroy server instance after a minimal amount of time
• Provides Prometheus metrics
18
Server
Autoscaler
Agent
Agent
Agent
Agent
Scaling Drone - Autoscaler
19
Scaling Drone – Autoscaler@AWS
• Requirements:
– VPC, Subnet, Security Group
– EC2 / ECS where autoscaler can be additionally started
• Caveats
– Agents either need to have a public-ip associate // or a NAT needs to be defined
– It is currently limited to On Demand instances – Pull Request for Spot Instances will follow
– Currently not yet possible to attach instance roles
20
21
0
5000
10000
15000
20000
25000
30000
35000
Nov
6-Nov
11-Nov
16-Nov
21-Nov
26-Nov
Dec
5-Dec
12-Dec
17-Dec
22-Dec
27-Dec
Jan
5-Jan
11-Jan
16-Jan
21-Jan
26-Jan
31-Jan
4-Feb
9-Feb
14-Feb
19-Feb
24-Feb
Mar
5-Mar
10-Mar
15-Mar
20-Mar
25-Mar
30-Mar
3-Apr
8-Apr
13-Apr
18-Apr
26-Apr
1-May
7-May
12-May
17-May
22-May
28-May
1-Jun
6-Jun
11-Jun
16-Jun
commulated runtime
time to finish
time to finish (including queue wait)
DroneCI Outlook
23
Drone - Outlook
• Official support for Arm / Arm64
• Experimental support for windows containers
• Support for multi-machine fan-in / fan-out
• Support for multi-machine, multi-architecture
• Hooks (http/REST) to override default behavior i.e. secrets, registry credentials, approval workflows
– Example for AWS – Trigger a Lambda Function to fetch secrets from AWS SecretsManager / ParameterStore
RoadMap / Topics for drone 0.9
24
Links
Slides & SourceCode
• https://github.com/patrickjahns/awsmeetup-20180813-drone
• https://github.com/patrickjahns/drone-examples
Drone
• Drone Github – https://github.com/drone
• Drone documentation - http://docs.drone.io/
• Autoscaler - https://github.com/drone/autoscaler
• Autoscaler documentation - https://autoscale.drone.io/
• Official Drone plugins - http://plugins.drone.io/
• Drone community - https://discourse.drone.io/
Thank You!

More Related Content

PDF
Drone CI
PDF
Enabling Microservices @Orbitz - DockerCon 2015
PDF
Labels, Labels, Labels
PPTX
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
PDF
GDGSCL - Docker a jeho provoz v Heroku a AWS
PPTX
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
PDF
Red hat ansible automation technical deck
PDF
Docker for developers on mac and windows
Drone CI
Enabling Microservices @Orbitz - DockerCon 2015
Labels, Labels, Labels
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
GDGSCL - Docker a jeho provoz v Heroku a AWS
2016 - Continuously Delivering Microservices in Kubernetes using Jenkins
Red hat ansible automation technical deck
Docker for developers on mac and windows

What's hot (20)

PDF
Drone CI/CD Platform
PDF
Docker Best Practices Workshop
PDF
Drone Continuous Integration
PPTX
CI Implementation with Kubernetes at LivePerson by Saar Demri
PDF
CI/CD Pipeline mit Gitlab CI und Kubernetes
PDF
Continuous Delivery Pipeline with Docker and Jenkins
PDF
Exploring Docker in CI/CD
PDF
Improve your Java Environment with Docker
DOCX
Build Your Own SaaS using Docker
PPTX
Devoxx 2015 - Web Application Development using Grails and Docker
PDF
kubernetes operators
PPT
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
PDF
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
PDF
DCEU 18: Building Your Development Pipeline
PPTX
Javaone 2014 - Git & Docker with Jenkins
PPTX
Continuous Delivery to Kubernetes Using Helm
PDF
Ultimate DevOps - Jenkins Enterprise & Red Hat OpenShift
PDF
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
PDF
Unlimited Staging Environments
PDF
Kubelet with no Kubernetes Masters | DevNation Tech Talk
Drone CI/CD Platform
Docker Best Practices Workshop
Drone Continuous Integration
CI Implementation with Kubernetes at LivePerson by Saar Demri
CI/CD Pipeline mit Gitlab CI und Kubernetes
Continuous Delivery Pipeline with Docker and Jenkins
Exploring Docker in CI/CD
Improve your Java Environment with Docker
Build Your Own SaaS using Docker
Devoxx 2015 - Web Application Development using Grails and Docker
kubernetes operators
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
Continuous Delivery in Enterprise Environments using Docker, Ansible and Jenkins
DCEU 18: Building Your Development Pipeline
Javaone 2014 - Git & Docker with Jenkins
Continuous Delivery to Kubernetes Using Helm
Ultimate DevOps - Jenkins Enterprise & Red Hat OpenShift
DockerCon EU 2015: Continuous Integration with Jenkins, Docker and Compose
Unlimited Staging Environments
Kubelet with no Kubernetes Masters | DevNation Tech Talk
Ad

Similar to Drone CI - Container native continuous Integration / Delivery (20)

PDF
How we scale DroneCi on demand
PDF
Drone 1.0 Feature
PDF
HOW TO DRONE.IO IN CI/CD WORLD
PDF
Drone presentation
PPTX
drone continuous Integration
PDF
TDC2018SP | Trilha Containers - CI/CD com Docker e Drone
PDF
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
PDF
KubeCI - Cloud Native Continuous Delivery for Kubernetes
PDF
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
PPTX
Building a Scalable CI Platform using Docker, Drone and Rancher
PDF
Automating the CI / CD pipeline of your containerized applications
PDF
Cloud-Native Drupal: a survival guide
PDF
Continuous Delivery of Containers with Drone & Kontena
PDF
CoreOS and cloud provider integration: simple cloud-init example at Exoscale
PDF
Ci/CD platform with drone and gogs
PDF
stackconf 2024 | On-Prem is the new Black by AJ Jester
PDF
Cloud Native Landscape (CNCF and OCI)
PDF
Shipping to Server and Cloud with Docker
PDF
AWS Community Day - Amy Negrette - Gateways to Gateways
PDF
Containers & Cloud Native Ops Cloud Foundry Approach
How we scale DroneCi on demand
Drone 1.0 Feature
HOW TO DRONE.IO IN CI/CD WORLD
Drone presentation
drone continuous Integration
TDC2018SP | Trilha Containers - CI/CD com Docker e Drone
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
KubeCI - Cloud Native Continuous Delivery for Kubernetes
Bring Continuous Integration to Your Laptop With the Drone CI Docker Extensio...
Building a Scalable CI Platform using Docker, Drone and Rancher
Automating the CI / CD pipeline of your containerized applications
Cloud-Native Drupal: a survival guide
Continuous Delivery of Containers with Drone & Kontena
CoreOS and cloud provider integration: simple cloud-init example at Exoscale
Ci/CD platform with drone and gogs
stackconf 2024 | On-Prem is the new Black by AJ Jester
Cloud Native Landscape (CNCF and OCI)
Shipping to Server and Cloud with Docker
AWS Community Day - Amy Negrette - Gateways to Gateways
Containers & Cloud Native Ops Cloud Foundry Approach
Ad

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
DOCX
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Mobile App Security Testing_ A Comprehensive Guide.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A Presentation on Artificial Intelligence
Per capita expenditure prediction using model stacking based on satellite ima...
MYSQL Presentation for SQL database connectivity
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Building Integrated photovoltaic BIPV_UPV.pdf
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
Encapsulation_ Review paper, used for researhc scholars
Advanced methodologies resolving dimensionality complications for autism neur...
The AUB Centre for AI in Media Proposal.docx

Drone CI - Container native continuous Integration / Delivery

  • 1. Drone 13.08.2018 Patrick Jahns Container native continuous Integration / Delivery
  • 2. 2 • Software Engineer • ❤ Clean Code // DevOps // SRE • Solutions Architect at ownCloud patrick_jahns patrickjahns mail@patrickjahns.de
  • 3. 3
  • 5. 5 Drone CI • Open Source (https://github.com/drone) - started in 2014 • Easy to install & maintain (docker pull drone/drone) • Simple YAML Configuration (superset of docker-compose.yml) • Container native CI/CD platform (everything runs within containers) • Isolated builds ( workspace / network ) • Integrates with several VCS Providers ( Github, Gitlab, Bitbucket, Gitea … ) • Rich set of official plugins (any container can be a plugin) • Management via cli / REST Api ( but also has a WebUI ) • Execute locally with “drone exec” • Provides prometheus metrics
  • 7. 7 Drone - Concepts • Pipeline – Steps to be executed • Workspace – Ephemeral – Shared between individual pipeline steps • Services – Containers that are available during the pipeline execution – Yaml key == hostname of service • Conditions – Ability to specify conditions when a pipeline/step will be executed Basic Concepts Examples: https://github.com/patrickjahns/drone-examples
  • 8. 8 Drone - Concepts Groups • Shared workspace • Run on the same Agent Matrix Builds • Completely seperated builds • Can be scheduled on different Agents Parallel builts // Concurrency Examples: https://github.com/patrickjahns/drone-examples
  • 9. 9 Drone - Concepts • Secrets are injected as environment variables • Ability to limit secret per build event ( push / pull-request / tag ) • Ability to limit secrets to specific images/plugins • Secrets can be stored in various backends ( database / “global secrets file”* / vault* ) • For public repositories –> gated builds (changes to .drone.yml need approval ) Secrets *) requires enterprise subscription Examples: https://github.com/patrickjahns/drone-examples
  • 10. 10 Drone - Concepts • Plugins are “just” containers => complete freedom and language agnostic • Large ecosystem of readily available plugins => http://plugins.drone.io/ • Anything missing => easy to build your own plugin – Example from ownCloud Plugins
  • 11. 11 Drone - Concepts • Run your CI pipeline locally • Ability to debug // introspect if anything fails on the remote server • Example: Drone Exec
  • 13. 13 Drone@AWS • Easy Deployment – Instance where drone server runs ( EC2 / ECS / Kubernetes ) – Database Server ( RDS ? ) – Instance(s) where drone Agents run • Various Plugins for direct interaction with AWS services available – Example: AWS Cloudformation, AWS ECR, AWS ECS, AWS Elastic Beanstalk, AWS Lambda more at http://plugins.drone.io/ – Most plugins require secret and access_key => currently not possible to use IAM Profiles
  • 14. 14 Drone@AWS Publishing Container to ECR • plugins/ecr can publish to ECR via a ACCESS_KEY & Secret Using Images from ECR in drone pipeline • Global Registry File *) • Periodic Job Running on Agent Host Instance ( aws ecr get-login --no-include-email ) • Pipeline step with mounted docker-socket that logs into aws ecr and pulls the image *) requires enterprise subscription http://docs.drone.io/setup-global-registry-credentials/#elastic-container-registry-ecr Working with AWS ECR
  • 16. 16 Scaling Drone - Autoscaler • CI/CD volumes are highly dependant on ”daily-business” • Fast feedback cycles are required for developer velocity • CI/CD requires compute power -> easily scaleable with cloud providers
  • 17. 17 Scaling Drone - Autoscaler • Support for AWS, DigitalOcean, Google, HetznerCloud • Planned to support Azure, Packet.net, Scaleway • Simple service connected to Drone server • Hooked into Drone CLI, e.g. “drone server create” • Checks the Drone queue in a loop • Launch servers based on a cloud-init config • Start Drone agent via remote Docker connection (secured by TLS) • Unregister Drone agent if not needed anymore • Destroy server instance after a minimal amount of time • Provides Prometheus metrics
  • 19. 19 Scaling Drone – Autoscaler@AWS • Requirements: – VPC, Subnet, Security Group – EC2 / ECS where autoscaler can be additionally started • Caveats – Agents either need to have a public-ip associate // or a NAT needs to be defined – It is currently limited to On Demand instances – Pull Request for Spot Instances will follow – Currently not yet possible to attach instance roles
  • 20. 20
  • 23. 23 Drone - Outlook • Official support for Arm / Arm64 • Experimental support for windows containers • Support for multi-machine fan-in / fan-out • Support for multi-machine, multi-architecture • Hooks (http/REST) to override default behavior i.e. secrets, registry credentials, approval workflows – Example for AWS – Trigger a Lambda Function to fetch secrets from AWS SecretsManager / ParameterStore RoadMap / Topics for drone 0.9
  • 24. 24 Links Slides & SourceCode • https://github.com/patrickjahns/awsmeetup-20180813-drone • https://github.com/patrickjahns/drone-examples Drone • Drone Github – https://github.com/drone • Drone documentation - http://docs.drone.io/ • Autoscaler - https://github.com/drone/autoscaler • Autoscaler documentation - https://autoscale.drone.io/ • Official Drone plugins - http://plugins.drone.io/ • Drone community - https://discourse.drone.io/