Search Topic

Active/Standby for Blue/Green Lagoon Deployments - amazee.io

Lagoon implements “Active/Standby” - a blue-green deploy solution


What is Active/Standby?

Active/Standby deployments, also known as blue/green deployments, are a way to switch over your production content seamlessly. Your active (or green) environment is your current active production environment. Your standby (or blue) environment is your standby environment, where you have staged changes ready to roll out. The environments are otherwise identical, so the go-live is just a flip of a switch. All incoming traffic is routed to your new active environment, and the previous active environment takes the standby position. 

Why use Active/Standby?

One of the major advantages of the active/standby deployment strategy is that it reduces risk. Suppose something were to go wrong with the deployment of the standby environment, or perhaps the content isn’t actually ready to go live. In that case, rolling back the changes and switching to the previous active environment is easy. It also reduces or eliminates downtime during a deployment. Instead of waiting for a deployment to finish, the new environment is live, and traffic is directed to the latest production environment. 

How does it work?

Lagoon implements the blue-green deploy strategy by duplicating your current production environment and creating them with an ‘active’ and ‘standby’ Lagoon type.  Each environment is treated as if it were production, so any logic present in themes, settings, or modules is handled the same way in each environment.  They may differ in the autoscaling provisions (a standby environment won’t receive the same traffic as an active one).  When you promote the standby environment to active, Lagoon handles moving the external-facing route for you - everything else stays the same (database, files, Git repository, etc.). We will provide guidance on enabling active/standby in our documentation.

Lagoon does not automate synchronizing content, databases, or filesystems between these two environments while they are actively being worked on (however, the task system provides manual mechanisms for doing so.

How do I enable active/standby for my project?

For now, don't hesitate to contact support while we create better user documentation. Eventually, the process will be automated, but please note that running dual production environments will incur additional costs (based on our pay-per-use cloud hosting fee structure). We will need to make changes to your environments in the API, and you will need to make changes to your configuration in the .lagoon.yml file for each project.

How do I switch my standby environment to active?

In addition to a GraphQL mutation, Lagoon will provide a button and confirmation via the UI. The UI will indicate which environment is active and which is on standby. Importantly, the active and standby designations are independent of the source Git repository branch names (i.e., an environment built from the master branch that switches from active to standby will still be built from the master branch).

Webinar

Want to know more about Blue / Green deployment and see it in action? Join our upcoming webinar on June 25/26


Writer