Migrate Push and Poll Mirroring Policies#
Follow the steps below to migrate push and poll mirroring policies. Each set of policies can be exported, triggered, and optionally reconfigured to use manual scheduling.
Migrate push mirroring policies#
-
Run the migration tool to export push mirroring policies from MSR:
docker run --rm \ -v ./sql:/app/data/sql \ -v ./csv:/app/data/csv \ -v ./config:/app/config \ --network host \ registry.mirantis.com/msrh/migrate:latest \ poetry run migration --push-mirroring -
Verify the imported policies in Administration > Replications. All push mirroring policies will have the prefix
push-. Each policy is migrated with its associated registry and by default has Manual Replication Trigger. -
Configure the trigger for push replication policies in
config/config.env:-
To enable an event-based replication, set:
EVENT_BASED_PUSH_MIRRORING_REPLICATION_TRIGGER=TrueWhen new image tags are pushed, the replication policy schedules tasks to replicate the new tags to the destination registry.
-
To enable scheduled replication using a cron expression, set:
REPLICATION_TRIGGER_CRON=True
-
-
Trigger the push mirroring policies:
docker run --rm \ -v ./sql:/app/data/sql \ -v ./csv:/app/data/csv \ -v ./config:/app/config \ --network host \ registry.mirantis.com/msrh/migrate:latest \ poetry run migration --trigger-push-replication-rulesThis command applies the trigger mode, either cron-based or event-based defined in the
config/config.env. -
Remove scheduled triggers from all push mirroring policies and switch them to manual triggering:
docker run --rm \ -v ./sql:/app/data/sql \ -v ./csv:/app/data/csv \ -v ./config:/app/config \ --network host \ registry.mirantis.com/msrh/migrate:latest \ poetry run migration --remove-push-replication-rules-triggerIf push mirroring trigger needs to change from manual to cron-based or event-based, follow steps 3 and 4.
Migrate poll mirroring policies#
-
Run the migration tool to export poll mirroring policies from MSR:
docker run --rm \ -v ./sql:/app/data/sql \ -v ./csv:/app/data/csv \ -v ./config:/app/config \ --network host \ registry.mirantis.com/msrh/migrate:latest \ poetry run migration --poll-mirroring -
Verify the imported policies in Administration > Replications. All poll mirroring policies will have the prefix
pull-. Each policy is migrated with its associated registry and by default has Manual Replication Trigger. -
Configure the trigger for poll replication policies in
config/config.env:-
To enable an event-based replication, set:
EVENT_BASED_PUSH_MIRRORING_REPLICATION_TRIGGER=TrueWhen new image tags are polled, the replication policy schedules tasks to replicate the new tags to the destination registry.
-
To enable scheduled replication using a cron expression, set:
REPLICATION_TRIGGER_CRON=True
-
-
Trigger the poll mirroring policies:
docker run --rm \ -v ./sql:/app/data/sql \ -v ./csv:/app/data/csv \ -v ./config:/app/config \ --network host \ registry.mirantis.com/msrh/migrate:latest \ poetry run migration --trigger-pull-replication-rulesThis command applies the trigger mode, either cron-based or event-based defined in the
config/config.env. -
Remove scheduled triggers from all poll mirroring policies and switch them to manual triggering:
docker run --rm \ -v ./sql:/app/data/sql \ -v ./csv:/app/data/csv \ -v ./config:/app/config \ --network host \ registry.mirantis.com/msrh/migrate:latest \ poetry run migration --remove-pull-replication-rules-triggerIf poll mirroring trigger needs to change from manual to cron-based or event-based, follow steps 3 and 4.