Information for: DEVELOPERS   PARTNERS

Deploying code in Acquia Cloud Site Factory

Code deployments in Acquia Cloud Site Factory are performed consecutively, instead of concurrently, to minimize the amount of time any single website on your platform is is unavailable to your website visitors. Acquia Cloud Site Factory manages the deployment process for you, ensuring your code deploys to all your websites as efficiently as possible without intervention by your team. You can track the progress of the process to determine the status of the process.

To protect your websites from inconsistencies being introduced over the course of a deployment, certain website functions are disabled at the beginning of a deployment. These functions are re-enabled only after the entire platform has been safely updated.

During a code deployment, if you discover an error in your updated code, you can pause the deployment while you upload a new revision of the code to provide a hotfix. For more information, see Hotfixing an Acquia Cloud Site Factory deployment.

Step 1: Preparing for deployment

At the beginning of the deployment process, all of your websites are hosted from your production environment. Before initiating code changes to your platform, Acquia Cloud Site Factory performs the following administrative tasks to both prepare your platform and protect against overlapping changes:

Diagram of preparatory steps for a platform release

  1. Record the deployment’s starting time.
  2. Disable website installation and cloning tasks to prevent data inconsistency. For information about tasks, see Task logs in Acquia Cloud Site Factory.
  3. Soft-pause any currently-executing tasks, and block new tasks from executing.
  4. Wait for all tasks that are blocking the update to complete.

After Acquia Cloud Site Factory completes these steps, your websites remain hosted by your production environment, but your environments are protected from changes that could introduce data inconsistencies between environments.

Step 2: Transferring domains to a secondary environment

After the websites on your platform are protected from any changes that could occur during the deployment, Acquia Cloud Site Factory will perform the following tasks:

DNS is re-pointed to the update environment instead of 01live

  1. Confirm that the deployment does not contain a major version upgrade to Drupal, and that the acsf-init command has been executed to prepare websites for the platform.
  2. Pause any scheduled jobs for these websites.
  3. Ensure the code deployed on the update environment matches what is currently deployed on the production environment.
  4. Repoint all domain names in use on the production environment to the update environment, freeing up the production environment to be updated while not taking production traffic.
  5. Re-enable any scheduled jobs for these websites.

During this step, Acquia Cloud Site Factory keeps your websites online by shifting your visitor traffic to the update environment, which remains on the previous version control tag. During the time when visitor traffic is temporarily shifted to the update environment, Acquia Cloud Site Factory updates the now-idle production environment.

Step 3: Updating the production environment while temporarily idle

After Acquia Cloud Site Factory transfers the domain names for your websites to the update environment, visitor traffic is routed to the update environment, leaving your production environment idle. During the time that your normal production environment receives no traffic, Acquia Cloud Site Factory deploys your new version control tag to it and clears caches.

The idle production environment is updated with new code

During this step, your domains remain in your update environment and use the previous version control tag.

Next, Acquia Cloud Site Factory begins the process of updating individual websites.

Step 4: Update and redeploy individual websites

At this step of the deployment, your website traffic is served from your update environment, which remains on your previous version control tag. Your production environment has been updated to your new version control tag, but is not yet receiving traffic.

In this step, Acquia Cloud Site Factory completes the following deployment tasks for each website in your subscription:

Websites are updated and returned to the 01live environment

  1. Perform a health check to verify that the website can be updated.
  2. Pause any scheduled jobs for this website.
  3. Place the website into maintenance mode, taking it offline.
  4. Perform any needed database updates to the copy of the website on the production environment. For information about modifying these updates with a hook script, see Overriding the drush updatedb command.
  5. Disable maintenance mode for the website, which returns the website to online status.
  6. Re-enable any scheduled jobs for this website.
  7. Rebuild the website’s caches to improve performance.
  8. Repoint all domain names for the website from the update environment to the production environment.
  9. Confirm that the domains respond to requests.

After an individual website completes these update steps, the domain names are reattached to the production environment, which contains the new version control tag. All other websites on your Acquia Cloud Site Factory platform remain in the update environment until they complete the procedures described in this step.

As websites on your platform proceed through this step, they are shifted from your update environment back to your production environment, until all websites are once again live in your production environment. Your update environment, now empty of websites, remains on the old version control tag.

Domains respond normally from new environment

Finally, Acquia Cloud Site Factory will perform platform cleanup tasks.

Step 5: Cleaning up after updates

After the individual websites have been updated on your production environment, Acquia Cloud Site Factory will perform the following cleanup tasks for the platform:

The non-production environment is updated to match Production

  1. Deploy the new version control tag to the now-empty update environment ensuring it matches your production environment.
  2. Resume paused tasks across the platform.
  3. Re-enable website installation and cloning tasks.
  4. Record the deployment’s completion time.

The code deployment process should be complete. If you receive any update error messages on the Site update status page during the deployment, see Resolving codebase update errors for assistance in resolving the errors.

Tracking the progress of a deployment

You can track the status of the deployment on the At a glance section on the Site update status page. To view this page, complete the following steps:

  1. Sign in to the Acquia Cloud Site Factory environment that you are updating using anaccount with either the release engineer or developer role.
  2. In the admin menu, click Administration, and then click the Site update status link.

Note

To confirm your platform version number, or to determine if maintenance has completed for your subscription, see Determining your platform version.