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. Users can select one or more Cloud Actions whenever they initiate a deployment, or can configure default actions per 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, users can:
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. |
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 Drupal 8 or later 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 | Drupal 8 or later. |
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 Drupal 8 or later 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 |
Cloud Actions are disabled by default.
To enable Cloud Actions per environment:
From your Cloud Platform account, go to the environment on which you want to enable Cloud Actions.
Click Configuration.
Click the Cloud Actions tab.
Select the Enable Cloud Actions on this environment checkbox.
For further customization of Cloud Actions, you can select default Cloud Actions during enablement.
Select the default Cloud Actions that must automatically run for each code deployment on this environment.
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.
(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.
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.
Click Edit to modify the Cloud Actions.
Select or clear the checkbox of the Cloud Actions that must run after the deployment is initiated.
Click Confirm to establish the Cloud Actions that you want to run.
Click Deploy.
Cloud Actions run in the predetermined order.