Automatic Deployment at Shopify

6 minute read Hi, I'm Graeme Johnson, and I work on Shopify's Developer Acceleration team. Our mission is to provide tools that let developers ship fast and safely. Recently we began shipping Shopify automatically as developers hit the merge button in GitHub. This removes the final manual step in our deploy pipeline, which now looks like this: Merge → Build container → Run CI → Hit deploy button → Ship to production We have invested a lot of engineering effort to make this pipeline fast enough to run end-to-end in about 15 minutes—still too slow for our taste—and robust enough to allow cancellation at any stage in the process. Automating the actual deploy trigger was the next logical step.

Graeme Johnson
7 min readintermediate
--
View Original

Overview

The article discusses Shopify's implementation of automatic deployment, which streamlines the deployment process by triggering deployments automatically upon merging code in GitHub. This change has significantly increased deployment frequency and improved the overall efficiency of the deployment pipeline.

What You'll Learn

1

How to automate deployment processes using GitHub and CI/CD tools

2

Why reducing manual steps in deployment increases efficiency and developer confidence

3

When to implement automated deployment in your development workflow

Prerequisites & Requirements

  • Understanding of GitHub workflows and CI/CD principles
  • Familiarity with Docker and containerization concepts(optional)

Key Questions Answered

How does Shopify's automatic deployment process work?
Shopify's automatic deployment process is triggered by merging code in GitHub, which initiates a series of automated checks and builds. This process eliminates the need for a manual deploy button, allowing for faster and more reliable deployments, with an average of 50 deployments per day.
What problems did Shopify face before implementing automatic deployment?
Before automatic deployment, Shopify faced issues such as deploy logjams, where larger deploys made problem determination difficult, and unshipped changes, where developers left code unshipped on the master branch. These problems hindered the efficiency of their deployment process.
What cultural standards does automatic deployment reinforce at Shopify?
Automatic deployment reinforces high expectations for speed and reliability, trust in developers to deliver quality code, and a culture of fearlessness around shipping code. These standards help create a more efficient and confident development environment.
What were the results after one month of using automatic deployment?
After one month, Shopify reported shipping nearly 50 times a day, with smaller deploy sizes averaging one to two changes. This shift improved the ability to connect problems to code changes and indicated a healthier deployment pipeline.

Key Statistics & Figures

Daily deployment frequency
50 times
This is the average number of deployments after implementing automatic deployment.
Average deploy size
1 to 2 changes
This reflects the shift towards smaller, more manageable deploys, making it easier to identify issues.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Key Actionable Insights

1
Implement automatic deployment to streamline your release process and reduce manual errors.
By automating deployment, teams can focus on writing code rather than managing the deployment process, leading to faster releases and improved developer morale.
2
Encourage a culture of trust and responsibility among developers to enhance code quality.
When developers feel trusted to ship code, they are more likely to take ownership of their work, leading to better reviews and fewer errors in production.
3
Monitor deployment metrics to assess the health of your deployment pipeline.
Tracking metrics such as deployment frequency and the time taken for deploys can provide insights into the efficiency of your processes and highlight areas for improvement.

Common Pitfalls

1
Over-reliance on automation can lead to complacency among developers.
When teams automate processes, they may neglect the importance of manual checks and balances, which can result in undetected issues in production.
2
Failing to monitor deployment metrics can obscure potential problems.
Without tracking key metrics, teams may miss signs of inefficiency or instability in their deployment pipeline, leading to larger issues down the line.

Related Concepts

Continuous Integration
Continuous Deployment
Devops Practices
Containerization