Skip to content
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

Migrate services between instances #839

Open
MattiSG opened this issue May 3, 2022 · 1 comment
Open

Migrate services between instances #839

MattiSG opened this issue May 3, 2022 · 1 comment
Assignees

Comments

@MattiSG
Copy link
Member

MattiSG commented May 3, 2022

Create a script to migrate some services from one instance to another.

This script must take the configurations of a source storage adapter and a destination storage adapter as well as the list of services to migrate.
It must be able to migrate both snapshots and versions and maintain a link between old and new identifiers.

The migration of declarations should not be handled by the script but, in the first instance, must be done manually.

Result of operation

Done by the script:

  • Erase snapshots related to services to migrate from the snapshots source repository.
  • Erase versions related to services to migrate from the versions source repository. The link between versions and snapshots should be preserved.
  • Add snapshots related to services to migrate into the snapshots destination repository.
  • Add versions related to services to migrate into the versions destination repository. The link between versions and snapshots should be preserved.

Done manually:

  • Erase declarations related to services to migrate from the source declarations repository.
  • Move declarations related to services to migrate and its history to the destination declarations repository.
    • If the declaration already exists in the destination, append to the history file in the destination repositories with the erased declaration.
  • Create a tag on the tip of the main branch in the source versions repository in order to preserve links.
  • Create a tag on the tip of the main branch in the source snapshots repository in order to preserve links.
  • Erase the local snapshots and versions copies on both instances.
@MattiSG
Copy link
Member Author

MattiSG commented May 17, 2022

  • Unify record IDs when the storage adapter is Git (currently, it is sometimes a long SHA and sometimes a short SHA).
  • Let adapters define the storage mechanism based on the MIME type (currently, the Git adapter needs to get the file extension passed to it).
  • Programmatically add README and LICENSE file, through a separate utils file (not in the Record API as it varies too much by storage mechanism).
  • Expose a way to get all records.
  • Expose a documented Record class to manipulate records.
  • Document the StorageAdapter API.
  • Write a script to migrate all records of a subset of services from one instance to the other, as defined in the message above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants