Install Migration Tool

To install the migration tool:

  1. Download the migration tool image:

    docker pull registry.mirantis.com/msrh/migrate:latest
    
  2. Verify if the pulled image is valid by running help command:

    docker run -it --rm registry.mirantis.com/msrh/migrate:latest poetry run migration --help
    

Configure migration settings

To configure your target environment:

  1. Create a directory named config in your current working directory.

  2. Inside the config directory, create a file named config.env.

  3. Add the required variables with the appropriate values according to your deployment.

    Ensure the following configuration is present:

    HARBOR_API_BASE_URL=<HARBOR-API-ENDPOINT-FQDN>
    HARBOR_API_USER=admin
    HARBOR_API_PASSWORD=<REDACTED>
    HARBOR_API_TLS_VERIFICATION=False
    HARBOR_DB_HOST=localhost
    HARBOR_DB_USER=msr
    HARBOR_DB_PASSWORD=<HARBOR-DB-PASSWORD>
    HARBOR_SECRET_KEY=<MSR4-SECRETKEY-VALUE> #Obtain from MSR4 values secretKey
    MIGRATION_SOURCE_REGISTRY_URL=<SOURCE-MSR-REGISTRY>
    MIGRATION_SOURCE_REGISTRY_ADMIN_USERNAME=admin
    MIGRATION_SOURCE_REGISTRY_ADMIN_PASSWORD=<ADMIN-PASSWORD>
    MIGRATION_SOURCE_REGISTRY_WITH_TLS_VERIFICATION=False
    

    Note

    The secret key in Harbor is required for replicating container images.

  4. Configure the replication schedule in the config/config.env file. If you are running the migration immediately, update the default cron value to match your intended schedule.

    REUSE_ALREADY_FETCHED_DATA=True
    REPLICATION_TRIGGER_CRON="0 0 1 * * *"
    

    Refer to the Configuration Reference for more details.