HOW TO BUILD SOFTWARE (MVP)

5. DEPLOYMENT

Deployment is the next phase in the software development lifecycle, where releasing code or updating a platform requires significant effort to ensure a smooth process that appears effortless to users.

5.1

environment setup

5.2

deployment plan

5.3

delivery

5.4

MONITORING

 

5.2 deployment plan

KEY TERMS: deployment, rollback

"The objective of a deployment pipeline is to be the only route to production."

- Dave Farley

DEPLOYMENT STRATEGIES

In the Software Development Life Cycle (SDLC), deployment strategies ensure that software is released effectively and efficiently. Here are some common deployment strategies for startups and their advantages. These strategies provide a balance between simplicity and control, making them easier to manage while reducing the risk of major issues. Recreate Deployment and Blue-Green Deployment are particularly suitable for startups that are still establishing their deployment processes and infrastructure. Feature Toggles can be a good addition once the team gains more experience and wants to experiment with gradual feature releases.

Recreate Deployment

Description. The existing version of the software is completely replaced with the new version. The old version is taken down before the new version is deployed.

Advantages. Simplifies the deployment process, but can cause downtime during the switch.

Considerations. Be prepared for potential downtime and ensure thorough testing before deploying.

Blue-Green Deployment

Description. This strategy involves maintaining two identical environments: one (the "blue" environment) for the current production version and another (the "green" environment) for the new version. The switch between environments happens once the new version is ready and fully tested.

Advantages. Minimizes downtime and reduces risk by allowing for quick rollback if issues arise.

Considerations. Requires maintaining two environments, which might be more resource-intensive but manageable with cloud services.

FEATURE TOGGLES

Description. New features are deployed but turned off by default. They can be activated or deactivated dynamically without requiring a new deployment.

Advantages. Allows for gradual feature rollout, quick rollbacks, and testing of features in production.

Considerations. Ensure proper management of feature flags to avoid clutter and confusion. This strategy requires clear planning on how to handle toggles and rollbacks.

Recreate Deployment and Blue-Green Deployment are particularly suitable for startups that are still establishing their deployment processes and infrastructure. Feature Toggles can be a good addition once the team gains more experience and wants to experiment with gradual feature releases.

DEPLOYMENT PLAN

After you've chosen your deployment strategy, you will need a deployment plan that outlines the step-by-step process for deploying your software to the production environment. You can minimize risks, ensure a smooth release process, and quickly address any issues that arise during the deployment. This plan should include:

1. Pre-Deployment Checklist. Ensure all necessary preparations are complete, such as code reviews, automated tests, and environment setup.
2. Deployment Steps. Define the specific actions required to deploy the software, including moving code to the production environment, configuring servers, and updating databases.
3. Monitoring. Establish monitoring procedures to track the software's performance and detect any issues immediately after deployment. Read more about this in the Monitoring section ↗.
4. Rollback Procedures. Plan for potential problems by outlining how to revert to the previous version if something goes wrong. This includes creating backups and ensuring you have a clear path for rolling back changes. Read more below. ↓
5. Communication. Inform relevant stakeholders and users about the deployment schedule, potential impacts, and any expected downtime.

ROLLBACK PROCEDURES

A rollback is a plan for reverting to a previous version of your software so you can quickly and effectively address any issues that arise during deployment, ensuring that your software remains reliable and your users experience minimal disruptions. Here’s how to prepare for effective rollback:

  • Backup. Before deploying, make sure to create a complete backup of your current software, databases, and configuration settings. This way, if the new version has issues, you can restore everything to its previous state.
  • Version Control. Use version control systems like Git to manage and track changes in your code. This helps you easily access and revert to earlier versions if needed. Read more in the Version Control section ↗.
  • Deployment Automation. Utilize deployment tools that support rollback capabilities. Tools like Jenkins or GitLab CI/CD can automate the process of rolling back to a previous version if the new deployment fails. Read more in the Delivery section↗.
Rollback-Procedure

Source: Octopus


  • Rollback Plan. Create a clear, step-by-step guide for how to execute a rollback. This should include instructions for restoring backups, reapplying old configurations, and ensuring that the system is stable.
  • Testing Rollbacks. Regularly test your rollback procedures in a staging environment to ensure they work correctly. This helps you identify any issues in the rollback process before they affect your production environment.

Traditionally, deploying updates involved scheduled downtime and meticulous planning to avoid disrupting services. However, modern deployment practices aim for zero-downtime updates, enabling multiple releases each day without affecting user experience. This shift has been made possible by advancements in continuous integration and deployment practices, which focus on automating and streamlining the release process to support rapid and reliable software delivery. Read more in the Delivery section ↗.

Need help?
Sequolia helps startups navigate complex decisions with proven blueprints, allowing you to focus on growth and success.

In Summary:

  • Pre-Deployment Preparations. Ensure thorough preparation by completing code reviews, running automated tests, and confirming that the environment is correctly set up before deploying.
  • Clear Deployment Steps. Define each action required for deployment, such as moving code to the production environment, configuring infrastructure, and updating databases, to ensure a smooth release.

  • Establish Rollback Procedures. Plan for potential failures by creating a rollback strategy, including backups and step-by-step instructions to revert to a previous version if necessary.