Open larinam opened 11 years ago
I :heart: this idea!
Here's the steps I think we need to do:
Some hangups:
show
droplet of the original droplet and make it the sameshow
droplet, so we'll need to think about how to ask the user about that, perhapsLuckily Tugboat internals are well set-up for this. This shouldn't actually require much code to do. The only API endpoint we need that isn't covered is image transfer. That also isn't upstream in the digital_ocean
gem, so we'll need to open a pull request there to get it in.
I'm super busy this week, but could probably take a shot at this next week. In the meantime if anyone else wants to start on it then go for it!
One more additional step I wanted to add, it would be expectable that no signs of additional work done left in the digital ocean so I'd suggest deleting temporary snapshot.
How do we know what SSH keys (if any) were used? We can't get that info on show droplet, so we'll need to think about how to ask the user about that, perhaps
I think it would be appropriate to exactly mention keys that should again appair on the migrated VM via -k or --keys.
tugboat migrate my-droplet --from=2 --to=1 --keys=191919,494949
We should warn that they need to manually re-enable backups
Via info
we can see if there were autobackups enabled, so using api /droplets/[droplet_id]/enable_backups
autobackups can be reenabled.
Nice, great points, I agree we should just say that you need to be explicit about the keys, and also about cleaning up afterwards and deleting the snapshot.
Backups, yes. I just made #51 as we'll need that for this then.
So, blocking this are:
the best way is probably now:
There is a VM in one DC, e.g. AMS1. I want to migrate it to the NY1. I want to execute:
tugboat migrate my-droplet --from=2 --to=1
and in a couple of minutes see my droplet active in the desired datacenter.