Netflix is known as a place to binge watch television, but behind the scenes, there’s much going on before everyone’s favorite shows can be streamed. There are many tools and techniques the company uses to go from source code to a deployed service that sends shows and movies to more than 75 million global Netflix subscribers.
Some of the engineers at Netflix teamed up to write a blog post that gives developers and Netflix enthusiasts an inside look at what happens before a line of code is deployed to the cloud. This is just one of the many technical posts the Netflix engineering team will release to the public.
(Related: Netflix previews Falcor)
According to Netflix’s blog, Netflix engineers have to do the following things before deploying code to Spinnaker, the Continuous Delivery platform they use:
- Code is built and tested locally using Nebula
- Changes are committed to a central Git repository
- A Jenkins job executes Nebula, which builds, tests and packages the application for deployment
- Builds are “baked” into Amazon Machine Images
- Spinnaker pipelines are used to deploy and promote the code change
Netflix’s culture is based on “freedom and responsibility,” said the Netflix engineers, and it empowers them to figure out which tools are best for each task. Before they accept a tool, they consider the value and determine if it reduces the overall cognitive load for the majority of Netflix engineers. Back in 2008, Netflix began migrating to its streaming service to Amazon Web Services (AWS) as it converted its monolithic, datacenter-based Java application to the cloud.
The first step to deploying an application or service is building. Netflix created Nebula, a set of plug-ins for the Gradle build system, that “help with the heavy-lifting around building applications,” said the engineers.
“Gradle provides first-class support for building, testing and packaging Java applications, which covers the majority of our code. Gradle was chosen because it was easy to write testable plug-ins, while reducing the size of a project’s build file. Nebula extends the robust build automation functionality provided by Gradle with a suite of open-source plug-ins for dependency management, release management, packaging, and much more.”
The team wrote that a future blog post will dive into Nebula and the features they’ve open-sourced.