Cloud Platform

Using Cloud Actions

 

Note

This feature is available only on environments running on Cloud Next technologies.

Cloud Actions is a feature of Cloud Platform that automatically executes common DevOps tasks whenever code is deployed to an environment. You can select one or more Cloud Actions whenever you initiate a deployment, or can configure default actions on each environment. You can enable these actions through the Cloud Platform user interface without requiring any custom code or command line tools.

Acquia provides a list of predefined Cloud Actions. They are executed in a predefined order as represented in the Cloud Platform user interface. The order cannot be changed. Post-deployment Cloud Actions always execute after completion of post-code-deploy Cloud Hooks.

With this feature, you can:

  • Select and execute actions through the Cloud Platform user interface without requiring any custom code or command line tools
  • Set default actions on each environment
  • Override default actions on each code deployment

Terminology

The following table lists the terms specific to Cloud Actions:

TermDescription
ActionA specific task that is executed before or after a code deployment.
EnvironmentA Cloud Platform environment to which a code is deployed. For example, development, stage, and production.
ConfigurationCloud Actions-specific settings configured by the application administrator.
Default configurationEnvironment-level default settings for Cloud Actions.
Pre-deploymentAn action that takes place before a code deployment.
Post-deploymentAn action that takes place after a code deployment.

Available Cloud Actions

The following table lists all available Cloud Actions in the order in which they run if selected:

OrderCloud ActionDescriptionTypeDrupal Version Compatibility
1Backup all databasesCreates a backup of all databases in the target environment. For more information, see Taking backups.Pre-deploymentAll
2Turn on Drupal maintenance modeEnables Drupal maintenance mode. For more information, see Drupal documentation.Pre-deploymentAll
3Clear all Drupal cachesClears and rebuilds all Drupal caches before deployment. This does not clear Varnish or CDN caches. This effectively runs drush cache-rebuild for the current Drupal version, and drush cc all for Drupal 7. For more information, see Drupal documentation.Pre-deploymentAll
4Run database updatesRuns database updates for the Drupal application. This effectively runs drush update-db. For more information, see Drush documentation.Post-deploymentAll
5Import configurationImports configuration. This effectively runs drush config-import. For more information, see Drush documentation.Post-deploymentCurrent Drupal version
6Sanitize databaseSanitizes the database. You can use Drush hooks to extend and customize this command. This effectively runs drush sql-sanitize. For more information, see Drush documentation.Post-deploymentAll
7Clear all Drupal cachesClears and rebuilds all Drupal caches after deployment. This does not clear Varnish or CDN caches. This effectively runs drush cache-rebuild for the current Drupal version, and drush cc all for Drupal 7. For more information, see Drupal documentation.Post-deploymentAll
8Clear all Varnish cachesClears all Varnish caches. For more information, see Purging Varnish cache on Cloud Platform.Post-deploymentAll
9Clear external cachesClears external caches. This requires enabling the Purge module and its sub-module purge_drush.Post-deploymentAll
10Turn off Drupal maintenance modeDisables Drupal maintenance mode. For more information, see Drupal documentation.Post-deploymentAll

Enabling Cloud Actions

By default, Cloud Actions are disabled on all environments.

To enable Cloud Actions on an environment:

  1. From your Cloud Platform account, go to the environment on which you want to enable Cloud Actions.
  2. Click Configuration.
  3. Click the Cloud Actions tab.
  4. Select the Enable Cloud Actions on this environment checkbox.

    For further customization of Cloud Actions, you can select default Cloud Actions during enablement.

  5. Select the default Cloud Actions that must automatically run for each code deployment on this environment.
    • To select all Cloud Actions, select the checkbox next to Cloud Actions.
    • To select Cloud Actions individually, select the checkbox for each Cloud Action that you want to run as a default whenever a deployment is initiated on your environment.
  6. Click Save

    Cloud Actions are selectable upon deployment or code switch. The default Cloud Actions are preselected during deployment while still being overridable. The order in which Cloud Actions are displayed in the list is the order in which they run.

  7. (Optional) Hover over the information bubble to view the description of a Cloud Action.

    Note

    You must select the Enable Cloud Actions on this environment checkbox so that Cloud Actions are available upon initiated deployment. After enablement, you can still select which Cloud Actions run on per deployment.

Disabling Cloud Actions

  1. From your Cloud Platform account, go to the environment you want to disable Cloud Actions.
  2. Click Configuration.
  3. Click the Cloud Actions tab.
  4. Clear the Enable Cloud Actions on this environment checkbox.
  5. Click Save.

Configuring Cloud Actions upon deployment

After you enable Cloud Actions and set your defaults, you can also select which Cloud Actions run upon initiate deployment or override the defaults you enabled. Cloud Actions are displayed within the code deployment modal window after the step of selecting which code to deploy.

Selecting Cloud Actions

  1. Click Edit to modify the Cloud Actions.
  2. Select or clear the checkbox of the Cloud Actions that must run after the deployment is initiated.
  3. Click Confirm to establish the Cloud Actions that you want to run.

  4. Click Deploy.

    Cloud Actions run in the predetermined order.