continuous delivery with jenkins & kubernetes @ sky

Post on 15-Apr-2017

173 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Continuous Delivery with Jenkins & Kubernetes @ SkyAdriana Vasiu

Who am I ?

• Principal Software Engineer @ Sky

• Polyglot developer

• Speaker

Agenda

• Building smart deployment pipelines

• Decoupling from infrastructure

• Demo

• Next Steps

The Problem

Requirements & Constraints for the Platform

Requirements &

Constraints

Microservices

Java Apps

Dev Ops Unavailable

Changing infrastructure

Parallel Teams

Python Apps

Step A. Build a Smart Deployment Pipeline

Standardised pipelines

• Easy bootstrap for components

• Automatic creation of jobs and pipelines

• Independent of platform as a service

• Independent of component technology

Pipeline - Path to Production

Tools & Plugins

• Jenkins - version 1.651.2

• Job DSL Plugin - version 1.48

• Custom Groovy DSL jobs generator

• Docker for Jenkins master & slaves

• Kubernetes for deployment of Jenkins master & slaves

• Jenkins Kubernetes Plugin - version 0.7

Building Steps

App implements pipeline step

DSL generates the standard pipeline

App specifies pipeline type

App Config for the Pipeline

projects: service-demo: pipeline: prod monitor-namespaces: - canary - production service-demo-mocks: pipeline: mocks

Example of Groovy DSL for Jenkins

job(’01-Build-service-demo') { scm { git(gitUrl) } triggers { scm('*/15 * * * *') } steps { gradle { tasks(":ciBuild") useWrapper(true)

} }}

Step B. Decouple from your Target Infrastructure

Container Based Deployment

Kubernetes Architecture

Why Kubernetes?

• orchestrates containers

• self-healing: auto-placement, auto-restart, auto-replication, auto-scaling

• portable: public, private, hybrid, multi-cloud

Decoupled Deployments?

Custom Gradle Platform Plugin

Packaging DeploymentPromotionPublishing

Short Summary

Summary

• Pipeline generation • Quality gates - standardised• No more manual changes on CI server• Flexibility for each app to define steps• Works for different technologies (Gradle wrapper)• New apps are easy to bootstrap

• Platform abstraction• Decouples apps from infrastructure

Demo

Next Steps

Future Improvements

• Open Source Jenkins DSL Jobs Generator

• Look into Jenkins 2.+

• Automate Jenkins master re-deployment on a change to the image

Sources

• https://github.com/kubernetes/kubernetes• http://kubernetes.io• https://github.com/jenkinsci/job-dsl-plugin• https://github.com/jenkinsci/kubernetes-plugin

Thank you!@vasiu_adriana

top related