Wickford → Jamestown Order Migration Instructions Updated 10/22/13 To test migration you will need: - the Jamestown data util jar (AML Data Tool project in Jenkins) - the Jamestown sapi build - the Jamestown core and bidmgr builds * The following instructions assume the AML Data Tool jar has been renamed “datautil.jar” * 1. Stop tomcat, jboss and the listener 2. Take a backup the entire database**. Also take a backup of elastic search (/usr/local/elasticsearch/data). Example for taking a backup of the smb and content_repository databases: mysql -uspike -p{$password} -htsa-aq-mysql1 smb < /path/to/directory/smb.sql mysql -uspike -p{$password} -htsa-aq-mysql1 content_repository < /path/to/directory/content_repository.sql 3. Run the data util to initialize content_repository to version 2.2: Example: java -jar datautil.jar init -uspike -p{$password} -htsa-aq-mysql1 -schema "content_repository" 4. Migrate content_repository to version 2.3. This adds 2 new tables (generated_ad_content, and generated_ad_assignments) and makes a minor alteration to the contentAssignments table. Example: java -jar datautil.jar migrate -uspike -p{$password} -htsa-aq-mysql1 -schema "content_repository" -t 2.3 5. Migrate smb to version 2.3. This reindexes ES. You will be promted to enter the search server and port number. For dev the search server is 'aq-dev-search1' and the port number is '9301'. Example: java -jar datautil.jar migrate -uspike -p{$password} -htsa-aq-mysql1 -schema "smb" -t 2.3 6. Put the new sapi, core, and bidmgr builds up and start the system. Upon sapi startup the Order Service gets a list of orders from ES. It normalizes all the locales and gets ad content for the orders. Each assigned ad gets an entry in the content_repository.generated_ad_assignments table (where principal_id is the merchant id) and the content is stored in the content_repository.generated_ad_content table. ** A note on backing up the database: This migration only changes the smb and content_repository databases. Taking a backup of just these two is fine if you would only like to test migration and an immeadiate rollback. The moment you start using a migrated system (e.g. you redeploy an order) you begin editing databases other than smb and content_repository and need to have those databases backed up as well. This is why the instructions say to backup the entire database.