Closed datadavev closed 2 years ago
Procedure for upgrading the production python 2 version of EZID to python 3.
See this spreadsheet for the production upgrade list: https://docs.google.com/spreadsheets/d/1HDVxR_0aaqDGi_oNstUzelNIsXS_qJw1GJRRgZkchJY/edit?usp=sharing
The upgrade procedure involves significant database migration that is not reversible, except to restore the database as it existed prior to migration. Hence a complete copy of the application and database must be made before migration to ensure a viable recovery path.
Herein: Old host = production 01
, new host = production 02
uc3-ezidui01x2-prd
rds-ias-ezid-search4-prd
uc3-ezidui02x2-prd
rds-uc3-ezid5-prd
Zoom Call start
uc3-ezidui01x2-prd
cron
)python3 downserver.py localhost 18880 "EZID is intentionally offline for maintenance, check status at <a href=''>EZID Status page</a>."
uc3-ezidui01x2-prd
to new uc3-ezidui02x2-prd
instanceuc3-ezidui02x2-prd
(total time ~15hrs)
$ pip install mysql.connector
eziddba
with appropriate pw for login in settings.py
migrate_db_to_py3/run-migration.py | tee migrate_log.txt
This process runs several tasks against the database and will take several hours in total.ezidrw
with appropriate pw in settings.py
manage.py diag-update-admin
Start Zoom call
uc3-ezidui01x2-prd
from load balancer configurationuc3-ezidui01x2-prd
are disabled.uc3-ezidui02x2-prd
to the load balancerIf migration fails during downtime (no changes to production data):
uc3-eziui01x2-prd
uc3-eziui01x2-prd
uc3-ezidlinkcheck01x2-prd
uc3-ezidlinkcheck01x2-prd
uc3-eziui01x2-prd
to ALB TargetGroup uc3-ezidui-prd-tg
uc3-ezidui02x2-prd
from ALB TargetGroup uc3-ezidui-prd-tg
uc3-ezidui02x2-prd
ezid-proc-*
services on host uc3-ezidui02x2-prd
Need to prepare detailed steps for the process of upgrading an environment to use the python 3 implementation