-
Notifications
You must be signed in to change notification settings - Fork 6
978 Migrate Local Users, Datasets, Folders and Files #1058
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
Open
tcnichol
wants to merge
98
commits into
main
Choose a base branch
from
978-migrate-users
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… 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
…g and strategy for the folders
test with new 'test space' with fewer options first
need to create folders with a map, then upload files to correct folder
…te old method since it looks like it won't find the right folders
…older, most of these will be uploaded to folders following the 'collection becomes dataset' model
refactoring to make it clear when a v1 dataset is a v2 dataset or when a v1 collection is a v2 dataset
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: