All work

Select view

Select search mode

 
31 of 31

Final verification migration scripts before release Q2 2020

Done

Description

Process described on #releases channel here https://folio-project.slack.com/archives/CGPMHLX9B/p1590164280223800

Ask if you have questions.

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Details

Assignee

Reporter

Labels

Priority

Story Points

Sprint

Development Team

Prokopovych

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created May 26, 2020 at 1:23 PM
Updated June 11, 2020 at 4:59 PM
Resolved June 2, 2020 at 10:11 AM

Activity

Show:

Marc JohnsonJune 2, 2020 at 3:47 PM

Thanks

Here is a list of the steps that were undertaken (I think this approach would be significantly harder if there were breaking compatibility changes in the module)

Bohdan SuprunJune 2, 2020 at 11:57 AM

,

I did the following to verify.

Identify changes since the v19.1.0 (using Inteliji idea IDE):

  1. Chose Git tab -> Log, chose branch HEAD;

  2. Search for v19.1.0 tag;

  3. On the commit tagged as v19.1.0 right click and chose Compare with Local

  4. You'll see the diff since v19.1.

  5. Then inspect schema.json and identify db changes;

Set-up vagrant box:

  1. Create Vagrantfile in a directory (e.g. D:\Vagrant\release) with following content:

  2. vagrant up

  3. Verify that the system is up and running by log in via http://localhost:3000

Connect to the remote DB:

  1. Using a DB client (e.g. I used DBeaver) connect to the remote db:

  2. Verify the initial DB structure/set-up some test data/etc.

Build docker image:

  1. Build the project

  2. Copy the project to the same directory with the Vagrantfile (e.g. D:\Vagrant\release\mod-inventory-storage);

  3. Login to the vagrant box using vagrant ssh;

  4. Inside vagrant box execute:

    1. cd /vagrant/mod-inventory-storage

    2. sudo docker build -t mod-inventory-storage:1.0 .

Deploy the module to local okapi (http://localhost:9130):

  1. DELETE /_/discovery/modules/mod-inventory-storage-19.1.2

  2. POST /_/proxy/modules, body=ModuleDescriptor_template.json, but with following changed:

    • id = mod-inventory-storage-19.2.0

    • launchDescriptor.dockerImage = mod-inventory-storage:1.0 (the one we built above)

  3. POST /_/discovery/modules with body:

  4. POST /_/proxy/tenants/diku/upgrade, body tenantParameters=loadReference=true

  5. DELETE /_/proxy/tenants/diku/modules/mod-inventory-storage-19.1.2

  6. DELETE /_/proxy/modules/mod-inventory-storage-19.1.2

Verify migration result

Connect to the remote DB again and verify the expected changes.

Verify that DB can be initialized from the scratch.

  1. Drop the DB schema diku_mod_inventory_storage;

  2. Deploy module with new version e.g. mod-inventory-storage-19.2.1

  3. Verify DB structure.

Marc JohnsonJune 2, 2020 at 10:57 AM

Please could you outline the steps you took to do this work. The instructions I provided were rather vague and it might be useful to feed back how you actually did the work.

Dmytro PopovJune 2, 2020 at 10:11 AM

Updates to the database made for OAI-PMH are in the list. Thanks for checking in.

Bohdan SuprunJune 2, 2020 at 10:10 AM

All migrations handled correctly.

Closing the ticket.

TestRail: Cases
TestRail: Runs