Clone Machines from the web UI

I’m happy to announce you can now clone machines from the fly.io UI :tada:

If you’re familiar with flyctl’s machine clone, it’s basically that with less options (for now!).

We also took this little addition as an opportunity to make the machines list page a little more reactive to machine state changes.

example

demo of cloning on fly.io UI with live interactions

caveats

Like I mentioned above, it’s a pretty basic clone right now. We’ll use the same region, same guest parameters, etc.

Note: It’s not currently working for machines that mount a volume - working out the UX for that still! Stay tuned

use it

You can use this now by navigating to App’s machines, then select a machine. In the top right you should see a “clone” button.

5 Likes

Are you planning to add support for cloning machines through the Machines REST API???

1 Like

Interesting thought! I can see that being useful.

Can you share more about how you’re trying/hoping to use it? Do you have something that already uses some kind of cloning and you’re trying to improve how you use it?

I’m building a distributed background job processing with machines as workers. I leverage the Machines API for this purpose. I’ve found many things that work well when using flyctl that do not work the same when using the Machines API. Ideally, both should result in the same result.

In this case, it’s not even possible to clone machines through the API, there’s no endpoint for it. Creating machines via the API is cumbersome enough as you have to send the whole configuration in the request body (why can’t it just read it from the app’s configuration as when you do fly scale count?). So I keep around a set of stopped worker machines on standby, but if there’s a demand spike, I need to create more on the fly. Cloning from the existing machines would make this process simpler.