Deploying your applications to Acquia Cloud

Node.js with Decoupled Drupal on Acquia Cloud – Back to intro
Previous lesson – Setting up a local Drupal and Node.js application

Lesson Goal

Deploy Drupal and Node.js applications to Acquia Cloud

Overview and Configuration

To complete this lesson you need access to an Acquia Cloud environment with both a Drupal and a Node.js dev environment

With the Drupal and JavaScript applications available locally, we will focus next on the deployment of these applications. While steps slightly vary for each application, the same workflow methodology applies when deploying a build artifact to the Acquia Cloud.

To complete the next tasks, you will need to add the Acquia Cloud Git URL as a remote using the following command.

Locate the Git URL under the “Information” section in your Acquia Cloud Subscription:

giturl

Add the URL as a Git remote:

git remote add cloud YOUR_CLOUD_GIT_URL

The new git remote has been added. Switch to the master branch of this location for each application.

Creating the deploy artifact with Acquia Pipelines

Acquia Pipelines will now create the build artifact. So if you have not set up Acquia Pipelines locally, follow the steps outlined in this tutorial.

To build an artifact for both applications, add a acquia-pipelines.yaml file in the respective root of each codebase. An example of the acquia-pipelines.yaml file for Drupal is available at this reference and the example for Node.js is found at this reference.

There may be the need to set the default Application ID for your local repository to properly associate the artifact to the subscription. Use pipelines list-applications to find the ID for your Acquia Cloud application, then set the ID with pipelines set-application-id --application-id=[application-id].

Now that everything is configured appropriately, you can build your artifact with:

pipelines start

Deploying the Drupal codebase

Once the artifact is built, deploy the artifact to your environment within the Cloud UI. This can be accomplished by going to the “Environments” tab and choosing “Switch” for the proper build artifact. You can see a full explanation of the process at the Code workflows documentation.

code switch

Deploying the JavaScript codebase

Deploying the artifact to the Acquia Cloud can be accomplished by following the same workflow as the Drupal deployment steps. Go to the “Environments” tab and click the “Code” element icon. This will allow you to switch the artifact to based on a hash number. You can view the complete steps for deploying your application in the Deploying build artifacts in your Node.js environment documentation.

artifact

Congratulations! You have deployed both applications to the appropriate Acquia Cloud environments and are ready for review.

Contact supportStill need assistance? Contact Acquia Support

Acquia: Think Ahead

53 State Street, 10th Floor
Boston, MA 02109
United States
Phone: 888-922-7842

Map: Google Maps
View other locations