Info |
---|
WIP document pending 8.0 release. |
Requirements
Ruby 3.x 3+ and Node.js x.x 20 are recommended.
Config changes
TODO
Troubleshooting
Checking that export and migration are complete
Restarting export or migrations in case of errors
Upgrade Steps
For Manual Installations
Pre-upgrade steps
Ensure section_list migration has been run (See https://samvera.atlassian.net/wiki/spaces/AVALON/pages/2580086785/Upgrading+Avalon+7.7+to+Avalon+7.8#MediaObject-Section-List-Migration)
Export Fedora 4 repository and migrate it to Fedora 6 OCFLInstall ruby 3.2
Code Block cd /tmp mkdir fc4_to_fc6 cd fc4_to_fc6 # Setup Java 21+ (if needed) curl -O -L https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-x64_bin.tar.gz tar xvzf openjdk-21_linux-x64_bin.tar.gz # Download specific version of import/export tool curl -O -L https://github.com/fcrepo-exts/fcrepo-import-export/releases/download/fcrepo-import-export-1.2.0/fcrepo-import-export-1.2.0.jar # Export from fedora 4 jdk-21/bin/java -jar fcrepo-import-export-1.2.0.jar -b --dir fcrepo4.7.5_export --user fedoraAdmin:fedoraAdmin --mode export --resource http://fedora:8080/fedora/rest --binaries --membership --auditLog > importexport_`date +%Y%m%dT%H%M%S`.log 2>&1 # Download specific build of upgrade-utils # Run migration Fedora 4 -> Fedora 5 (inside container again) jdk-21/bin/java -jar fcrepo-upgrade-utils-6.4.0-SNAPSHOT.jar --input-dir fcrepo4.7.5_export --output-dir fcrepo5_export --source-version 4.7.5 --target-version 5+ > upgrade_5_`date +%Y%m%dT%H%M%S`.log 2>&1 # Run migration Fedora 5 -> Fedora 6 jdk-21/bin/java --add-opens java.base/java.util.concurrent=ALL-UNNAMED -jar fcrepo-upgrade-utils-6.4.0-SNAPSHOT.jar --input-dir fcrepo5_export --output-dir fcrepo6_export --source-version 5+ --target-version 6+ --base-uri http://fedora:8080/fedora/rest > upgrade_6_`date +%Y%m%dT%H%M%S`.log 2>&1
Setup Fedora 6 (See https://wiki.lyrasis.org/display/FEDORA6x/Deployment )
Copy migrated Fedora 6 OCFL directory to
fcrepo.home
and restart Fedora
Upgrade steps
Install ruby 3.3.x (if needed)
Update gems, and migrate DB
Code Block bundle install --with production --without development test RAILS_ENV=production bundle exec rake db:migrate
Install node.js 20.x (if needed)
Update JS dependencies
Code Block yarn install # in Avalon root dir
Update configuration, see Config changes above
Restart passenger (if using)
Code Block passenger-config restart-app
Run rake migrations
code
RAILS_ENV=production bundle exec rake avalon:migrate:backfill_parent_id RAILS_ENV=production bundle exec rake avalon:migrate:media_object_section_list
For Docker Installations
Warning | ||||
---|---|---|---|---|
Before upgrading an AWS docker install based on
Then load them into an S3 bucket:
See https://github.com/avalonmediasystem/avalon-docker/issues/77 for more discussion on this. If you run into any problems, please reach out on slack or the email list. |
Pre-upgrade steps
Ensure section_list migration has been run (See https://samvera.atlassian.net/wiki/spaces/AVALON/pages/2580086785/Upgrading+Avalon+7.7+to+Avalon+7.8#MediaObject-Section-List-Migration)
Export Fedora 4 repository and migrate it to Fedora 6 OCFL (inside avalon container)
Code Block cd /tmp mkdir fc4_to_fc6 cd fc4_to_fc6 # Setup Java curl -O -L https://download.java.net/java/GA/jdk21/fd2272bbf8e04c3dbaee13770090416c/35/GPL/openjdk-21_linux-x64_bin.tar.gz tar xvzf openjdk-21_linux-x64_bin.tar.gz # Download specific version of import/export tool curl -O -L https://github.com/fcrepo-exts/fcrepo-import-export/releases/download/fcrepo-import-export-1.2.0/fcrepo-import-export-1.2.0.jar # Export from fedora 4 jdk-21/bin/java -jar fcrepo-import-export-1.2.0.jar -b --dir fcrepo4.7.5_export --user fedoraAdmin:fedoraAdmin --mode export --resource http://fedora:8080/fedora/rest --binaries --membership --auditLog > importexport_`date +%Y%m%dT%H%M%S`.log 2>&1 # Download specific build of upgrade-utils # Run migration Fedora 4 -> Fedora 5 (inside container again) jdk-21/bin/java -jar fcrepo-upgrade-utils-6.4.0-SNAPSHOT.jar --input-dir fcrepo4.7.5_export --output-dir fcrepo5_export --source-version 4.7.5 --target-version 5+ > upgrade_5_`date +%Y%m%dT%H%M%S`.log 2>&1 # Run migration Fedora 5 -> Fedora 6 jdk-21/bin/java --add-opens java.base/java.util.concurrent=ALL-UNNAMED -jar fcrepo-upgrade-utils-6.4.0-SNAPSHOT.jar --input-dir fcrepo5_export --output-dir fcrepo6_export --source-version 5+ --target-version 6+ --base-uri http://fedora:8080/fedora/rest > upgrade_6_`date +%Y%m%dT%H%M%S`.log 2>&1
Copy migrated data out into new
fedora_data
directory (outside avalon container)Code Block docker cp avalon-docker-avalon-1:/tmp/fc4_to_fc6/fcrepo6_export fedora_data
Upgrade steps
Stop Avalon
Code Block docker-compose down
Update new code from avalon-docker
Code Block git checkout main git pull
Pull new images
Code Block docker-compose pull avalon solr
Setup fedora 6 cache database
Code Block docker-compose up db -d docker-compose exec db /bin/bash /docker-entrypoint-initdb.d/init-fedora-cache-db.sh docker-compose down
Check config changes then restart the Avalon containers
Code Block docker-compose up
Run rake migrations (inside avalon container)
Code Block RAILS_ENV=production bundle exec rake avalon:migrate:backfill_parent_id RAILS_ENV=production bundle exec rake avalon:migrate:media_object_section_list
You can also build your own image, Docker Buildkit is recommended
...