-
Notifications
You must be signed in to change notification settings - Fork 0
How to perform a Bugs Import
Roger Mähler edited this page Mar 12, 2020
·
17 revisions
This guide gives instructions on how to perform a complete Bugs import; starting from downloading the BugsCEP database and all the way to committing an incremental data change to the SEAD staging databas via the SEAD change control system.
- xxx
You will need the following:
- A system user on the SEAD production server (seadserv.humlab.umu.se).
- The system user must be member of the
docker
group. - An understanding of the SEAD change control system.
- A database system user with somewhat elevated privileges (create database).
- A window of time where the SEAD staging database is frozen.
The following assumes that you are logged on to the SEAD produciton server.
- Use
git clone
orgit pull
to check out the latest versions ofsead_change_control
andsead_bugs_import
. To replace the existing repositories, you can execute the following commands:
% mkdir -p ~/source && cd ~/source && rm -rf sead_change_control sead_bugs_import
% git clone https://github.com/humlab-sead/sead_change_control.git
% git clone https://github.com/humlab-sead/sead_bugs_import.gi
- Create a new Bugs SEAD staging database. Note this will overwrite the target database! Normally you would want to use current production database as the source. If there are pending change requests can will affect the Bugs import, then it would be better to use the current (soon-to-be production) staging database where those changes have already been deployed.
~/source/sead_change_control$ ./copydb.sh --source sead_production --target sead_staging_bugs --force --sync-sequences
- Make sure that the Bugs Import docker image is up-to-date:
~/source/sead_bugs_import/docker$ make
- Set Bugs configuration elements used by the import system. These settings can be specified as environment variables passed on to the Docker image. You can specify these variables as variables in the host system, or in a
.env
file residing in the import directory.
BUGSIMPORT_DBHOST=name-of-sead-production-server
BUGSIMPORT_DBPORT=5432
BUGSIMPORT_DBNAME=target-staging-database
BUGSIMPORT_DBUSER=database-user
BUGSIMPORT_DBPASSWORD=database-password