Fly Machines questions

Hello all,

I’m playing with Fly Machines and I have some issues when following the documentation.

  1. I can’t make the IP allocation using the GraphQL API, I got a 500 Internal Server Error (fly_request_id: 01G6MKPH5YX9EXFXWPR6JZPN73-cdg)

  2. There is no documentation about how to associate volumes with a machine, I’d like to associate one or two to my machine.

  3. The link between the fly.toml file and the machine is unclear to me. Is it possible to specify all the machine parameters using the fly.toml file when creating a machine? If so, how?

Thanks for your help!

You’ll need to specify a type as either v4 or v6. We need to make this argument required so you’ll get a better error.

Indeed this is missing from docs. You can specify with this JSON:

  "mounts: [
    "volume": "vol_12345",
    "path": "/data"

Note that you may only mount one volume per VM, currently (so, only one array entry). We’ll get this into the docs!

Support for fly.toml has just been released, so it’s pretty raw. fly.toml is not supported for creating machines with fly machine run, but once an app has machines, you can create a new fly.toml for it and run fly deploy against it like a standard Fly app. The deployment will override the settings on the machines, so I wouldn’t use this yet if you plan to attach volumes.

1 Like

Awesome, thanks for the answers.

Is it possible to create volumes with the REST API? Same question with the IP allocation. It’s easier to drive everything programmatically against the same API. :+1:

It’s not possible yet, but the plan is most likely to have a single API for all operations. We’re not immediately doing this because we want to think hard about the correct DX here. For example, volumes might just be created along with VMs. OR, IPs automatically allocated when a public service is detected (like in the old platform).

So my best shot right now would be the GraphQL API for volume creation?

Yes, GraphQL is the only way to do it right now.

Someone please just build a k8s wrapper around fly. :sweat_smile:

It seems like there is an issue when I attach a volume to my machine. The machine starts but is never ready. Are you on Discord or Slack @jsierles? It would be simpler to share what I’m doing. I’m jgoux#5970 on Discord