Repository navigation
Conversation
5838456 to
33e5c68
Compare
| @@ -0,0 +1,422 @@ | |||
| #!/usr/bin/env python | |||
There was a problem hiding this comment.
this is the main legacy dumper script
654ea7d to
b320486
Compare
* consolidates substeps (check readme and migrating-a-collection.md) # Conflicts: # .gitignore # Dockerfile # cds_migrator_kit/rdm/streams.yaml # cds_migrator_kit/rdm/streams_done.yaml # cds_migrator_kit/rdm/streams_shelved.yaml
b320486 to
b735994
Compare
palkerecsenyi
left a comment
There was a problem hiding this comment.
The code changes look good to me, I have some questions about the docs. Also, more generally, why are we not putting these docs into the digital-repositories internal docs? It would be nice to have everything in one place if possible. Thanks!
|
|
||
| Prepare the data locally first, see https://digital-repositories.web.cern.ch/cds/cds.cern.ch/migration/ and note the results in the issue: | ||
|
|
||
| - [ ] check the permissions references and submissions (Submissions tab of the reference spreadsheet) |
There was a problem hiding this comment.
Which spreadsheet is this referring to?
| ``` | ||
| - Write the queries **without** the standard exclusions: the script appends `-690C_:SCICOM -595:*ARCHIVE* -980:ANNOUNCEMENT -980:DELETED -980:HIDDEN -980__a:DUMMY -690C_:movingimages -970__b:MERGE-* -980:GREYBOOK`. `-980__c:MIGRATED` is not excluded on purpose, some records belong to several communities. | ||
| - With several queries, also set `analyze_query`: one query, without `-980:DELETED -980:HIDDEN -980__c:MIGRATED -980__a:DUMMY` (duplicates are searched among them to be redirected to). |
There was a problem hiding this comment.
What does this mean? What is analyze_query used for?
| - Optional: `folder` (working directory under the data root, default the name), `comments_queries` (default `queries`) and `reviewers` for the comments, and the `flags` (`update_new_version_publication_date: true` only for administrative documents, e.g. HR; `skip_plot_files`; `workers`; ...). | ||
|
|
||
| Merge it and update the checkout on `cds-migration-01` (`/opt/cds-migrator-kit`) and the image of the migration pod before going further. | ||
|
|
There was a problem hiding this comment.
Maybe for completeness here we can mention that at this point you should dry-run the migration locally, add the results to the curation spreadsheet (including where the migrator kit stores the error log CSV), and wait for curation? Just since this might not initially be obvious
| - [ ] reindex all users `invenio rdm rebuild-all-indices -o users` to add missing migrated accounts | ||
| - [ ] set the community slug and deploy the redirections: [TODO PR with redirection] | ||
| - [ ] merge the Puppet `qa` branch to `master` to activate the submissions/collections/search redirections | ||
| - [ ] run the MIGRATED tagging on old CDS: https://gitlab.cern.ch/cds-team/production_scripts/-/blob/master/cds/set_records_migrated_to_rdm.py |
There was a problem hiding this comment.
Here we could include a template of the email we send to the content owners after their migration is complete?
| missing_users: cds_migrator_kit/rdm/data/users | ||
| communities_ids: | ||
| - "" | ||
| at: |
There was a problem hiding this comment.
Why are we keeping some of the streams here?
There was a problem hiding this comment.
@kpsherva could you instead move the done ones to done, it is nice to have the history of what rules were used to run the older ones for reference and in case we need to debug something
There was a problem hiding this comment.
And in the future from now onwards, the separate files will be there
Logic unchanged, consolidated manual procedures, the whole collection is described in one yaml files shared between all environments (committed here, no changing the configuration per env in openshift anymore)
Details
The working directory of a collection is
<root>/<collection>/:people.csvis the people authority export of the environment. Copy it tomigration_cli/rdm-data/users/people.csvfrom the EOSusersfolder, or recreate it as described inmigration_cli/migrating-a-collection.md.2. Configuration
The configuration of a collection is the file
migration_cli/collections/antares.yamlof the repository, the same for every environment (all the options inmigration_cli/collections/_example.yaml):3. Get the dumps from the legacy system
The legacy tools exist only on
cds-migration-01. Run the script there with a scratch folder as root (not on EOS), then download the result:The dumps change only when the legacy records change (f.e. when curators , so they do not need to be refreshed on every run.
dump filesandprepareare not needed locally. Addprepare(duplicates to redirect) if you want to test the redirections, it writesduplicated_pids.jsonin the working directory of the collection.5. Migrate
Try each command with
--dry-runfirst.invenio migration users submitters run --collection antares invenio migration run --collection antares # only if you dumped the comments invenio migration users commenters run --collection antares invenio migration comments run --collection antaresThen reindex, to see the missing users in the UI:
6. Statistics (optional in local)
The legacy events are read from the legacy OpenSearch, so this needs access to it: export
CDS_MIGRATOR_KIT_SRC_SEARCH_HOSTSas described inmigration_cli/step_by_step_documentation.md, then: