Managing your workflow
Use the Workflow page at Cloud > Workflow to manage your code, files, databases, and to make backup copies of your website's databases.
Each new site in Acquia Cloud has three available environments:
|Environment||Short name||Code name|
Acquia Cloud Enterprise sites may have additional environments, while Acquia Cloud Free sites do not have a Production environment. The code name is used in pathnames and in API calls, among other places. If you are in any doubt about the code names of your environments, you can get a list with the drush ac-environment-list command.
On the Cloud > Workflow page, you can deploy code, database, or files from one environment to another with a simple drag and drop.
Any of the environments can deploy any code branch or tag from your code repository. When an environment is set to a branch, it always deploys the most recent code (the HEAD) of that branch, and deploys new commits to the branch. When an environment is set to a tag, it deploys that exact tag until you use the Workflow page to deploy another branch or tag. Generally, you want the Dev environment to deploy your primary development branch, which might be
/trunk in SVN or
master in Git. The Stage and Prod environments are best used for deploying named tags in your repository so that the code you test or run in production is always an exact known entity. It's especially important to run a tag, not a branch, on your Prod environment. Otherwise, code changes can be made directly to your live production website without prior testing by committing to the branch.
When you use the Workflow page to drag code from one environment to another, Acquia Cloud does one of two things. If the source environment is running a branch (such as
/trunk in SVN or
master in Git), Acquia Cloud creates a new symbolic tag that points to the most recent commit on that branch, and then changes the target environment to run the new tag. If the source environment is already running a tag, Acquia Cloud changes the target environment to run the source tag. It does not create a "tag of a tag."
You can deploy any directory (containing a Drupal docroot subdirectory) to your live web server. On the Workflow page, you can see which path is deployed and change it by choosing a tag or entering the path to the new deployment branch in the text box.
When you drag databases or your website's files from one environment to another, Acquia Cloud copies them from the source to the target environment. You can copy any database or file from any environment to any other, except when you are in Production mode. In Production mode, you cannot copy a database or file to the Prod environment.
The Cloud > Workflow page displays a link to the website URL for each environment. Click the link to visit the website in a new window.
Updating the Dev and Stage environments
As an alternative to dragging your code, databases, and files between environments individually, you can update the code, databases, and files in your Dev or Stage environments from the menus on the Workflow page. Before you use this feature to overwrite your databases, you may want to make a backup of your database first.
Updating Dev from Prod
To see what your Dev environment looks like with the latest configuration and content from your live site, the Dev environment's databases and files need to be synced with the Prod environment. You can drag them individually to the Dev environment on the Workflow page, or you can use the menu. To update your Dev environment with the databases and files of your Prod environment using the menu:
Click the menu in the Dev environment and click Copy content from Prod.
Select Copy all databases from Prod to Dev, Copy all user-uploaded files from Prod to Dev, or both, and click Submit.
Updating Stage from Dev and Prod
To test your latest changes on the Stage environment, you should update your Stage environment with the code from your Dev environment and the databases and files of your Prod environment. You can drag them individually to the Stage environment on the Workflow page, or you can use the menu:
Click the menu in the Stage environment and click Update code and content.
Select one or more of Deploy code from Dev to Stage, Copy all databases from Prod to Stage, and Copy all user-uploaded files from Prod to Stage, and click Submit.
Acquia Cloud updates the databases and files of your Stage environment by copying the Prod databases and files over into the Stage environment, and updates the code of your Stage environment by copying the code from your Dev environment.
Protecting the Dev and Stage environments
By default, your Dev and Stage environments can be viewed by anyone on the internet who has the URL. Acquia Cloud uses a
robots.txt file to disallow indexing of those domains by search engine robots, so they should not be discoverable through search. You can further protect your Dev and Stage environments by adding password protection. For more information, see Password Protect Non-Production Environments.
If you are an Acquia Cloud Enterprise customer, you may want more environments than the Dev, Stage, and Prod environments you get initially. For information about how to set this up, see Additional environments for Acquia Cloud Enterprise.
When you first create a site, the Prod environment is in Pre-launch mode. When you are ready to publish the site, you should change it to Production mode. In Pre-launch mode, you can freely drag your files or database to the Prod environment. In Production mode, you cannot copy your files or database to the Prod environment. This protects you from possibly destroying your live website by overwriting your Prod files and databases.
To change your Prod environment's mode:
Sign in to Acquia, select your site, and then open the Workflow page at Cloud > Workflow.
- Open the menu in the Prod environment, and then click either Switch to Pre-Launch mode or Switch to Production mode.
- Click Change mode.
Generally, you copy databases and files up to the Prod environment only until you first launch your website. After that, you push code to Prod, but you pull databases and files backwards from Prod to Stage and Dev for testing and development.