-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
978 Migrate Local Users, Datasets, Folders and Files #1058
base: main
Are you sure you want to change the base?
Conversation
… migrated from old clowder instance
NOTE - we need a feature that says 'reset password' if 'reset password' is set, then you have to reset password on logging in
will require some port changes for the running v1 instance (or v2) will work out a strategy
need to move to new db and minio
file upload broken, need to fix
… on the first page
removing unused code
this might need to be modified for CILogon, but this will work for local users
* migrate metadata definition; modify migration script * local migrate changes (#1186) --------- Co-authored-by: Todd Nicholson <[email protected]>
Move descriptions from other PRs over there
|
On spaces, right now if you want to test spaces you'll need to do it locally with this branch: Also add the changes to v1 mentioned above. Currently v1 api does not return creator of spaces with space api calls. The above pull request adds that. |
…ate-users # Conflicts: # scripts/migration/migrate.py
* dataset metadata is working * register migration extractor and successfully migrate machine metadata
* match other branch * adding new collection metadata * str not float * getting collections for a dataset in v1, fixing metadata for collections * posts collection name and id * adding routes for getting collections * making a method like the one in v1 for self and ancestors. it will be easier to build a collection hierarchy from this * sample json for mdata * posts collection name and id * building the data for collections * something works now * matching with other branch * methods for migrating collections as metadata * need to post it as metadata * change name * adding the metadata for collections * adding context url and right endpoint * getting spaces as well as collections * change name * remaning method * created v2 license based on v1 license details (#1193) Co-authored-by: Chen Wang <[email protected]> * removing print statements * better error logging --------- Co-authored-by: Dipannita <[email protected]> Co-authored-by: Chen Wang <[email protected]>
To test:
If you have a local running V1 instance, you can use that. And take a look at notes below to properly set up V1 instance.
↓↓↓↓
Otherwise you can use the demo instance if possible.
Adjust the v1 users line for testing
The first part of user migration. Here we will migrate users from a clowder v1 instance into a clowder v2 instance. This works for local users, datasets, folders, and files.
I have refactored this so that there is a 'migrate_user' method. This will probably be a useful pattern to follow since we might want to handle CILogon users differently. We also might want to make migration something a user can initiate from another instance, where there might be options they need to select. This might become important once we get into collection hierarchies, how to handle spaces and sharing, metadata, and then things like licenses.
A later pull request will address collection hierarchies, metadata, CILogon accounts, and other features.
To test this, you will want to run a clowder v1 instance. Since both need to run a different version of MongoDB, change this in the .yml file for the dependencies in v1.
also change this in application.conf
mongodbURI = "mongodb://127.0.0.1:27018/clowder"
You will also need to do add this line in application.conf so that the emails will be printed in terminal
smtp.mock=true
It can be added anywhere.
To run v1, use
docker-compose up mongo -d
And then run clowder v1 using IntelliJ.
If you add entries to the v1 instance, try migrating them.
Also, you will need an admin user from the v1 instance and an api key to be placed in a .env file.
This can also be tested with another instance. The migration is handled using the API so you can use an existing instance and try to migrate.
TODO: