From 4e182eba8e53755b92430d57965d6fdd7c9aab9e Mon Sep 17 00:00:00 2001 From: Chris Thompson Date: Sun, 29 Sep 2019 23:17:54 -0400 Subject: [PATCH] Update and simplify deployment instructions --- README.md | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index b072dd4..cc41668 100644 --- a/README.md +++ b/README.md @@ -77,24 +77,18 @@ Note: The migration will partially fail because of missing files. For now, re-ru ## Running the migration on the hosted instance -1. Ensure the files you need are uploaded to the server. Obtain the latest from the prior site: database, and files. Upload these to the server (e.g. `scp *.gz geo_live@drutopia.org:`) and we'll extract them there. -1. If a deployment has been performed already, it must be moved out of the way by removing existing databases. Log into the server (`ssh geo_live@drutopia.org`) and remove the database(s): - - Start the mysql client (logged into geo_live): `mysql` - - Drop the drupal db: `drop database geo_live;` - - Drop the migration source db: `drop database geo_legacy;` - - Exit mysql by typing `ctrl+d` -1. Extract the uploaded files (still on server): - - Unzip the uploaded database file (this expects there to be only ONE such file): `gunzip *.mysql.gz` - - Rename the database file: `mv *.mysql geo_legacy.sql` - - Unpack the files, but first cd to where they go (again, there should only be ONE file ending in .tar.gz in home): `cd site/d7/sites/default/files/` and untar: `tar xzf ~/*.tar.gz` (this will take a minute/two). +1. Refresh files and database from live. + - Obtain the latest from the prior site via [Migrate and Backup](http://geo.coop/admin/config/system/backup_migrate): database, and public files, as two separate downloads. The following commands assume the files saved as `files.tar.gz` and `database.sql.gz` + - Upload these to the server: `scp *.gz geo_live@drutopia.org:` + - SSH to server: `ssh geo_live@drutopia.org` + - Unzip the uploaded database file: `gunzip database.sql.gz` + - Drop the existing tables: `drop-tables.sh geo_legacy` + - Reload the uploaded database: `mysql geo_legacy < database.sql` + - Change to the files folder and untar them: `cd site/d7/sites/default/files/` and then: `tar xzf ~/files.tar.gz` (this will take a couple minutes). - The server side is ready! Log off by typing `ctrl+d` -1. Now perform a deployment with drutopia_hosting. This will install the site using the minimal profile and existing config: - - `ahoy deploy-build news` - - `ahoy deploy-site geo_live` -1. Return to the server (`ssh geo_live@drutopia.org`), load legacy db and run the migration: - - Read the db source into the proper database: `mysql geo_legacy < geo_legacy.sql` - - `drush mim --group="migrate_drupal_7_geo"` - - `drush php:script article_type_term.php` +1. Now perform a deployment with drutopia_hosting. This will install the site using the minimal profile and existing config. Set the vars accordingly (drupal_install and drupal_forceinstall must be True), if needed: `ahoy vault-edit` + - Deploy a new build, as needed: `ahoy deploy-build news` + - Deploy the site. With a forced re-install, a migration will be performed automatically: `ahoy deploy-site geo_live` ## Post go-live tasks