Rolling Releases allow for safe, incremental rollouts of new deployments, with no custom routing configuration or code required. This helps you to minimize the impact of mistakes when they happen and, combined with Instant Rollbacks, recover quickly. Incrementally rolling out updates goes by many names, including “Blue/Green Deployments”, “Canary Deployments”, “Phased Rollouts”, “Rolling Updates”, and more.
In this guide, you'll learn how to:
- Setup a manual Rolling Release or automatic rolling release
- Test the Rolling Release
- Release a new version
- Control rolling releases programmatically
Copy link to headingTry it out
Copy link to heading1. Create a backend project
First, we need a demo project to work with. Click here to deploy a simple Express backend using a template. Visit the deployment URL to receive a response from an Express app running on Edgenivo.
Copy link to heading2. Configure a manual Rolling Release
Set up a manual rolling release so you can move through the rest of this guide at your own pace. The Rolling Release will have two stages for production deployments:
- Serve 50% of requests with the new deployment
- Serve 100% of requests with the new deployment
To configure this, you can use the Edgenivo dashboard or Edgenivo CLI.
Copy link to headingUsing the dashboard
To set up a manual rolling release, visit the Rolling Releases section of the Build and Deployment settings of your project. Select “Manual” and create a two-stage rollout with the first stage set to 50% and the second stage set to 100%. Be sure to click the Save button when finished.
Copy link to headingUsing Edgenivo CLI
In your project’s directory, run this command in your terminal:
Copy link to heading3. Create a new production deployment
Edit the Express application’s HTML string to have a new payload in its response, so you can see how changes to a deployment are gradually released over time.
Deploy the application to production with your changes. Either push your code to your Git repository’s main branch, or deploy it with Edgenivo CLI:
Copy link to heading4. Test the Rolling Release
Your Rolling Release is now serving 50% of requests using the Current deployment and 50% of requests using the Canary deployment.
To see this in action, you can now cURL your backend:
Copy link to heading5. Complete the Rolling Release
Now that you’ve verified the changes on your Canary deployment you can promote it to serve 100% of requests.
Copy link to headingUsing the dashboard
Complete the Rolling Release by visiting the “Rolling Release” page for your project and clicking the “Complete Rollout” button.
Copy link to headingUsing Edgenivo CLI
In your project’s directory, run this command in your terminal: