Aggregate AppEngine Master Slave Migration
Google is deprecating the Master Slave datastore. This document describes the steps needed to migrate your ODK Aggregate instance to the new HRD (High Replication Datastore).
ODK Aggregate 1.3.0 installer now supports the migration mechanism. You just need to follow the instructions on the Google site, and can ignore the steps detailed below. You do need to run the installer to produce an install image for the new HRD deployment. When you do this, there is now a checkbox on the installer's "Google AppEngine application ID" prompt screen that asks whether this was or is being migrated from a Master-Slave datastore. If you check that checkbox, you will be asked what the original application id was for your app. Given the new and old application ids, the installer can then generate an install image for the new application id that will properly handle requests sent to the older application id (all users and all ODK Collect clients should continue to use the older application id).
ODK Aggregate 1.2.0 installer does not support the migration mechanism. It is recommended that you do not upgrade at this time. If you must, the steps are outlined below. The manual steps that an updated installer will eliminate are highlighted in blue.
Your application will be inaccessible for a short period of time during the migration (during the read-only period prior to the finish of migration).
The overall steps are to (1) duplicate your application, with the duplicate using the HRD, (2) copy the bulk of your data over in the background, (3) enter a read-only period where all residual data is copied over, (4) finish the migration, switching to use the copy of the application that is running on the HRD.
During phase (3), the application will be unavailable.
- Go to: https://appengine.google.com/
- Click on the application id you wish to migrate.
- Click on "Application Settings" in the left sidebar.
- Scroll down to the "Duplicate Application Settings" heading.
- A new application id, with "-hrd" appended, is proposed.
- Click on "Check availability"
- If 'No', then edit the proposed application id, renaming it until it is available.
- Otherwise, the proposed "New Application Identifier" is available. Click "Duplicate Application..."
- Switch to that application id in the appengine console (click here: https://appengine.google.com/ and choose the new application identifier).
- Click on "Billing Settings" in the left sidebar
- Enable billing if you have billing enabled for the application id you are migrating. Specify the same quota limits, etc. as in that existing application.
- Run the ODK Aggregate installer (download it here: https://opendatakit.org/downloads/). NOTE: if you have an ODK Aggregate 0.9.x instance, you must use the v0.9.8.1 zip. To migrate from 0.9.x to 1.x, see 0.9.x migration instructions.
- The following instructions are specific to the ODK Aggregate 1.x installer. For 0.9.x systems, deploy the ODK Aggregate 0.9.8.1 software up to the new application id. We no longer support 0.9.8.1 therefore we have not verified that migration works on that system. 1. Be sure to specify the same "ODK Aggregate Instance Name" when prompted. Any changes to this name will invalidate all user passwords. If you have forgotten what you entered here, see the Retrieving ODK Aggregate Instance Name section below. 1. When prompted for the "Google AppEngine application ID", specify the existing Application Identifier that you are migrating.
- Do not choose to upload this app (uncheck the final checkbox).
- Open a browser to the location where the installer files were placed.
- Navigate to ODKAggregate/WEB-INF/
- Open appengine-web.xml in an editor (e.g., Notepad++)
- Change the value for the
<application>
entry from the application id that is being migrated to the "New Application Identifier" from above. Save and exit.
- Proceed with uploading this new app to Google AppEngine. Do this by clicking on the "uploadAggregateToAppEngine..." file
From now on, you will need to follow the install steps above to deploy updated versions to the new application id that expect communications to arrive via the old application id.
The easiest way to retrieve the ODK Aggregate Instance Name is:
- Go to: https://appengine.google.com/
- Click on the application id you wish to migrate.
- Click on "Logs" in the left sidebar
- Open the "Options" expander
- Enter
afterPropertiesSet:
in the Filter: field. - Click "Search"
- Using your browser's find-in-page search capability, search for
afterPropertiesSet: RealmString:
- you will find an entry like:
afterPropertiesSet: RealmString: My Test Instance ODK Aggregate
- The ODK Aggregate instance name is everything between
RealmString:
(beginning after the trailing space), and the finalODK Aggregate
(ending before the leading space). In this case, the ODK Aggregate instance name wasMy Test Instance