Support migration.#1089
Conversation
| - Add a new broker to your configuration. Use 'config broker add ...'. | ||
| - Start the migration with 'migration start --broker=<broker>'. | ||
| - Upload a new pod, and roll it out to the fleet with 'fleet roll-out'. | ||
| - Check the status of the migration with the 'status' command. |
There was a problem hiding this comment.
| - Check the status of the migration with the 'status' command. | |
| - Check the status of the migration with the 'migration status' command. |
There was a problem hiding this comment.
There is no specific migration status command. The normal status command is enough.
Changed it to "fleet's 'status' command".
| --examples=[ | ||
| cli.Example """ | ||
| Finish the migration. | ||
| All old brokers are removed, and devices can only b |
| with-devices-fleet parsed config cache ui: | fleet/FleetWithDevices | | ||
| new-broker := get-server-from-config config ui --name=broker-name | ||
| fleet.migration-start --broker-config=new-broker | ||
| ui.info "Started migration to broker $broker-name." |
There was a problem hiding this comment.
Maybe add information on how to check the status right here?
|
|
||
| with-devices-fleet parsed config cache ui: | fleet/FleetWithDevices | | ||
| fleet.migration-finish brokers | ||
| ui.info "Finished migration." |
There was a problem hiding this comment.
Add broker information to the output?
| broker-config := default-broker-config | ||
|
|
||
| broker-name := fleet-content.get "broker" | ||
| migrated-from-entry := fleet-content.get "migrated-from" |
There was a problem hiding this comment.
Maybe this should be more like 'migrating-from' since it isn't finished yet?
|
|
||
| // We need to notify the migrated-from brokers. | ||
| fleet-file_.migrated-from.do: | server-name | | ||
| ui_.info "Rolling out on migrated-from broker $server-name." |
There was a problem hiding this comment.
migrated-from sounds so low-level here. Maybe reword it?
Rolling out to $old broker (migration in progress).
| // This also makes it possible to move forward and backward between two brokers. | ||
| detailed-devices = old-broker.get-devices --device-ids=device-ids | ||
| old-broker.roll-out --devices=detailed-devices.values --pods=pods --diff-bases=diff-bases | ||
| ui_.info "Successfully rolled out on migrated-from broker $server-name." |
There was a problem hiding this comment.
Successfully rolled out to $old broker (migration in progress).
| - Start the migration with 'migration start --broker=<broker>'. | ||
| - Upload a new pod, and roll it out to the fleet with 'fleet roll-out'. | ||
| - Check the status of the migration with the 'status' command. | ||
| - Finish the migration with 'migration finish', once all devices have migrated. |
There was a problem hiding this comment.
Maybe this should be stop? Finish seems to imply that we're done with it better than stop, but on the other hand, we don't really know if we're done. If finish checked the status and complained if it wasn't really finished (unless --force), then maybe finish would be better.
All in all, I think start/stop is likely the simpler pair and we still check that we don't stop an incomplete migration without a '--force' flag.
No description provided.