-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# run shoulder-check-minters command to check minters before running deployment | ||
python manager.py shoulder-check-minters | ||
|
||
# fix minter issues if needed | ||
|
||
# | ||
## update/deploy EZID code | ||
# set DB user to eziddba | ||
|
||
echo "shutdown EZID servies" | ||
sudo cdlsysctl stop ezid | ||
sudo cdlsysctl stop ezid-proc-* | ||
|
||
echo "backup minter files" | ||
timestamp=`date '+%Y%m%d%H%M%S'` | ||
minters_bk="minters.${timestamp}" | ||
|
||
cp -r ~/var/minters ~/var/${minters_bk} | ||
|
||
echo "backed up minter files to ${minters_bk}" | ||
|
||
echo "Generate a data migration files" | ||
python manage.py makemigrations | ||
|
||
echo "Apply the migration file to the database" | ||
python manage.py migrate | ||
|
||
echo "run minter data migration script" | ||
python manage.py migrate-minters-to-mysql | ||
|
||
echo "rename var/minters to disable BDB minter" | ||
mv ~/var/minters ~/var/minters.sql_migration | ||
|
||
echo "renamed to ~/var/minters.sql_migration" | ||
|
||
echo "restart EZID services" | ||
sudo cdlsysctl start ezid | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# checkout latest BDB version | ||
git checkout tags/3.1.8 -b v3.1.8-before-minter-migration | ||
|
||
# make sure the /apps/ezid/var/minters directory and files are in place | ||
|
||
# compare the outputs from BDB and mySQL version minters | ||
# run the shoulder-check-minters command, to check the identifiers to be minted | ||
# compare the outputs from BDB and mySQL version minters | ||
python manage.py shoulder-check-minters > check-minters_bdb.out | ||
|
||
# get the output in branch 87_Berkeley_DB_migration | ||
git checkout 87_Berkeley_DB_migration | ||
|
||
python manage.py shoulder-check-minters > check-minters_sql.out | ||
|
||
# compare the outputs - the same minter should generate the same next ID | ||
INFO shoulder-check-minters - doi:10.7941/D1 OK: Preview of next ID: doi:10.7941/D1Q33B | ||
|
||
|
||
# test a minter can be extended | ||
# create a test minter with default mask xxx with a initial capacity of xxx identifiers, | ||
# create xxx+ 10 identifiers to verify the minter can be automatically extend itself | ||
|
||
git checkout v3.1.8-before-minter-migration | ||
|
||
python manage.py shoulder-create-ark ark:/12345/jj1 test-minter-jj1-for-migration | ||
|
||
python manage.py shoulder-mint ark:/12345/jj1 -c 10000 > ark12345_jj1.ids.bdb | ||
|
||
# delete shoulder etnry ark:/12345/jj1 from the shoulder table | ||
# switch to the checkout 87_Berkeley_DB_migration branch | ||
|
||
git checkout checkout 87_Berkeley_DB_migration | ||
|
||
python manage.py shoulder-create-ark ark:/12345/jj1 test-minter-jj1-for-migration | ||
|
||
python manage.py shoulder-mint ark:/12345/jj1 -c 10000 > ark12345_jj1_sql.ids | ||
|
||
|
||
|