Acquia and Drush production push steps

Thanks to Dan Shumaker for this:
"
Acquia & Drush production push steps
For reference and discussion, here are the steps I do for a push to production servers from a staging server using the Acquia environment and drush. A client just asked what he recommends and so I wrote this:

Requirements: Must have drush aliases and acquia drush config in place. This example uses aliases, shells, machine names and domains from a site called 'example'.

1. drush @example.prod ac-database-instance-backup example // This backs up the prod database
2. drush @example.test ac-code-deploy prod // This deploys the code from staging to prod
3. drush @example.test ac-files-copy prod // This copies the drupal content editor uploaded files from staging to production
4. drush @example.test ac-database-copy prod // This copies the database from stage to prod
5. ssh ded-4123.prod.hosting.acquia.com "memflush --server=localhost:11211" // This clears the memcache cache so you make sure you are seeing the new files.
6. drush @example.prod ac-domain-purge example.prod.acquia-sites.com // This clears the varnish cache so you make sure you are seeing the new changes.
7. drush @example.prod en dev_env -y // This turns on the dev_env module so the correct environment variables are set
8. drush @example.prod vset drupal_stale_file_threshold 1 -y // This forces a clear cache to get rid of all old cache css and javascript files.
9. drush @example.prod cc all // Clears all drupal caches.
10. drush @example.prod vset drupal_stale_file_threshold 172800 -y // This sets threshold back to normal value.
11. drush @example.prod dis dev_env -y // This turns off the dev_env module so that settings can be overridden if need be.
12. drush @example.prod updb -y // This runs the update script so that any necessary database updates are run if necessary (but shouldn't be).
13. drush @example.prod dis shield -y // This turns off the shield module.

I've got a script that does all this with one command. You can do steps 1-4 with the Acquia hosting admin interface. You can do steps 7,9,11,12, and 13 through the drupal interface. Steps 5,6,8, and 10 can only be done on the command line to my knowledge.

Let me know if you like to use the script : https://github.com/danshumaker/ac-deploy

"

Article Type

General