Spinnaker as a Continuous Delivery Solution for JavaScript Apps

Rate this content
Bookmark

Spinnaker is an open-source continuous delivery platform that provides application management and deployment to help engineering teams confidently release software changes at a high velocity. It was initially developed at Netflix and is now used by many large-scale engineering teams. In this talk, we will explore how we can leverage it to deploy JavaScript applications to multiple cloud providers in a repeatable and scalable fashion while taking advantage of its robust feature set.

10 min
15 Feb, 2024

Video Summary and Transcription

Jamal Sinclair-O'Garro introduces himself as a senior software engineer at Netflix with experience in algorithmic and electronic trading. Spinnaker is a multi-platform continuous delivery platform used by companies like Grubhub, Airbnb, Google, Netflix, Chime, Box, and Target. It provides infrastructure management and deployment through pipelines, allowing gradual rollouts and canary analysis to ensure safe changes. Spinnaker improves velocity and is recommended for streamlining JavaScript applications across different providers.

Available in Español

1. Introduction

Short description:

Hello, my name is Jamal Sinclair-O'Garro, a senior software engineer at Netflix. I have experience in algorithmic and electronic trading. I'm based in New York and a fan of hip hop and sports, especially the Knicks.

Hello. My name is Jamal Sinclair-O'Garro and welcome to my talk on Spinnaker as a continuous delivery solution for JavaScript applications. So, who am I? As mentioned, my name is Jamal. I'm a senior software engineer at Netflix within our platform engineering organization. Prior to working at Netflix, I've been here about two years, I worked my entire career in finance where I focused mostly on algorithmic trading and electronic trading. I've built over 15 desktop algorithmic electronic trading applications that have gone firm-wide at my previous firms. I'm born and raised in New York where I'm currently based. I'm a hip hop head, sneaker head, I'm a Yankees, Giants, and Knicks fan, and the Knicks are killing it right now, so let's go Knicks.

2. Spinnaker Overview

Short description:

Today we'll learn about Spinnaker, a multi-platform continuous delivery platform that supports multiple cloud providers. We'll discuss its functionality, deployment orchestration, resource management, and its usage by companies like Grubhub, Airbnb, Google, Netflix, Chime, Box, and Target. We'll also cover high-level concepts such as providers, applications, clusters, server groups, load balancers, and firewalls in the Spinnaker architecture.

So, today's roadmap. What are we going to focus on today? Today we're going to learn about Spinnaker, what it is, we'll understand at a high level some of the overview of its functionality, and then we'll try to figure out why you might want to use it for your JavaScript applications.

So, with that being said, what is Spinnaker? Spinnaker is a multi-platform continuous delivery platform that supports multiple cloud providers or environments. So, think AWS, Google Cloud, and Azure. Spinnaker gives us the ability to configure cloud resources. So, think of your instance type security groups if you're from AWS land. We can orchestrate our deployment or define the orchestration for deployments through something called pipelines that we'll talk about shortly. And we can also manage or deploy resources. So, think of like auto-scaling and logic that allows us to perform things like rollbacks in case things don't go well. Spinnaker was developed at Netflix internally and has since been open source and is now community maintained.

So, we know about Spinnaker, but the question you might have is, who's using it? Who's using Spinnaker in production? So, right now there's a few companies. There's Grubhub, there's Airbnb, Google, Netflix, of course, because Spinnaker came from Netflix. There's Chime, Box, and Target. So, as we can see, this is a small subset, but there's a very large amount of companies that are using Spinnaker in production for their delivery solution.

So, now let's talk about some high-level Spinnaker concepts. So, first, let's talk about a provider. So, a provider is a cloud service provider. So, like AWS or Azure, Google Cloud that provides computing resources, you can build your infrastructure on top of and deploy and serve your applications. Now, in Spinnaker world, an application is a collection of something called clusters that we'll talk about shortly. So, think of it as a way to keep track of our application, the application configuration, and also its infrastructure settings. On top of that, there's also a server group, a server group is a collection of instances. So, think of your instances of your Node application, or it could even be like Kubernetes instances as well. A cluster is a grouping of server groups in Spinnaker. And then we also have load balancers that basically balance traffic between instances inside of a particular server group. We have a firewall, which allows us to set our networking security traffic rules. So, let's look at a high level of the Spinnaker architecture. So, here we have an example of two applications. As mentioned, an application is a way for you to group your apps resources and infrastructure. And you can see here, we have a collection of clusters. And each cluster is basically a set of security groups, right? Sorry, server groups.

3. Spinnaker Architecture

Short description:

The Spinnaker architecture gives an overview of clusters, server groups, instances, load balancers, and firewalls. The actual screen shows different server groups and clusters, where actions like rollback, resizing, disabling, deploying, and cloning can be controlled. Spinnaker provides a centralized panel to define infrastructure settings that are abstracted across servers and providers.

As we see here, cluster A has three server groups, cluster B has two server groups, and cluster C has one server group. If we look at application two, we see it's slightly different. And if we zoom into cluster D within application two, we'll see that we have two server groups. These server groups contain instances. So, these boxes here are instances. And here we see we have our load balancer, that's going to take traffic, push it through a firewall, and then basically decide where that traffic is hit in terms of our instances are concerned. So, that's a high level overview of the Spinnaker architecture in a nutshell.

Here's an example of what clusters look like in the actual screen. So, you see, we have our different server groups, our different clusters. We have our instances. Here, we have a way to actually control some of the actions on our server groups. So, rolling back, resizing, disabling, deploying, even cloning.

Spinnaker allows us to define our infrastructure. So, to specify settings on our environment without having to navigate through many different pages to do so. In Spinnaker, we'll see in a second in our next screenshot, you can do this from all one centralized panel. And it's also abstracted across the different servers and providers. So, you don't have to worry about if you're moving from AWS to Google Cloud to have to like learn that infrastructure or learn where everything is at. Spinnaker will give you one unified way to manage those settings.

4. Infrastructure Management and Deployment

Short description:

Spinnaker provides a unified way to manage infrastructure settings across different providers. Deployment management is achieved through pipelines that automate key flows, such as image pulling, testing, canary releases, and deployment strategies. Canary analysis allows gradual rollouts and comparison against a baseline to identify statistically significant differences.

So, you don't have to worry about if you're moving from AWS to Google Cloud to have to like learn that infrastructure or learn where everything is at. Spinnaker will give you one unified way to manage those settings. So, here we have it. Here's an example infrastructure management page. So, a configuration deployment cluster where you can see here, you can specify your accounts, your region, your VPC subnets. Even here we can see that we can configure load balancers, security groups or instance types, and even down to availability zones. So, as we can see here, one benefit is that Spinnaker gives you this high level abstraction that lets you manage your infrastructure from a simple panel that can be extracted away and generalized across many different providers or cloud service providers.

Next, let's talk briefly about deployment management. So, what does this mean? So, Spinnaker has a concept of something called pipeline. And a pipeline at a high level lets you define how your code is deployed. It allows automation of key flows. So, think of like pulling an image down from somewhere, running tests, running canaries, or even allowing a manual judgment to gate a application from being promoted to production automatically. You can also manage building your images, canary releases, and enforcing other deployment strategies.

Let's briefly, before we close, let's talk about canary analysis. One really powerful feature of Spinnaker is that it allows us to run something called canaries. What is a canary? A canary is basically a deployment process where a change is gradually rolled out and compared against a baseline. So, let's say we made a change to a configuration or change to some code. What we want to do is run a baseline of what our current production looks like. And then we're going to run a replica of that that contains our code, right? Our code change, configuration change, and then what we're going to do is pick up some metrics. And for the metrics, we're going to try to see if there's any material differences that are statistically significant.

5. Pipeline and Canary Analysis

Short description:

Spinnaker allows running canaries to gradually roll out changes and compare them against a baseline. A canary score is computed based on metrics to determine if the change is safe for production. Spinnaker is a powerful tool that improves velocity and makes working with cloud providers easier. The community is active and passionate. If you want to streamline your JavaScript application across different providers, Spinnaker is the tool for you.

And if you look at the actual pipeline as in production, we can see that for every stage that we go through, if something is green, that means that that stage is actually completed and it has been successful. If we had any issues, it would actually turn red, or there's other different colors that would actually specify different statuses, but those are the two ones that we mostly care about. And if you look here and drill into the actual pipeline stage itself, you can see more information and more metadata about it.

So, let's briefly, before we close, let's talk about canary analysis. One really powerful feature of Spinnaker is that it allows us to run something called canaries. What is a canary? A canary is basically a deployment process where a change is gradually rolled out and compared against a baseline. So, let's say we made a change to a configuration or change to some code. What we want to do is run a baseline of what our current production looks like. And then we're going to run a replica of that that contains our code, right? Our code change, configuration change, and then what we're going to do is pick up some metrics. And for the metrics, we're going to try to see if there's any material differences that are statistically significant. So, think of increases in latency, increases in error logs, increases of anything that looks suspicious that is different from our baseline. And what we do is we take that information and compute a score, what we call a canary score. And that score determines if that change is safe to put out to production. And this is done for both code and configuration changes, as mentioned.

So, as we wrap up this brief talk, I'm just going to give a few conclusions and takeaways, is that Spinnaker is a very powerful tool and is fully featured. It helps improve velocity and makes working with cloud providers easier once you become familiar with it. And the community is very passionate and very active at conferences and social channels. So, if you are a JavaScript developer, engineer, team lead, and you're looking for a way to streamline your JavaScript application, your JavaScript application, whether it's a node application or is it from an application, and you want to make it generic across all of your different potential providers, AWS or Google Cloud, Spinnaker is probably the tool for you. Here are a few resources. So, the Spinnaker docs is a really good place to start. The Spinnaker Slack channel is pretty good. That URL is pretty long, but this deck will be shared. It's a clickable link. Feel free to check it out. And here's my contact information, my GitHub, my Twitter, and my LinkedIn. And with that, I will open it up to any questions.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

React Advanced Conference 2022React Advanced Conference 2022
16 min
How to Build Your Own Open Source Project
We all used open source projects every day such as npm packages, editors, web applications, and even operating systems... Have you ever thought of building one of your own? In this talk, I will share my journey building jest-preview, from when it was just a vague idea, to currently a well-adopted library to help frontend engineers write tests faster. I will share with you how to come up with an idea for a project to work on, what is the struggles you have to overcome as an author of an open source project, how to manage time efficiently, and how you get attention from engineers around the world.
TypeScript Congress 2022TypeScript Congress 2022
30 min
Lessons from Maintaining TypeScript Libraries
Maintaining widely-used JS libraries is already complicated, and TypeScript adds an additional set of challenges.

Join Redux maintainer Mark Erikson for a look at some of the unique problems TS library maintainers face, and how the Redux team has handled those problems. We'll cover:

- Tradeoffs of different ways to define TS types for a library
- How to target different versions of TS, and considerations for determining the supported version range
- Migrating existing JS libraries to TS
- Differences between writing "app" types and "library" types
- Managing and versioning public types APIs
- Tips and tricks used by types from the Redux libraries
- TS limitations and possible language-level improvements
Vue.js London 2023Vue.js London 2023
31 min
Nuxt 3 Modules and Open-Source
Nuxt modules are the de-facto way of extending our Nuxt applications with new behaviors and functionalities. Have you ever built your own? Why would you bother with hundreds of modules already out there? Let's answer those questions together and see why making your own modules in Nuxt 3 can both help you have a deeper understanding of how Nuxt works while also paving the way for you to get into open source!
React Day Berlin 2022React Day Berlin 2022
8 min
Making an Open Source Library Financially Sustainable
React Flow is an open source library used by thousands of developers and hundreds of companies. How do we make sure it stays alive, and also free? I’ll share some insights along our journey from open sourcing React Flow to passing the “black zero,” including findings from our user research where we spoke to some of the people who support us every month.
React Day Berlin 2023React Day Berlin 2023
31 min
Break the Race: Easy Race Condition Detection for React
Race conditions are among some of the most challenging to detect and reproduce issues. As such they pose a significant challenge in development notably in UI. In this talk, we explore how to detect race conditions by leveraging fuzzing techniques. We walk you through discovering the real problem of race conditions and how they impact user experience. We provide you tools and examples demonstrating how to easily detect them in your daily work thanks to tests relying on fuzzing. After that talk, we hope your React code will be race conditions free or at least that you will have the right tools to help you.
React Finland 2021React Finland 2021
18 min
The State of XState
Over the past few years, state machines, statecharts, and the actor model have proven to be viable concepts for building complex application logic in a clear, visual way with XState. In this talk, we'll take a peek into the future of XState, including new features in the next version, and new tools and services that will make it even easier to create and collaborate on state machines.

Workshops on related topic

Node Congress 2023Node Congress 2023
85 min
Node.js: Landing your first Open Source contribution & how the Node.js project works
Workshop
This workshop aims to give you an introductory module on the general aspects of Open Source. Follow Claudio Wunder from the OpenJS Foundation to guide you on how the governance model of Node.js work, how high-level decisions are made, and how to land your very first contribution. At the end of the workshop, you'll have a general understanding of all the kinds of work that the Node.js project does (From Bug triage to deciding the Next-10 years of Node.js) and how you can be part of the bigger picture of the JavaScript ecosystem.

The following technologies and soft skills might be needed):
  - Basic understanding of Git & GitHub interface
  - Professional/Intermediate English knowledge for communication and for allowing you to contribute to the Node.js org (As all contributions require communication within GitHub Issues/PRs)
  - The workshop requires you to have a computer (Otherwise, it becomes difficult to collaborate, but tablets are also OK) with an IDE setup, and we recommend VS Code and we recommend the GitHub Pull Requests & Issues Extension for collaborating with Issues and Pull Requests straight from the IDE.

The following themes will be covered during the workshop:
- A recap of some of GitHub UI features, such as GitHub projects and GitHub Issues
- We will cover the basics of Open Source and go through Open Source Guide
- We will recap Markdown
- We will cover Open Source governance and how the Node.js project works and talk about the OpenJS Foundation
  - Including all the ways one might contribute to the Node.js project and how their contributions can be valued
- During this Workshop, we will cover Issues from the nodejs/nodejs.dev as most of them are entry-level and do not require C++ or deep technical knowledge of Node.js.
  - Having that said, we still recommend enthusiast attendees that want to challenge themselves to "Good First Issues" from the nodejs/node (core repository) if they wish.
  - We're going to allow each attendee to choose an issue or to sit together with other attendees and tackle issues together with Pair Programming through VS Code Live Share feature
    - We can also do Zoom breakrooms for people that want to collaborate together
  - Claudio will be there to give support to all attendees and, of course, answer any questions regarding Issues and technical challenges they might face
  - The technologies used within nodejs/nodejs.dev are React/JSX, Markdown, MDX and Gatsby. (No need any knowledge of Gatsby, as most of the issues are platform agnostic)
- By the end of the Workshop, we'll collect all (make a list) the contributors who successfully opened a Pull Request (even if it's a draft) and recognise their participation on Social media.