Project

Profile

Help

Story #5178

closed

Story #3821: As a user, I can migrate from Pulp 2 to Pulp 3

As a user, a Migration Plan is validated

Added by ttereshc over 4 years ago. Updated almost 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 58
Quarter:

Description

Users can submit a Migration Plan in JSON format.
The structure of the JSON as well as values in it need to be validated:
- check that structure is correct and only expected fields are present
- check that pulp2 plugins which need to be migrated and corresponding pulp 3 plugins are installed
- optionally check resources a Migration Plan refers to ( if a plugin exists in Pulp2, if resources exist in Pulp 2).

Consider using https://github.com/Julian/jsonschema which is among recommended project for JSON schema validation https://json-schema.org/implementations.html#validators

Example of a Migration Plan

 {
    "plugins": [
       { 
         "type": "iso",  # it should be a pulp2 type
         "protection": true, # migrate any content protection available for all repos
         "repositories" :  [
           {
             "name": "foo",
             "pulp2_repository_id":  "my_repo_id to use to find an importer to migrate"   # optional?
             "repository_versions": [
                 {
                   "pulp2_repository_id": "idA",
                   "distributor_ids":  ["distributor_id1", "distributor_id2"]  # optional?
                   "protection": ["distributor_id1"] # content protection migration is only needed for the specfied distributor(s)
                  },                
                  {
                    "pulp2_repository_id": "idB",
                    "distributor_ids":  ["distributor_id3"]
                  },
               ]
            }
        ]
     },
     {
       "type": "docker",
     }
  ]
}

For use cases and examples of a Migration Plan, see https://etherpad.net/p/pulp-2to3-migration

Also available in: Atom PDF