These are my private notes on Live Development on Acquia Drupal sites. They may be a little sparse and lacking a few details but they work. I made this due to a lack of details in Acquia’s documentation. Consider it a git cheat sheet for dummies :)

How to do Live Development on Acquia Drupal

1. Enable live development

  1. Login to Acquia.
  2. On the Cloud > Workflow page, open the menu for your environment, and then click Enable Live Development.
    Acquia enable live development
  3. In the confirmation message, click Enable.

Note: Live Development can be enabled for Dev or Stage environments but not for the Prod environment.

2. How to connect via SSH

First, we’ll use PuTTYgen to generate our public and private keys.

  1. Download PuTTYgen.
  2. Launch PuTTYgen, and then click the Generate button to generate your keys.
  3. Enter a unique key passphrase in the Key passphrase and Confirm passphrase fields.
  4. Save the both the public and private keys by clicking the Save public key and Save private key buttons.
  5. Click into the Public key for pasting into OpenSSH authorized_keys file field and copy all the text to your clipboard by pressing Ctrl-C.

Next, we’ll add our public key to Acquia

    1.  Click here to access your Acquia account’s Credentials area.
    2. On the Credentials page, under SSH keys, click Add SSH key.
    3. Enter the SSH key nickname, which should indicate the owner of the key (aka you)
      cloud-add-ssh-u
    4. Paste the OpenSSH-formatted key into the SSH public key field. OpenSSH public keys start with ssh-dss or ssh-rsa.
    5. Click Add key.

Now we’ll add our private key to Filezilla (which is quicker and easier than futzing about with the command line for transferring files).

  1. Our key is in OpenSSH format and will need to be converted to PuTTY’s PPK format. Launch PuTTYgen and from the “Conversions” menu, select the “Import key” option. Select the private key and follow the prompts to enter your pass phrase. Save your private key.
  2. If needed, download Filezilla and install it.
  3. Click on Edit > Settings and go to Connection > SFTP. Click the Add key file button to import your private key.
    Add private key to Filezilla
  4. Now you can launch Filezilla and connect to Acquia via SFTP.

You can use Filezilla for file transfers and Putty for committing files to git.

Login to Acquia with Putty

SSH command format: ssh sitename.environment@target_server.prod.hosting.acquia.com

SSH password: the ‘nickname’ for the public key (as set in Acquia)

  1. Open Putty
  2. Type in ssh sitename.environment@servername.prod.hosting.acquia.com
    sitename: the name of the site, as set in Acquia
    environment: either dev or stage
    servername: Go to the User and keys page at Cloud > Users and keys to find both the sitename and servername.
  3. Hit enter
  4. Enter the password at the next prompt, then hit enter
  5. Boom – you should now be connected via SSH.

3. Move files

Use FileZilla to move files back & forth between your local environment and Acquia. SFTP access works *only* if Live Development is enabled. At that time, you will be able to find this directory:

/vol/ebs1/gfs/[sitename][env]/livedev/docroot

For example, if your sitename is Sunrise and the environment is development, you would go to this directory (notice the lack of brackets):

/vol/ebs1/gfs/sunrisedev/livedev/docroot

4. Committing files

Once you’re done editing files and uploading them, you need to commit them. If files are not committed ALL CHANGES WILL BE LOST. This is a must for working with Acquia. Committing files is done via SSH with Putty.

  1. Connect via PuTTY (or Terminal on Mac)
  2. Navigate to the /livedev  directory, like $ cd vol/ebs1/gfs/[sitename][env]/livedev
    1. The command $ cd /path/directory/name can be used to navigate to a specific directory
    2. $ cd .. can be used to move up into the containing directory (like from /sitename/path/directory to /sitename/path)
  3. Use the following commands in sequence:
    1. $ git status –  this will show you what files need to be committed
    2. $ git add .  – this tells git that you want ALL uncommitted files to be committed
    3. $ git commit -m “Commit message (what changed?)” – this tells git you want to commit and adds a descriptive message so you know how this commit is different from others
    4. $ git push – pushes all changes to git – basically they are set in stone at a particular point in time

5. How to check if commit successful

Run the $ git status command again. If you followed the above instructions correctly, it should not list any changed files. If it lists changed files then you need to commit your changes properly (ie repeat the previous step).

6. Turn off Live Development

Once all changes are committed and $ git status shows no changed files, you can safely turn off Live Development without losing any change.

  1. Go to your Cloud > Workflow page in Acquia
  2. Open the menu for your environment
  3. Turn off Live Development

Once Live Development is off, you’ll be able to drag your changed code from one environment to another.

Reader Interactions

Leave a Reply