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. Custom Cloud Hooks are always executed after completion of all Cloud Actions.

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:

Term

Description

Action

A specific task that is executed before or after a code deployment.

Environment

A Cloud Platform environment to which a code is deployed. For example, development, stage, and production.

Configuration

Cloud Actions-specific settings configured by the application administrator.

Default configuration

Environment-level default settings for Cloud Actions.

Pre-deployment

An action that takes place before a code deployment.

Post-deployment

An 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:

Order

Cloud Action

Description

Type

Drupal Version Compatibility

1

Backup all databases

Creates a backup of all databases in the target environment. For more information, see Taking backups.

Pre-deployment

All

2

Turn on Drupal maintenance mode

Enables Drupal maintenance mode. For more information, see Drupal documentation.

Pre-deployment

All

3

Clear all Drupal caches

Clears 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-deployment

All

4

Run database updates

Runs database updates for the Drupal application. This effectively runs drush update-db. For more information, see Drush documentation.

Post-deployment

All

5

Import configuration

Imports configuration. This effectively runs drush config-import. For more information, see Drush documentation.

Post-deployment

Current Drupal version

6

Sanitize database

Sanitizes 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-deployment

All

7

Clear all Drupal caches

Clears 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-deployment

All

8

Clear all Varnish caches

Clears all Varnish caches. For more information, see Purging Varnish cache on Cloud Platform.

Post-deployment

All

9

Clear external caches

Clears external caches. This requires enabling the Purge module and its sub-module purge_drush.

Post-deployment

All

10

Turn off Drupal maintenance mode

Disables Drupal maintenance mode. For more information, see Drupal documentation.

Post-deployment

All

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.