SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
Continuous Delivery with Netflix OSS 
Dan Woods
/danveloper 
Senior Software Engineer: 
Delivery Engineering 
danielpwoods@gmail.com 
Learning Ratpack
Overview of Netflix OSS 
• Netflix encourages talking to the world about how we’re 
solving problems 
! 
• We solve a ton of problems that companies both small 
and large are faced with 
! 
• Shoot to open source as much as possible
Overview of Netflix OSS 
• Netflix is a large consumer of cloud offerings — mostly 
from AWS 
! 
• We’ve done a ton of work over the years to lift the 
infrastructure entirely to the cloud 
! 
• Pioneered running at scale on Amazon AWS
Overview of Netflix OSS 
• Developed a massive tool suite to operationalize running 
in the cloud at scale 
! 
• Teams need to be able to quickly get code running in the 
cloud 
! 
• Teams needs to quickly be able to see metrics and 
performance
Overview of Netflix OSS 
Links: 
! 
http://techblog.netflix.com/ 
! 
http://github.com/netflix 
! 
http://netflix.github.io
Continuous Delivery 
Big Picture:! 
! 
What Does Continuous Delivery Mean At Netflix?
Continuous Delivery 
Big Picture:! 
! 
• Immutable Infrastructure 
! 
• Tooling the Build System 
! 
• Ongoing and Continuous Deployment
Immutable Infrastructure 
• Designing a server to become your unit of deployment 
! 
• “Bake” the software into a “pre-cooked” (known-good 
configuration) image 
! 
• Allows you to test and certify a server image for 
distribution 
! 
• Walk that server through the phases of test, qa, and 
finally to prod
Immutable Infrastructure 
• Builds must be designed in a way that produces an os-package 
! 
• This allows the build to control the manner in which the 
server image will be created 
! 
• Specify OS-level dependencies (Java, Python, etc) 
! 
• Get all the benefits of a version controlled configuration
Tooling the Build System 
• Hundreds, sometimes thousand, of builds that run every 
day at Netflix 
! 
• Builds need to fit into a somewhat conferment structure to 
garner the support of the tooling 
! 
• A polyglot stack adds a ton of complexity to designing 
the tooling for the build system 
! 
• Teams are free to use whatever language or framework or 
stack that they want, and we need to do our best to have 
a handle on the permutations
Tooling the Build System 
• The JVM is the predominant code platform at Netflix 
! 
• Many different languages on the JVM, including: 
JavaScript, Scala, Groovy, Clojure, Ruby, Python 
! 
• The “runner up” runtime is NodeJS 
! 
• Lots of new JavaScript stuff starting to come out, starting 
to design scalable tooling around JS
Tooling the Build System 
• Netflix has adopted Gradle as its build platform 
! 
• Gradle is a JVM-based build system that is capable of 
building JVM and non-JVM projects 
! 
• Support for dynamically and programmatically designing 
builds (loads of flexibility) 
! 
• Great open source community, tons of support from 
Gradlware
Tooling the Build System 
• Can build plugins for Gradle in Groovy (ahh soo nice :-)) 
! 
• Plugins are designed to make it appealing for teams to 
conform to the tooling infrastructure 
! 
• Custom internal Gradle wrapper applies common 
conventions and applies hacks that would be 
unmanageable at scale 
! 
• The goal of all this is to make teams want to use the build 
tooling, so that we can operationalize and manage it for 
scale
Continuous Deployment 
• Continuous Delivery at Netflix speaks to more than just 
staging code for deployment 
! 
• The Continuous Delivery story is a follow through, from 
source to production 
! 
• Continuous Deployment is an integral part of that process 
(it means the code running in the cloud!) 
! 
• Hands down this is the trickiest and most-fragile part of 
the whole process…
Continuous Deployment 
• By this point in the workflow, the code has already been 
built and baked… 
! 
• We have an immutable server image, and we’re ready to 
ship it off to the cloud… 
! 
• The complexity is here: “ship it off to the cloud” is an 
inherently asynchronous process… 
! 
• There are many failure points.!
Continuous Deployment 
What constitutes a successful deployment? 
! 
• Every application has a different definition of “success” 
! 
• Need to provide tooling so that the process is able to 
identify the vectors of success 
!
Continuous Deployment 
What constitutes a successful deployment? 
! 
• Amazon telling us the server has deployed is basically 
the equivalent of them saying they pressed the power 
button 
! 
• Need to consider a successful deployment in terms of 
“this server is ready to start taking traffic” 
! 
!
Continuous Deployment 
What constitutes a successful deployment? 
! 
• “Ready to start taking traffic” means different things to 
different applications: 
! 
• Tomcat has started, and the app is listening? 
! 
• Tomcat has started, app is listening, caches are 
primed? 
! 
• Tomcat has started, app is listening, and the server 
group is in some designated traffic pool (canary)? 
! 
! 
!
Continuous Deployment 
• Service discovery becomes a very big part of 
understanding the health of an app 
! 
• Gives the app the responsibility to inform the tool as to its 
traffic-taking-readiness 
! 
• It would be difficult for the tool to reach out to every 
instance to ask it for its health, better to have the instance 
tell us 
! 
• The tooling now only need to query two places: Amazon 
and the Service Registry
Continuous Deployment 
• Teams can choose if “Discovery” health should be 
incorporated into their continuous deployment workflow 
! 
• This may not be necessary; for strictly IPC stack apps, it’s 
ok for them to be “up” and to let the IPC client (Ribbon) 
determine to which instance traffic is routed
Continuous Deployment 
What do we do after success?! 
! 
• Once the new version of code is deployed, now what? 
! 
• Netflix lumps packages of software into a “cluster”, within 
which different versions may run 
! 
• For rapid rollback, we need to keep the ancestor server 
group around, but take it out of traffic rotation
Continuous Deployment 
What do we do after success?! 
! 
• Put the ancestral server group into a “disabled” state 
! 
• Inform the service registry that the instances within this 
group are no longer accepting traffic 
! 
• Most consuming apps will use the service registry to find 
their endpoint, so this is sufficient 
! 
• For those that use DNS and go through a load balancer, 
we remove the instances from associated load balancers 
as well
Continuous Deployment 
Why not just update the existing config and roll the 
servers (rolling push)?! 
! 
• Rolling push is a bad, bad thing 
! 
• While new instances are launching against a new image, 
ancestral instances still exist 
! 
• Can leave the server group in a half-done state, which 
can yield very weird results 
! 
• Tooling is built around the server group being the 
management target
Continuous Deployment 
Incubating Deployment Strategies…! 
! 
• Phased canary 
• 25%, 50%, 75%, 100% 
! 
• Global push 
• Deployment windows to different regions 
! 
• Highlander 
• Don’t keep the ancestor server group around 
• This is good for test environments that don’t need 
rollback
Continuous Deployment 
Continuous Delivery Tooling! 
! 
• Many CD tools are available today from NetflixOSS! 
! 
• The puzzle pieces are there for the entire problem 
domain 
! 
• Tooling for build system packaging, baking immutable 
infrastructure, service discovery, continuous deployment, 
and cluster management
Build System Tooling 
Nebula Gradle Plugins! 
! 
• Nebula (like, “space clouds”) is a collection of Gradle 
plugins to assist in the continuous delivery workflow 
! 
• Often two parts: Nebula and Gradle — The “Gradle” part 
is just a Gradle plugin, and you’re on your own to 
configure it; the “Nebula” part is an opinionated veneer 
! 
• Tons of great plugins, extensive documentation, many, 
many, many available videos and presentations on 
Nebula
Build System Tooling 
Nebula OS Package Plugins! 
! 
• The Gradle Side 
• Provides mechanism for producing Debian and RPM artifacts 
• Very straight-forward integration that uses Gradle’s well-known 
CopySpec for getting files into an OS structure 
• Nice DSL for describing OS-level dependencies 
! 
• The Nebula Side 
• Derives configuration in a “best fit” kind of way 
• Provides integration with Gradle’s application plugin to package a 
runnable distribution into an OS artifact 
• Provides ability to produce an OS daemon for your service 
! 
https://github.com/nebula-plugins/nebula-ospackage-plugin
Build System Tooling
The Bakery 
Baking a Server Image! 
! 
• Aminator 
• Provides easy creation of package-specific AMIs 
• Attaches a “Base Image” volume, installs your software package 
• Takes a snapshot of the volume, resulting in an AMI 
• This AMI is the immutable infrastructure 
• AMI will act as our unit of deployment going forward 
! 
! 
https://github.com/netflix/aminator
Service Discovery 
Service Registry for Apps! 
! 
• Eureka 
• Applications can register their own health 
! 
• Integrates tightly with Ribbon to provide inter-app service discovery, 
load balancing, and fault tolerance 
! 
• Able to be leveraged during the continuous deployment process to 
inform as to successful deployments 
! 
! 
https://github.com/netflix/eureka 
https://github.com/netflix/ribbon
Continuous Deployment and Cluster Management 
Managing Deployments! 
! 
• Asgard 
• Provides a UI for managing AWS cloud resources 
• RESTful API for consumers to be able to script against 
• Decorates AWS with concepts that are relevant to Netflix’s continuous 
delivery infrastructure 
• This includes the concept of applications and clusters, which is 
something that AWS does not have 
• Standalone, runnable JAR or WAR deployment options 
! 
! 
https://github.com/netflix/asgard
Continuous Deployment and Cluster Management
Some Harsh Realities… 
• All of this stuff is difficult to get up-and-running 
! 
• Every tool makes assumptions about account structure, 
available resources, naming conventions, etc 
! 
• Non-native concepts, like applications and clusters, are 
difficult to understand from an outsider’s perspective 
! 
• Cost-to-benefit may be low if you’re not adopting the 
entire stack
Getting better… 
• Many initiatives underway currently to engage the open 
source community more directly 
! 
• The goal is to make the barrier for entry very low on 
getting up-and-running with NetflixOSS 
! 
• Andrew Spyker (@aspyker) is leading the charge for 
making NetflixOSS plug-and-play… 
! 
• Although, not very much (right now) speaks directly to 
gluing tools together for continuous delivery
Some Resources 
• Zero to Cloud: 
• http://www.oscon.com/oscon2014/public/schedule/detail/34252 
• Walks you through a document that shows how to setup your AWS 
account 
• Shows you how to leverage CloudFormation to configure a NetflixOSS 
runtime 
! 
• Zero to Docker: 
• http://techblog.netflix.com/2014/11/zerotodocker-easy-way-to-evaluate. 
html 
• Pre-built Docker images for NetflixOSS components 
• Provides a quick way to get up-and-running 
• Not for production use; not in-use at Netflix
Trying to make this easy on you… 
Introducing the Zero to Cloud Gradle Plugin! 
! 
https://github.com/Netflix-Skunkworks/zerotocloud-gradle 
! 
• “Netflix Skunkworks”, so not officially NetflixOSS at this 
point 
! 
• A single command can initialize a continuous delivery 
infrastructure built on NetflixOSS technologies 
! 
• Plugin can be utilizes by builds to be the “glue” between 
the OS packaging, the Bakery, and Asgard

Más contenido relacionado

La actualidad más candente

Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
Markus Eisele
 

La actualidad más candente (20)

Container Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher KubernetesContainer Conf 2017: Rancher Kubernetes
Container Conf 2017: Rancher Kubernetes
 
Alibaba Cloud Conference 2016 - Docker Enterprise
Alibaba Cloud Conference   2016 - Docker EnterpriseAlibaba Cloud Conference   2016 - Docker Enterprise
Alibaba Cloud Conference 2016 - Docker Enterprise
 
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
Developing Enterprise Applications for the Cloud,from Monolith to MicroservicesDeveloping Enterprise Applications for the Cloud,from Monolith to Microservices
Developing Enterprise Applications for the Cloud, from Monolith to Microservices
 
SOA to Microservices
SOA to MicroservicesSOA to Microservices
SOA to Microservices
 
JavaOne Latin America - DevOps with Containers for Java
JavaOne Latin America - DevOps with Containers for JavaJavaOne Latin America - DevOps with Containers for Java
JavaOne Latin America - DevOps with Containers for Java
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)micro services architecture (FrosCon2014)
micro services architecture (FrosCon2014)
 
Integrating Microservices with Apache Camel
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache Camel
 
Designing distributed, scalable and reliable systems using NServiceBus
Designing distributed, scalable and reliable systems using NServiceBusDesigning distributed, scalable and reliable systems using NServiceBus
Designing distributed, scalable and reliable systems using NServiceBus
 
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
DevOps with ActiveMQ, Camel, Fabric8, and HawtIO
 
Microservices deck
Microservices deckMicroservices deck
Microservices deck
 
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShiftReal-world #microservices with Apache Camel, Fabric8, and OpenShift
Real-world #microservices with Apache Camel, Fabric8, and OpenShift
 
Docker 101
Docker 101Docker 101
Docker 101
 
Micro service architecture
Micro service architecture  Micro service architecture
Micro service architecture
 
DevNexus 2015
DevNexus 2015DevNexus 2015
DevNexus 2015
 
NetflixOSS for Triangle Devops Oct 2013
NetflixOSS for Triangle Devops Oct 2013NetflixOSS for Triangle Devops Oct 2013
NetflixOSS for Triangle Devops Oct 2013
 
Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at Scale
 
Microservices with Apache Camel, Docker and Fabric8 v2
Microservices with Apache Camel, Docker and Fabric8 v2Microservices with Apache Camel, Docker and Fabric8 v2
Microservices with Apache Camel, Docker and Fabric8 v2
 
Alfresco DevCon 2019 Performance Tools of the Trade
Alfresco DevCon 2019   Performance Tools of the TradeAlfresco DevCon 2019   Performance Tools of the Trade
Alfresco DevCon 2019 Performance Tools of the Trade
 
Integrating Alfresco @ Scale (via event-driven micro-services)
Integrating Alfresco @ Scale (via event-driven micro-services)Integrating Alfresco @ Scale (via event-driven micro-services)
Integrating Alfresco @ Scale (via event-driven micro-services)
 

Similar a Continuous Delivery with NetflixOSS

Similar a Continuous Delivery with NetflixOSS (20)

Facilitating Continuous Delivery at Scale
Facilitating Continuous Delivery at ScaleFacilitating Continuous Delivery at Scale
Facilitating Continuous Delivery at Scale
 
Infrastructure as Code - Getting Started, Concepts & Tools
Infrastructure as Code - Getting Started, Concepts & ToolsInfrastructure as Code - Getting Started, Concepts & Tools
Infrastructure as Code - Getting Started, Concepts & Tools
 
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as CodeConfoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
Confoo-Montreal-2016: Controlling Your Environments using Infrastructure as Code
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Devops
DevopsDevops
Devops
 
Getting to Walk with DevOps
Getting to Walk with DevOpsGetting to Walk with DevOps
Getting to Walk with DevOps
 
Enabling your DevOps culture with AWS-webinar
Enabling your DevOps culture with AWS-webinarEnabling your DevOps culture with AWS-webinar
Enabling your DevOps culture with AWS-webinar
 
Immutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App DeploymentImmutable Infrastructure: the new App Deployment
Immutable Infrastructure: the new App Deployment
 
Top 10 dev ops tools (1)
Top 10 dev ops tools (1)Top 10 dev ops tools (1)
Top 10 dev ops tools (1)
 
Serverless On Stage - Serverless URL Shortener
Serverless On Stage - Serverless URL ShortenerServerless On Stage - Serverless URL Shortener
Serverless On Stage - Serverless URL Shortener
 
Coding Secure Infrastructure in the Cloud using the PIE framework
Coding Secure Infrastructure in the Cloud using the PIE frameworkCoding Secure Infrastructure in the Cloud using the PIE framework
Coding Secure Infrastructure in the Cloud using the PIE framework
 
JustLetMeCode-Final
JustLetMeCode-FinalJustLetMeCode-Final
JustLetMeCode-Final
 
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
Continuos Integration and Delivery: from Zero to Hero with TeamCity, Docker a...
 
What we talk about when we talk about DevOps
What we talk about when we talk about DevOpsWhat we talk about when we talk about DevOps
What we talk about when we talk about DevOps
 
Immutable Infrastructure: Rise of the Machine Images
Immutable Infrastructure: Rise of the Machine ImagesImmutable Infrastructure: Rise of the Machine Images
Immutable Infrastructure: Rise of the Machine Images
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production Parity
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
The Rocky Cloud Road
The Rocky Cloud RoadThe Rocky Cloud Road
The Rocky Cloud Road
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
 

Más de Daniel Woods

Más de Daniel Woods (12)

Continuous Delivery with Spinnaker and OpenStack
Continuous Delivery with Spinnaker and OpenStackContinuous Delivery with Spinnaker and OpenStack
Continuous Delivery with Spinnaker and OpenStack
 
High Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring BootHigh Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring Boot
 
Groovy in the Cloud
Groovy in the CloudGroovy in the Cloud
Groovy in the Cloud
 
Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015Ratpack - SpringOne2GX 2015
Ratpack - SpringOne2GX 2015
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
Ratpack Web Framework
Ratpack Web FrameworkRatpack Web Framework
Ratpack Web Framework
 
Server-Side JavaScript with Nashorn
Server-Side JavaScript with NashornServer-Side JavaScript with Nashorn
Server-Side JavaScript with Nashorn
 
Future of Grails
Future of GrailsFuture of Grails
Future of Grails
 
Groovy for System Administrators
Groovy for System AdministratorsGroovy for System Administrators
Groovy for System Administrators
 
Message Driven Architecture in Grails
Message Driven Architecture in GrailsMessage Driven Architecture in Grails
Message Driven Architecture in Grails
 
Building Web Apps in Ratpack
Building Web Apps in RatpackBuilding Web Apps in Ratpack
Building Web Apps in Ratpack
 
Gainesville Web Developer Group, Sept 2012
Gainesville Web Developer Group, Sept 2012Gainesville Web Developer Group, Sept 2012
Gainesville Web Developer Group, Sept 2012
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

Continuous Delivery with NetflixOSS

  • 1. Continuous Delivery with Netflix OSS Dan Woods
  • 2. /danveloper Senior Software Engineer: Delivery Engineering danielpwoods@gmail.com Learning Ratpack
  • 3. Overview of Netflix OSS • Netflix encourages talking to the world about how we’re solving problems ! • We solve a ton of problems that companies both small and large are faced with ! • Shoot to open source as much as possible
  • 4. Overview of Netflix OSS • Netflix is a large consumer of cloud offerings — mostly from AWS ! • We’ve done a ton of work over the years to lift the infrastructure entirely to the cloud ! • Pioneered running at scale on Amazon AWS
  • 5. Overview of Netflix OSS • Developed a massive tool suite to operationalize running in the cloud at scale ! • Teams need to be able to quickly get code running in the cloud ! • Teams needs to quickly be able to see metrics and performance
  • 6. Overview of Netflix OSS Links: ! http://techblog.netflix.com/ ! http://github.com/netflix ! http://netflix.github.io
  • 7. Continuous Delivery Big Picture:! ! What Does Continuous Delivery Mean At Netflix?
  • 8. Continuous Delivery Big Picture:! ! • Immutable Infrastructure ! • Tooling the Build System ! • Ongoing and Continuous Deployment
  • 9. Immutable Infrastructure • Designing a server to become your unit of deployment ! • “Bake” the software into a “pre-cooked” (known-good configuration) image ! • Allows you to test and certify a server image for distribution ! • Walk that server through the phases of test, qa, and finally to prod
  • 10. Immutable Infrastructure • Builds must be designed in a way that produces an os-package ! • This allows the build to control the manner in which the server image will be created ! • Specify OS-level dependencies (Java, Python, etc) ! • Get all the benefits of a version controlled configuration
  • 11. Tooling the Build System • Hundreds, sometimes thousand, of builds that run every day at Netflix ! • Builds need to fit into a somewhat conferment structure to garner the support of the tooling ! • A polyglot stack adds a ton of complexity to designing the tooling for the build system ! • Teams are free to use whatever language or framework or stack that they want, and we need to do our best to have a handle on the permutations
  • 12. Tooling the Build System • The JVM is the predominant code platform at Netflix ! • Many different languages on the JVM, including: JavaScript, Scala, Groovy, Clojure, Ruby, Python ! • The “runner up” runtime is NodeJS ! • Lots of new JavaScript stuff starting to come out, starting to design scalable tooling around JS
  • 13. Tooling the Build System • Netflix has adopted Gradle as its build platform ! • Gradle is a JVM-based build system that is capable of building JVM and non-JVM projects ! • Support for dynamically and programmatically designing builds (loads of flexibility) ! • Great open source community, tons of support from Gradlware
  • 14. Tooling the Build System • Can build plugins for Gradle in Groovy (ahh soo nice :-)) ! • Plugins are designed to make it appealing for teams to conform to the tooling infrastructure ! • Custom internal Gradle wrapper applies common conventions and applies hacks that would be unmanageable at scale ! • The goal of all this is to make teams want to use the build tooling, so that we can operationalize and manage it for scale
  • 15. Continuous Deployment • Continuous Delivery at Netflix speaks to more than just staging code for deployment ! • The Continuous Delivery story is a follow through, from source to production ! • Continuous Deployment is an integral part of that process (it means the code running in the cloud!) ! • Hands down this is the trickiest and most-fragile part of the whole process…
  • 16. Continuous Deployment • By this point in the workflow, the code has already been built and baked… ! • We have an immutable server image, and we’re ready to ship it off to the cloud… ! • The complexity is here: “ship it off to the cloud” is an inherently asynchronous process… ! • There are many failure points.!
  • 17. Continuous Deployment What constitutes a successful deployment? ! • Every application has a different definition of “success” ! • Need to provide tooling so that the process is able to identify the vectors of success !
  • 18. Continuous Deployment What constitutes a successful deployment? ! • Amazon telling us the server has deployed is basically the equivalent of them saying they pressed the power button ! • Need to consider a successful deployment in terms of “this server is ready to start taking traffic” ! !
  • 19. Continuous Deployment What constitutes a successful deployment? ! • “Ready to start taking traffic” means different things to different applications: ! • Tomcat has started, and the app is listening? ! • Tomcat has started, app is listening, caches are primed? ! • Tomcat has started, app is listening, and the server group is in some designated traffic pool (canary)? ! ! !
  • 20. Continuous Deployment • Service discovery becomes a very big part of understanding the health of an app ! • Gives the app the responsibility to inform the tool as to its traffic-taking-readiness ! • It would be difficult for the tool to reach out to every instance to ask it for its health, better to have the instance tell us ! • The tooling now only need to query two places: Amazon and the Service Registry
  • 21. Continuous Deployment • Teams can choose if “Discovery” health should be incorporated into their continuous deployment workflow ! • This may not be necessary; for strictly IPC stack apps, it’s ok for them to be “up” and to let the IPC client (Ribbon) determine to which instance traffic is routed
  • 22. Continuous Deployment What do we do after success?! ! • Once the new version of code is deployed, now what? ! • Netflix lumps packages of software into a “cluster”, within which different versions may run ! • For rapid rollback, we need to keep the ancestor server group around, but take it out of traffic rotation
  • 23. Continuous Deployment What do we do after success?! ! • Put the ancestral server group into a “disabled” state ! • Inform the service registry that the instances within this group are no longer accepting traffic ! • Most consuming apps will use the service registry to find their endpoint, so this is sufficient ! • For those that use DNS and go through a load balancer, we remove the instances from associated load balancers as well
  • 24. Continuous Deployment Why not just update the existing config and roll the servers (rolling push)?! ! • Rolling push is a bad, bad thing ! • While new instances are launching against a new image, ancestral instances still exist ! • Can leave the server group in a half-done state, which can yield very weird results ! • Tooling is built around the server group being the management target
  • 25. Continuous Deployment Incubating Deployment Strategies…! ! • Phased canary • 25%, 50%, 75%, 100% ! • Global push • Deployment windows to different regions ! • Highlander • Don’t keep the ancestor server group around • This is good for test environments that don’t need rollback
  • 26. Continuous Deployment Continuous Delivery Tooling! ! • Many CD tools are available today from NetflixOSS! ! • The puzzle pieces are there for the entire problem domain ! • Tooling for build system packaging, baking immutable infrastructure, service discovery, continuous deployment, and cluster management
  • 27. Build System Tooling Nebula Gradle Plugins! ! • Nebula (like, “space clouds”) is a collection of Gradle plugins to assist in the continuous delivery workflow ! • Often two parts: Nebula and Gradle — The “Gradle” part is just a Gradle plugin, and you’re on your own to configure it; the “Nebula” part is an opinionated veneer ! • Tons of great plugins, extensive documentation, many, many, many available videos and presentations on Nebula
  • 28. Build System Tooling Nebula OS Package Plugins! ! • The Gradle Side • Provides mechanism for producing Debian and RPM artifacts • Very straight-forward integration that uses Gradle’s well-known CopySpec for getting files into an OS structure • Nice DSL for describing OS-level dependencies ! • The Nebula Side • Derives configuration in a “best fit” kind of way • Provides integration with Gradle’s application plugin to package a runnable distribution into an OS artifact • Provides ability to produce an OS daemon for your service ! https://github.com/nebula-plugins/nebula-ospackage-plugin
  • 30. The Bakery Baking a Server Image! ! • Aminator • Provides easy creation of package-specific AMIs • Attaches a “Base Image” volume, installs your software package • Takes a snapshot of the volume, resulting in an AMI • This AMI is the immutable infrastructure • AMI will act as our unit of deployment going forward ! ! https://github.com/netflix/aminator
  • 31. Service Discovery Service Registry for Apps! ! • Eureka • Applications can register their own health ! • Integrates tightly with Ribbon to provide inter-app service discovery, load balancing, and fault tolerance ! • Able to be leveraged during the continuous deployment process to inform as to successful deployments ! ! https://github.com/netflix/eureka https://github.com/netflix/ribbon
  • 32. Continuous Deployment and Cluster Management Managing Deployments! ! • Asgard • Provides a UI for managing AWS cloud resources • RESTful API for consumers to be able to script against • Decorates AWS with concepts that are relevant to Netflix’s continuous delivery infrastructure • This includes the concept of applications and clusters, which is something that AWS does not have • Standalone, runnable JAR or WAR deployment options ! ! https://github.com/netflix/asgard
  • 33. Continuous Deployment and Cluster Management
  • 34. Some Harsh Realities… • All of this stuff is difficult to get up-and-running ! • Every tool makes assumptions about account structure, available resources, naming conventions, etc ! • Non-native concepts, like applications and clusters, are difficult to understand from an outsider’s perspective ! • Cost-to-benefit may be low if you’re not adopting the entire stack
  • 35. Getting better… • Many initiatives underway currently to engage the open source community more directly ! • The goal is to make the barrier for entry very low on getting up-and-running with NetflixOSS ! • Andrew Spyker (@aspyker) is leading the charge for making NetflixOSS plug-and-play… ! • Although, not very much (right now) speaks directly to gluing tools together for continuous delivery
  • 36. Some Resources • Zero to Cloud: • http://www.oscon.com/oscon2014/public/schedule/detail/34252 • Walks you through a document that shows how to setup your AWS account • Shows you how to leverage CloudFormation to configure a NetflixOSS runtime ! • Zero to Docker: • http://techblog.netflix.com/2014/11/zerotodocker-easy-way-to-evaluate. html • Pre-built Docker images for NetflixOSS components • Provides a quick way to get up-and-running • Not for production use; not in-use at Netflix
  • 37. Trying to make this easy on you… Introducing the Zero to Cloud Gradle Plugin! ! https://github.com/Netflix-Skunkworks/zerotocloud-gradle ! • “Netflix Skunkworks”, so not officially NetflixOSS at this point ! • A single command can initialize a continuous delivery infrastructure built on NetflixOSS technologies ! • Plugin can be utilizes by builds to be the “glue” between the OS packaging, the Bakery, and Asgard