SlideShare a Scribd company logo
1 of 30
Download to read offline
Flying with Drone
CONTINUOUS DELIVERY · BUILT ON DOCKER
Jussi Nummelin, Engineer@Kontena
@JNummelin
Container pipeline
© 2015 Kontena, Inc.
Test
• Run dependencies
• Run tests
Build
• Docker build
• Docker push
Deploy
• Launch new
containers
• Register to LB
• Remove old container
• Remove from LB
Kontena briefly
© 2016 Kontena, Inc.
What is Kontena?
Open Source container platform built to
maximize developer happiness. Works on
any cloud, easy to setup, simple to use.
The Container Platform
All Batteries Included!
Built-In Image Registry
Sometimes projects can not use publicly
hosted container image registries like
DockerHub. Kontena comes with built-in
container image registry providing private and
secure solution.
Built-In VPN Access
All containers are run inside a virtual private
network by default. Nothing is exposed to
Internet unless explicitly defined. With
Kontena’s built-in VPN access developers can
securely access those resources.
Built-In Load Balancer
Kontena comes with built-in load balancer.
Based on Haproxy. It features fully automatic,
zero-downtime operation due to deep
integration with Kontena’s service discovery
and orchestration technology.
Aggregated Stats & Logs
Kontena provides real-time log and statistics
streams containers. The streams may be
grouped and aggregated to produce service
level streams. This allows easy viewing of logs
and statistics for your application CPU,
memory, disk and network usage.
User Management with Audit Trail
All events and actions performed through
Kontena CLI or APIs are logged into audit trail.
Combined with users and access control, the
audit trail support makes Kontena a reliable
and secure solution for any enterprise
deployments.
Built-In Secrets Management
When your application requires access to APIs
or databases, you'll often need to use secrets
such as passwords and access tokens for
authenticating the access. Kontena Vault is a
secure key/value storage that can be used to
manage secrets in Kontena.
“Includes all the sh*t you don’t need to
implement by yourself”
What is Drone?
•Docker based CI/CD platform
•Easy to install & maintain
•Isolated builds (Docker containers)
•Pluggable (Docker containers)
•Integrates to Github / Gitlab and others
•Travis like “just works” feeling
© 2016 Kontena, Inc.
Why should I care?
© 2015 Kontena, Inc.
© 2015 Kontena, Inc.
Agility matters
Why Should I Care?
•Lightweight, low memory footprint
•Single binary, written in Go
•Docker native
•Simple YAML configuration
•Supports any language that can run in Docker
© 2016 Kontena, Inc.
Installation
•Single binary, just execute
•Docker image (preferred way)
•Configuration through environment variables
•0.5 introduced build agents, easy to scale
© 2016 Kontena, Inc.
Installation: The Docker Way
© 2016 Kontena, Inc.
$ docker run -d
-v /var/lib/drone:/var/lib/drone
-v /var/run/docker.sock:/var/run/docker.sock
--env-file /etc/drone/dronerc
--restart=always --publish=80:8000
--detach=true --name=drone
drone/drone:0.4
Installation: The Kontena Way
© 2016 Kontena, Inc.
server:
image: drone/drone:0.5
instances: 1
stateful: true
deploy:
strategy: ha
wait_for_port: 80
ports:
- 8080:80
environment:
- DRONE_DEBUG=true
- DRONE_GITHUB=true
- DRONE_SERVER_ADDR=0.0.0.0:80
- DRONE_OPEN=true
- DATABASE_DRIVER=sqlite3
- DATABASE_CONFIG=/var/lib/drone/drone.sqlite
secrets:
- secret: DRONE_GITHUB_CLIENT_ID
name: DRONE_GITHUB_CLIENT
type: env
....
volumes:
- /var/lib/drone
agent:
image: drone/drone:0.5
stateful: no
instances: 3
depends_on:
- server
environment:
- DRONE_DEBUG=true
- DRONE_SERVER=http://%{project}-server:80
secrets:
- secret: DRONE_SHARED_SECRET
name: DRONE_SECRET
type: env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: agent
Configuration
•Remote driver
• Bitbucket, Github, Gitlab, Gogs
•Database
• SQLite (default), Postgres, MySQL
© 2016 Kontena, Inc.
Concepts – the “.drone.yml”
•Plugins
•Pipeline
•Services
•Matrix
•Secrets
•Constraints
© 2016 Kontena, Inc.
Concepts - Plugins
• Plugin is actually just a Docker image
• Container created and executed part of pipeline
• Exit code determines success/failure
© 2016 Kontena, Inc.
pipeline:
test:
image: ruby:2.3
commands:
- bundle install --path=bundler
- rspec spec/
Concepts – Pipeline
•Arbitrary set of “plugins” to run as the build process
•Success determined by exit code
•Defined in .drone.yml
© 2016 Kontena, Inc.
Concepts -- Services
• Set of services needed in the build process
• Available on the same network namespace as build containers
• Handy for eg. Databases used in testing
© 2016 Kontena, Inc.
Concepts – Matrix
• Build a single commit against many configurations
• Interpolated as variables in yaml parsing
© 2016 Kontena, Inc.
Concepts – Matrix
© 2016 Kontena, Inc.
pipeline:
build:
image: golang:${GO_VERSION}
commands:
- go get
- go build
- go test
services:
database:
image: ${DATABASE}
matrix:
GO_VERSION:
- 1.4
- 1.3
DATABASE:
- mysql:5.5
- mysql:6.5
- mariadb:10.1
Concepts – Secrets
• Keep your secrets out of VCS
• Injected into build containers
• Available in the env
• Available only to specific container in build
• Leak radius
© 2016 Kontena, Inc.
Concepts – Secrets
© 2016 Kontena, Inc.
$ drone secret ls jnummelin/todo-example
DOCKER_USERNAME
Images: plugins/docker
Events: push, tag, deployment
DOCKER_PASSWORD
Images: plugins/docker
Events: push, tag, deployment
DOCKER_EMAIL
Images: plugins/docker
Events: push, tag, deployment
KONTENA_TOKEN
Images: jnummelin/kontena-cli
Events: push, tag, deployment
KONTENA_URL
Images: jnummelin/kontena-cli
Events: push, tag, deployment
KONTENA_GRID
Images: jnummelin/kontena-cli
Events: push, tag, deployment
Concepts – Constraints
• Limit execution of build steps at runtime
• Branches: [master, develop]
• Events: tag, push, pull_request, …
• Platform: [ linux/*, windows/amd64 ]
• “Deploy when pushed to master” type of things
© 2016 Kontena, Inc.
Demo!
git push
webhook
docker push
dockerpull
status
Links
• https://github.com/jnummelin/todo-example
• http://readme.drone.io/0.5/usage/overview/
• https://www.meetup.com/Kontena-NYC/
• https://kontena.io/docs/
© 2015 Kontena, Inc.
$25 Credits for Testing
https://www.packet.net/promo/kontena/
We are hiring!
kontena.io/jobs
Thank You!
www.kontena.io

More Related Content

What's hot

Containerizing Hardware Accelerated Applications
Containerizing Hardware Accelerated ApplicationsContainerizing Hardware Accelerated Applications
Containerizing Hardware Accelerated Applications
Docker, Inc.
 
Why Docker
Why DockerWhy Docker
Why Docker
dotCloud
 

What's hot (20)

DCEU 18: State of the Docker Engine
DCEU 18: State of the Docker EngineDCEU 18: State of the Docker Engine
DCEU 18: State of the Docker Engine
 
Docker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EEDocker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EE
 
DCEU 18: Docker for Windows Containers and Kubernetes
DCEU 18: Docker for Windows Containers and KubernetesDCEU 18: Docker for Windows Containers and Kubernetes
DCEU 18: Docker for Windows Containers and Kubernetes
 
Spring Boot on Kubernetes/OpenShift
Spring Boot on Kubernetes/OpenShiftSpring Boot on Kubernetes/OpenShift
Spring Boot on Kubernetes/OpenShift
 
Dockercon 2018 EU Updates
Dockercon 2018 EU Updates Dockercon 2018 EU Updates
Dockercon 2018 EU Updates
 
A Dive Into Containers and Docker
A Dive Into Containers and DockerA Dive Into Containers and Docker
A Dive Into Containers and Docker
 
Enabling Cloud Native Buildpacks for Windows Containers
Enabling Cloud Native Buildpacks for Windows ContainersEnabling Cloud Native Buildpacks for Windows Containers
Enabling Cloud Native Buildpacks for Windows Containers
 
DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy  DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy
 
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
Automating CICD Pipeline with GitLab and Docker Containers for Java ApplicationsAutomating CICD Pipeline with GitLab and Docker Containers for Java Applications
Automating CICD Pipeline with GitLab and Docker Containers for Java Applications
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
Docker Azure Friday OSS March 2017 - Developing and deploying Java & Linux on...
 
DockerDay2015: Keynote
DockerDay2015: KeynoteDockerDay2015: Keynote
DockerDay2015: Keynote
 
Say Bye to VMware PowerCLI ! Time to "GOVC"
Say Bye to VMware PowerCLI ! Time to "GOVC"Say Bye to VMware PowerCLI ! Time to "GOVC"
Say Bye to VMware PowerCLI ! Time to "GOVC"
 
Practical Design Patterns in Docker Networking
Practical Design Patterns in Docker NetworkingPractical Design Patterns in Docker Networking
Practical Design Patterns in Docker Networking
 
Aws ug dxb 2021 container series iv
Aws ug dxb 2021 container series  ivAws ug dxb 2021 container series  iv
Aws ug dxb 2021 container series iv
 
Docker for any type of workload and any IT Infrastructure
Docker for any type of workload and any IT InfrastructureDocker for any type of workload and any IT Infrastructure
Docker for any type of workload and any IT Infrastructure
 
Containerizing Hardware Accelerated Applications
Containerizing Hardware Accelerated ApplicationsContainerizing Hardware Accelerated Applications
Containerizing Hardware Accelerated Applications
 
Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2
 
Why Docker
Why DockerWhy Docker
Why Docker
 
My Journey to Becoming a Docker Captain
My Journey to Becoming a Docker CaptainMy Journey to Becoming a Docker Captain
My Journey to Becoming a Docker Captain
 

Viewers also liked

Viewers also liked (20)

Drone-Unmanned Aerial Vehicle
Drone-Unmanned Aerial VehicleDrone-Unmanned Aerial Vehicle
Drone-Unmanned Aerial Vehicle
 
Building High Availability Application with Docker
Building High Availability Application with DockerBuilding High Availability Application with Docker
Building High Availability Application with Docker
 
Concepts Lab – Ideations in the Autonomous Vehicle Rider Experience
Concepts Lab – Ideations in the Autonomous Vehicle Rider ExperienceConcepts Lab – Ideations in the Autonomous Vehicle Rider Experience
Concepts Lab – Ideations in the Autonomous Vehicle Rider Experience
 
Killer drones, war on want
Killer drones, war on wantKiller drones, war on want
Killer drones, war on want
 
Caixa Empreender Award 2016| Enterprise it - Connect Robotics (bgi)
Caixa Empreender Award 2016| Enterprise it - Connect Robotics (bgi)Caixa Empreender Award 2016| Enterprise it - Connect Robotics (bgi)
Caixa Empreender Award 2016| Enterprise it - Connect Robotics (bgi)
 
Docker in Production - Stateful Services
Docker in Production - Stateful ServicesDocker in Production - Stateful Services
Docker in Production - Stateful Services
 
Second FindMyDrone.info project presentation (in russian)
Second FindMyDrone.info project presentation (in russian)Second FindMyDrone.info project presentation (in russian)
Second FindMyDrone.info project presentation (in russian)
 
конкурс разработок учащихся для бпла
конкурс разработок учащихся для бплаконкурс разработок учащихся для бпла
конкурс разработок учащихся для бпла
 
CopterExpress презентацияна RIW2014
CopterExpress презентацияна RIW2014CopterExpress презентацияна RIW2014
CopterExpress презентацияна RIW2014
 
OpenStack by the Numbers
OpenStack by the NumbersOpenStack by the Numbers
OpenStack by the Numbers
 
Drone Delivery in India and future
Drone Delivery in India and futureDrone Delivery in India and future
Drone Delivery in India and future
 
Drone your Ansible
Drone your AnsibleDrone your Ansible
Drone your Ansible
 
Новая отрасль: Гражданские дроны
Новая отрасль: Гражданские дроныНовая отрасль: Гражданские дроны
Новая отрасль: Гражданские дроны
 
Drone unmanned vehicle
Drone unmanned vehicleDrone unmanned vehicle
Drone unmanned vehicle
 
Drone for news gathering
Drone for news gatheringDrone for news gathering
Drone for news gathering
 
OpenStack at EBSCO
OpenStack at EBSCOOpenStack at EBSCO
OpenStack at EBSCO
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
 
Automating the CI / CD pipeline of your containerized applications
Automating the CI / CD pipeline of your containerized applicationsAutomating the CI / CD pipeline of your containerized applications
Automating the CI / CD pipeline of your containerized applications
 
Unmanned aerial vehicle
Unmanned aerial vehicleUnmanned aerial vehicle
Unmanned aerial vehicle
 
Anytime Fitness Strategy
Anytime Fitness StrategyAnytime Fitness Strategy
Anytime Fitness Strategy
 

Similar to Continuous Delivery of Containers with Drone & Kontena

Similar to Continuous Delivery of Containers with Drone & Kontena (20)

WordPressCafe - Deploying WordPress using Kontena
WordPressCafe - Deploying WordPress using KontenaWordPressCafe - Deploying WordPress using Kontena
WordPressCafe - Deploying WordPress using Kontena
 
The Developer Friendly Container & Micro Services Platform
The Developer Friendly Container & Micro Services PlatformThe Developer Friendly Container & Micro Services Platform
The Developer Friendly Container & Micro Services Platform
 
Running Dockerized services across several cloud providers
Running Dockerized services across several cloud providersRunning Dockerized services across several cloud providers
Running Dockerized services across several cloud providers
 
NYC Identity Summit Tech Day: ForgeRock DevOps/Cloud Strategy
NYC Identity Summit Tech Day: ForgeRock DevOps/Cloud StrategyNYC Identity Summit Tech Day: ForgeRock DevOps/Cloud Strategy
NYC Identity Summit Tech Day: ForgeRock DevOps/Cloud Strategy
 
Running and Scaling Symfony app in container(s)
Running and Scaling Symfony app in container(s)Running and Scaling Symfony app in container(s)
Running and Scaling Symfony app in container(s)
 
Meetup devops
Meetup devopsMeetup devops
Meetup devops
 
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep DiveDocker and Microsoft - Windows Server 2016 Technical Deep Dive
Docker and Microsoft - Windows Server 2016 Technical Deep Dive
 
CoreOS Battle Stories
CoreOS Battle StoriesCoreOS Battle Stories
CoreOS Battle Stories
 
Beginners Guide To Kontena
Beginners Guide To KontenaBeginners Guide To Kontena
Beginners Guide To Kontena
 
Beginners Guide to Kontena
Beginners Guide to KontenaBeginners Guide to Kontena
Beginners Guide to Kontena
 
CI/CD with AWS Code Services
CI/CD with AWS Code ServicesCI/CD with AWS Code Services
CI/CD with AWS Code Services
 
DevOps Unleashed: Strategies that Speed Deployments
DevOps Unleashed: Strategies that Speed DeploymentsDevOps Unleashed: Strategies that Speed Deployments
DevOps Unleashed: Strategies that Speed Deployments
 
Cicd.pdf
Cicd.pdfCicd.pdf
Cicd.pdf
 
Dockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best PracticesDockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best Practices
 
Pipelining DevOps with Jenkins and AWS
Pipelining DevOps with Jenkins and AWSPipelining DevOps with Jenkins and AWS
Pipelining DevOps with Jenkins and AWS
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
A curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & KubernetesA curtain-raiser to the container world Docker & Kubernetes
A curtain-raiser to the container world Docker & Kubernetes
 
Cloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment WorkshopCloud Foundry: Hands-on Deployment Workshop
Cloud Foundry: Hands-on Deployment Workshop
 
Cloud foundry Docker Openstack - Leading Open Source Triumvirate
Cloud foundry Docker Openstack - Leading Open Source TriumvirateCloud foundry Docker Openstack - Leading Open Source Triumvirate
Cloud foundry Docker Openstack - Leading Open Source Triumvirate
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

Continuous Delivery of Containers with Drone & Kontena

  • 1. Flying with Drone CONTINUOUS DELIVERY · BUILT ON DOCKER Jussi Nummelin, Engineer@Kontena @JNummelin
  • 2. Container pipeline © 2015 Kontena, Inc. Test • Run dependencies • Run tests Build • Docker build • Docker push Deploy • Launch new containers • Register to LB • Remove old container • Remove from LB
  • 4. © 2016 Kontena, Inc. What is Kontena? Open Source container platform built to maximize developer happiness. Works on any cloud, easy to setup, simple to use.
  • 6. All Batteries Included! Built-In Image Registry Sometimes projects can not use publicly hosted container image registries like DockerHub. Kontena comes with built-in container image registry providing private and secure solution. Built-In VPN Access All containers are run inside a virtual private network by default. Nothing is exposed to Internet unless explicitly defined. With Kontena’s built-in VPN access developers can securely access those resources. Built-In Load Balancer Kontena comes with built-in load balancer. Based on Haproxy. It features fully automatic, zero-downtime operation due to deep integration with Kontena’s service discovery and orchestration technology. Aggregated Stats & Logs Kontena provides real-time log and statistics streams containers. The streams may be grouped and aggregated to produce service level streams. This allows easy viewing of logs and statistics for your application CPU, memory, disk and network usage. User Management with Audit Trail All events and actions performed through Kontena CLI or APIs are logged into audit trail. Combined with users and access control, the audit trail support makes Kontena a reliable and secure solution for any enterprise deployments. Built-In Secrets Management When your application requires access to APIs or databases, you'll often need to use secrets such as passwords and access tokens for authenticating the access. Kontena Vault is a secure key/value storage that can be used to manage secrets in Kontena.
  • 7. “Includes all the sh*t you don’t need to implement by yourself”
  • 8. What is Drone? •Docker based CI/CD platform •Easy to install & maintain •Isolated builds (Docker containers) •Pluggable (Docker containers) •Integrates to Github / Gitlab and others •Travis like “just works” feeling © 2016 Kontena, Inc.
  • 9. Why should I care? © 2015 Kontena, Inc.
  • 10. © 2015 Kontena, Inc. Agility matters
  • 11. Why Should I Care? •Lightweight, low memory footprint •Single binary, written in Go •Docker native •Simple YAML configuration •Supports any language that can run in Docker © 2016 Kontena, Inc.
  • 12. Installation •Single binary, just execute •Docker image (preferred way) •Configuration through environment variables •0.5 introduced build agents, easy to scale © 2016 Kontena, Inc.
  • 13. Installation: The Docker Way © 2016 Kontena, Inc. $ docker run -d -v /var/lib/drone:/var/lib/drone -v /var/run/docker.sock:/var/run/docker.sock --env-file /etc/drone/dronerc --restart=always --publish=80:8000 --detach=true --name=drone drone/drone:0.4
  • 14. Installation: The Kontena Way © 2016 Kontena, Inc. server: image: drone/drone:0.5 instances: 1 stateful: true deploy: strategy: ha wait_for_port: 80 ports: - 8080:80 environment: - DRONE_DEBUG=true - DRONE_GITHUB=true - DRONE_SERVER_ADDR=0.0.0.0:80 - DRONE_OPEN=true - DATABASE_DRIVER=sqlite3 - DATABASE_CONFIG=/var/lib/drone/drone.sqlite secrets: - secret: DRONE_GITHUB_CLIENT_ID name: DRONE_GITHUB_CLIENT type: env .... volumes: - /var/lib/drone agent: image: drone/drone:0.5 stateful: no instances: 3 depends_on: - server environment: - DRONE_DEBUG=true - DRONE_SERVER=http://%{project}-server:80 secrets: - secret: DRONE_SHARED_SECRET name: DRONE_SECRET type: env volumes: - /var/run/docker.sock:/var/run/docker.sock command: agent
  • 15. Configuration •Remote driver • Bitbucket, Github, Gitlab, Gogs •Database • SQLite (default), Postgres, MySQL © 2016 Kontena, Inc.
  • 16. Concepts – the “.drone.yml” •Plugins •Pipeline •Services •Matrix •Secrets •Constraints © 2016 Kontena, Inc.
  • 17. Concepts - Plugins • Plugin is actually just a Docker image • Container created and executed part of pipeline • Exit code determines success/failure © 2016 Kontena, Inc. pipeline: test: image: ruby:2.3 commands: - bundle install --path=bundler - rspec spec/
  • 18. Concepts – Pipeline •Arbitrary set of “plugins” to run as the build process •Success determined by exit code •Defined in .drone.yml © 2016 Kontena, Inc.
  • 19. Concepts -- Services • Set of services needed in the build process • Available on the same network namespace as build containers • Handy for eg. Databases used in testing © 2016 Kontena, Inc.
  • 20. Concepts – Matrix • Build a single commit against many configurations • Interpolated as variables in yaml parsing © 2016 Kontena, Inc.
  • 21. Concepts – Matrix © 2016 Kontena, Inc. pipeline: build: image: golang:${GO_VERSION} commands: - go get - go build - go test services: database: image: ${DATABASE} matrix: GO_VERSION: - 1.4 - 1.3 DATABASE: - mysql:5.5 - mysql:6.5 - mariadb:10.1
  • 22. Concepts – Secrets • Keep your secrets out of VCS • Injected into build containers • Available in the env • Available only to specific container in build • Leak radius © 2016 Kontena, Inc.
  • 23. Concepts – Secrets © 2016 Kontena, Inc. $ drone secret ls jnummelin/todo-example DOCKER_USERNAME Images: plugins/docker Events: push, tag, deployment DOCKER_PASSWORD Images: plugins/docker Events: push, tag, deployment DOCKER_EMAIL Images: plugins/docker Events: push, tag, deployment KONTENA_TOKEN Images: jnummelin/kontena-cli Events: push, tag, deployment KONTENA_URL Images: jnummelin/kontena-cli Events: push, tag, deployment KONTENA_GRID Images: jnummelin/kontena-cli Events: push, tag, deployment
  • 24. Concepts – Constraints • Limit execution of build steps at runtime • Branches: [master, develop] • Events: tag, push, pull_request, … • Platform: [ linux/*, windows/amd64 ] • “Deploy when pushed to master” type of things © 2016 Kontena, Inc.
  • 25. Demo!
  • 27. Links • https://github.com/jnummelin/todo-example • http://readme.drone.io/0.5/usage/overview/ • https://www.meetup.com/Kontena-NYC/ • https://kontena.io/docs/ © 2015 Kontena, Inc.
  • 28. $25 Credits for Testing https://www.packet.net/promo/kontena/