Information for: DEVELOPERS   PARTNERS   SUPPORT

Managing Acquia Cloud Platform CD environments

To give increased production-ready deployment speed, reliability, and cost efficiency, Acquia Cloud Platform CD enables developer teams to create and work in multiple development environments, and remove those on-demand environments when developer teams no longer require them. Created CD environments persist until you delete them.

CD environments are built dynamically and are similar to regular Drupal-based environments. For more information on CD environments, see:

By default, Acquia Cloud Platform CD includes five CD environments for your use. You can use any of the following methods to add or remove CD environments from your Acquia Cloud Platform application:

If you need more CD environments, contact your Account Manager.

Managing your environments with the Acquia Cloud Platform user interface

The Acquia Cloud Platform user interface allows users with the Add an environment and Delete an environment permissions to add and remove CD environments from your application.

Adding an environment with the user interface

To add a CD environment to your subscription:

  1. Sign in to the Acquia Cloud Platform user interface as a user with the Add an environment permission.

  2. Select the application in which you want to create a CD environment. To find if an application already has a CD environment, examine the application’s card as displayed in the following example:

    Application card showing one on-demand environment is active

  3. Click Actions > Add CD Environment.

    adding_cd_env

    If your application doesn’t have any environments, Acquia Cloud Platform displays an Add environment button on the page.

  4. In Enter a label for the new environment, enter a label for this environment. Acquia strongly recommends you label this environment as a temporary environment.

  5. Click Continue.
    Acquia Cloud Platform displays the Add Environment dialog box.

    Modal window listing Git branches you can deploy on this environment

  6. In the Select branch list, click the branch you want to deploy to your Acquia Cloud Platform CD environment.

  7. Click Continue.
    If you have more than three databases in your environment, Acquia Cloud Platform displays the Select up to 3 databases dialog box.

  8. Select the checkboxes next to the database schemas you want to add to the environment, up to a maximum of three schemas.

  9. Click Continue.
    Acquia Cloud Platform displays a dialog box to confirm your choices and display the number of remaining CD environments.

  10. Click Add environment.

Acquia Cloud Platform creates your CD environment. You can review the environment’s creation status in the activity notifications section of the interface.

Deleting an environment with the user interface

When you no longer need a CD environment, use the following steps to delete the environment from Acquia Cloud Platform:

  1. Sign in to the Acquia Cloud Platform user interface as a user with the Delete an environment permission

  2. Use one of the following methods for the CD environment you want to remove:

    • Click the Trash can icon for the environment you want to remove, as displayed in the following example:

      Delete a CD environment

    • From your environment’s action icons, click the Remove icon Delete an environment.

  3. In the dialog box, type CONFIRM, and then click Remove.

After Cloud Platform completes the removal process, the CD environment is no longer available for your use.

Managing your environments with Pipelines

Using Pipelines, Acquia Cloud Platform CD allows you to create or remove CD environments as instructions in an executed build definition file. To create or remove a CD environment during a pipeline job, use the pipelines-deploy command.

Important

Creating a CD environment with CD pipelines

To create a CD environment, place the pipelines-deploy instruction in the build element, similar to the following example:

build:
  steps:
    - build_site:
          script:
            - echo "Build instructions here"
post-deploy:
  steps:
    - deploy:
            script:
            - pipelines-deploy

Removing a CD environment with CD pipelines

To remove a CD environment, place the pipelines-deploy instruction in either the pr-merged or pr-closed elements, similar to the following examples:

pr-merged:
  steps:
     - deploy:
          script:
             - pipelines-deploy
pr-closed:
     steps:
      - deploy:
           script:
                - pipelines-deploy

Managing your environments with Acquia Cloud Platform API v2

The Acquia Cloud Platform API provides a REST API you can use to manage your CD environments, and monitor the progress of ongoing tasks.

The API includes the following methods you can use with your CD environments:

For information about authenticating to the API, including generating an API token, authenticating requests, and available endpoints, visit the Acquia Cloud Platform API documentation.