Closed Ithanil closed 1 year ago
Hmm this is a good point. I'm debating whether this should be done through a rake task or manually through the console
First, get the tenant-id for the tenant that you want to move the recordings to:
docker exec -it scalelite-api /bin/bash
./bin/rake tenants
Then, we can update the recordings metadata:
./bin/rails c
Recording.all.each do |rec|
next if rec.metadata.exists?(key: 'tenant-id')
Metadatum.create(recording_id: rec.id, key: 'tenant-id', value: '<TENANT_ID>')
end
Thanks for the reply, but I won't be able to try this out until next Monday. I will report back then.
Problem to solve:
If multitenancy is enabled on an existing Scalelite deployment and configured in a way that a new tenant takes over the previous Scalelite URL and secrets 1:1, the corresponding frontends do not need to be reconfigured. Everything works as it did before the change, except for that the recordings are not available anymore.
Purposed solution:
Provide or document a migration path to transfer the existing recordings to the replacing tenant. Ideally, also provide a way to transfer the recordings from different Scalelites to further new tenants.
Considered alternatives:
Users lose all their recordings. Not ideal!
Additional context:
We are looking to replace multiple (at least 2) separate Scalelite deployments by one Scalelite with multi-tenancy enabled. We want to avoid losing the recordings (which are, by the way, disabled for one of the instances (for schools) and we need to be able keep it that way when using multitenancy!).