From 647afd00e82b1037c976f6167fe793b9b5eca207 Mon Sep 17 00:00:00 2001 From: Chris Thompson Date: Tue, 30 Jul 2019 15:16:58 -0400 Subject: [PATCH 1/3] Add deployment instructions --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ae9ca6e..df49c88 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ ddev . drush -y site:install minimal --existing-config ``` -## Running the migration. +## Running the migration in development Put the D7 files in the following location: ``` @@ -60,3 +60,24 @@ Once the files are in the correct place and the database has been created we can ``` ddev . drush mim --group="migrate_drupal_7_geo" ``` + + +## 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` +- Read the db source into the proper database: `mysql geo_legacy < 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). +- 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`) and run the migration: +- `drush mim --group="migrate_drupal_7_geo"` From c93d010a27e05e2e5a1fbdae7223f03b66c70b87 Mon Sep 17 00:00:00 2001 From: Chris Thompson Date: Tue, 30 Jul 2019 15:40:32 -0400 Subject: [PATCH 2/3] Correct indentation in README --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index df49c88..7994b90 100644 --- a/README.md +++ b/README.md @@ -66,18 +66,18 @@ ddev . drush mim --group="migrate_drupal_7_geo" 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` + - 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` -- Read the db source into the proper database: `mysql geo_legacy < 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). -- The server side is ready! Log off by typing `ctrl+d` + - 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` + - Read the db source into the proper database: `mysql geo_legacy < 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). + - 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` + - `ahoy deploy-build news` + - `ahoy deploy-site geo_live` 1. Return to the server (`ssh geo_live@drutopia.org`) and run the migration: -- `drush mim --group="migrate_drupal_7_geo"` + - `drush mim --group="migrate_drupal_7_geo"` From 0261233e2eeb863ad19f0ca38f01bd07fd635a0d Mon Sep 17 00:00:00 2001 From: Chris Thompson Date: Tue, 30 Jul 2019 15:51:53 -0400 Subject: [PATCH 3/3] Fix indentation...take two. Add post-live tasks --- README.md | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7994b90..ace8186 100644 --- a/README.md +++ b/README.md @@ -66,18 +66,28 @@ ddev . drush mim --group="migrate_drupal_7_geo" 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` + - 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` - - Read the db source into the proper database: `mysql geo_legacy < 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). - - The server side is ready! Log off by typing `ctrl+d` + - 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` + - Read the db source into the proper database: `mysql geo_legacy < 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). + - 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` + - `ahoy deploy-build news` + - `ahoy deploy-site geo_live` 1. Return to the server (`ssh geo_live@drutopia.org`) and run the migration: - - `drush mim --group="migrate_drupal_7_geo"` + - `drush mim --group="migrate_drupal_7_geo"` + +## Post go-live tasks + +1. Remove all d7 files: `rm -rf site/d7` and `rm geo_legacy.sql`, etc. +1. Change the site settings in hosting: + - config_import -> True + - php_settings_code -> blank +1. Change the news build settings in hosting: + - remove custom build commands (i.e. sed) +1. At this point, the deploy should be typical (deploy-build/deploy-site as normal)