One intern’s foray into the depths of infrastructure, and lessons learned about how the apparently simple is typically anything but.
Overview
The article discusses the introduction of deployment pipelines at Airbnb, emphasizing the importance of enforcing deployment procedures to prevent issues caused by 'bad code'. It highlights the challenges faced with flexibility in the deployment process and the steps taken to develop a more structured approach to deployments.
What You'll Learn
1
How to design a deployment pipeline to enforce deployment procedures
2
Why flexibility in deployment can lead to issues and how to mitigate them
3
How to implement configuration as code for deployment processes
Prerequisites & Requirements
- Understanding of deployment processes and environments
- Familiarity with software development lifecycle(optional)
Key Questions Answered
What problems arise from a flexible deployment procedure?
A flexible deployment procedure can lead to engineers deploying code in the wrong order, such as skipping staging or canary environments. This flexibility, while beneficial for experienced users, can cause significant issues for infrequent users who may not be aware of the correct deployment sequence.
How does Airbnb ensure code quality during deployments?
Airbnb uses a homegrown deployment service called Deployboard, which acts as the last line of defense against bad code. The service is designed to enforce deployment procedures and minimize potential misuse by providing a carefully designed interface.
What steps were taken to develop the deployment pipeline at Airbnb?
The development of the deployment pipeline involved multiple steps, including creating a specification for configuration files, saving pipeline configurations in a database, and implementing a user-friendly UI. This process required careful planning and collaboration among teams to ensure a robust solution.
Key Statistics & Figures
Percentage of code changes deployed directly to production
10%
Before the implementation of the new deployment pipeline, about 10% of code changes were deployed directly to production, which raised concerns about potential issues.
Technologies & Tools
Backend
Deployboard
Homegrown deployment service used to manage code deployments at Airbnb.
Key Actionable Insights
1Implementing a structured deployment pipeline can significantly reduce the risk of deploying bad code.By enforcing a clear sequence for deployments, teams can minimize errors and ensure that code changes are tested in appropriate environments before reaching production.
2Regularly update documentation related to deployment procedures to assist engineers unfamiliar with specific services.Keeping documentation current helps prevent mistakes during deployments, especially for engineers who may not work with a service regularly.
3Consider using configuration as code for deployment processes to simplify updates and maintenance.This approach allows teams to manage deployment configurations in a version-controlled manner, making it easier to track changes and roll back if necessary.
Common Pitfalls
1
Allowing engineers to deploy code without a structured process can lead to significant errors.
This often happens when flexibility is prioritized over structure, resulting in deployments that skip necessary testing stages.
Related Concepts
Deployment Processes
Configuration As Code
Software Development Lifecycle