DevOps & Cloud Solutions, Uncategorized




Business problem

Drupal application setup on the Acquia Cloud platform.

Targeted customers

Clients preferred for Drupal with Acquia cloud services.

 Expected benefits

Save time in Drupal Installation and setting up environments and applications on the Acquia cloud platform.

Resource cost

One resource can be set up the environment in 8 hours including creating the backend servers and environments on Acquia console by the Acquia support team.

High-level technical details

Drupal, apache, Acquia Cloud, MySql, Cloudflare

Steps to follow in Acquia-Drupal environment setup

1.    Pre-Requisites

  1. Raise Acquia ticket to set up the required environments

Ex: Development, QA, Stage, Prod

  1. Client needs to create domain names for all the environments
  2. Network team needs to be Text record in Cloudflare after creating the domains


2.    Installation and Environment setup

  1. Acquia team will create environments on Acquia console and provide the environments, backend ssh servers.
  2. Login into Acquia console.
  3. Verify the environments are having actual Domain names for application URLs.
  4. If the Domain names are provided by the network team before the Drupal installation process, follow the below Section 4 (Add Domain URL to Environments) to add the domain names. If not proceed with the installation with the default URLs provided by Acquia.
  5. Initially, environments will be deployed with the WELCOME tag by the Acquia support team.
  6. Deploy the latest code to the environment before starting the Drupal installation
  7. Go to the Environment page in the Acquia console.
  8. Navigate to the environment in which we are going to install Drupal.
  9. Click “switch code” available adjacent to the code option.
  10. Under “Select Branch” type the branch/tag name going to be deployed. Select the branch name from the drop-down and click on Continue.
  11. Deploying the code will take a while to complete.
  12. Click on the environment under the Acquia subscription group, where we need to install Drupal and configure the site.
  13. Click on “Install Drupal” on environment page.
  14. The installation will take a while to complete.
  15. Once the installation completed go back to environments page and click on environment application URL to configure the site
  16. Clicking upon application URL will be redirected to the install.php page.
  17. Click on Install in the install.php page.
  18. Click on Next to continue the site configuration
  19. Once the site is configured drupal application will be open with the latest code.

3.    Gitlab & Acquia Integration

In order to sync the code in Gitlab with Acquia servers, Gitlab is having the “Mirroring Repositories” concept. Mirroring Repositories will sync the code whenever “commit or merge” happens in Gitlab with the time interval of 5 minutes.

Steps to create Mirroring Repositories from Gitlab.

  1. Login to Gitlab.
  2. Go to the gitlab project and click on “repositories” under the settings section.
  3. Go to Mirror repositories and click on Expand.
  4. Under Mirror repositories provide the gitlab project URL,

mirror direction as “Push”,

Authentication method as “SSH public key”,

then click on “Detect host keys” to retrieve the ssh key, now Click on “Mirror repository”.

  1. Copy the ssh key by clicking on the copy ssh symbol.
  2. Login to the Acquia Console.
  3. Go to the User profiles and click on “Account Settings”.
  4. Click on SSH keys under Profiles.
  5. Click on “ADD SSH KEY” under SSH Keys.
  6. Provide Label name under Label, Add the public ssh key under Public Key then click on ADD Key.
  7. Go to the Gitlab console and click on the refresh button and check the sync is happening or not.


4.    Add Domain URL to Environments

Acquia will provide the environments with the default Cloudflare CDN URLs. Once the network team provides the

domain names of environments add them to Acquia console and  Cloudflare.

  1. Login to Acquia Console.
  2. Go to All Applications and select the application.
  3. Under Environments page click on the Environment where we need to add the domain.
  4. Click on “Domains” under environment page, then click on Add Domain on top right corner. Provide the domain name of the environment under Add a domain pop up window. Next click the “Add Domain” tab.
  5. Log in to the Cloudflare console of the project.
  6. Select the account of the project and select the site.
  7. Click on “DNS” tab
  8. Provide the record as “A”, Name as name of the environment, IP Address of the Load Balancer URL of Acquia for that environment, select the “Automatic TTL” and then click on “Add Record” to add the domain record.


5.    SSL Certificate Installation

  1. Click on “DNS” tab
  2. Create the certificate request to get the signed certificate from the Certificate Authority.
  3. Login to Acquia Console
  4. Select the Application under the All Applications. Go to Environments select the environment where the certificate needs to be created.
  1. Click on the SSL on the left navigation pane.
  2. Click on Generate CSR on top right.
  3. On generate signing request page provide the certificate details and click on GENERATE CSR.
  4. Certificate signing request will be created on the Acquia console and the ‘.key’ file and ‘.csr’ will be created in the backend server under the environments SSL directory.
  5. Share “.csr “ and “.key” file to the Certificate authority. Once the certificate chain received from CA install the certificates.
  6. Login to Acquia Console and got Application under All Applications.
  7. Select the environment where the certificate chain needs to be installed.
  8. Click on “Install Certificate” on the top right corner.
  9. Under the Install certificate page provide the certificate chain details.
  10. Provide the certificate label name which is to display for the certificate.
  11. Copy and paste the SSL certificate (stg_capella_edu.cer) under SSL Certificate box.
  12. Copy and paste the ssh.key under SSL Private Key box (ssh.key, which is created in backend server under environment/ssl folder while generating certificate request)

Ex: /mnt/gfs/<environment name>/ssl/ssl.key

  1. Copy and paste DigiCertCA2.cer under CA intermediate certificates box.
  2. After filling all the above details click on Install at the bottom of the page.
  3. It will take a while to install the certificate.
  4. Once the certificate installation completed. Clear the varnish cache of the environment.
  5. After the completion of the certificate installation on Acquia Console, login into the Cloudflare console to install the SSL certificate.
  6. Click on the domain where the certificate needs to be installed.
  7. Click on “Crypto”
  8. Click on “Upload Custom Certificates” under Edge Certificates.
  9. On upload custom SSL certificate and key page, provide the SSL key and certificate details.
  10. Under “SSL Certificate” copy and paste the certificate (ex: stg_capella_edu.cer).
  11. Under “Private Key” copy and paste the ssl.key (which is present in backend server environment/ssl directory)

Ex: /mnt/gfs/<environment name>/ssl

  1. Click on “Upload Custom Certificate”
  2. Once Certificate upload completed purge the cache
  3. Click on “Caching” in the top menu bar.
  4. Under ‘Caching’ click ‘Purge Everything’.
  5. On “Confirm purge everything” pop-pup window, click on “Purge Everything”.
  6. After the successful installation of the SSL certificate, validate the certificate status on the application.
  7. Hit the application where the SSL certificate is installed.
  8. Click “lock” symbol, shown in the below screenshot.
  9. Click on “Certificate (Valid)”. Certificate Information pop will display on the page.
  10. Confirm showing the right certificate or not (showing the same certificate, what have been installed on the application).



About The Author