Fly Machines Manager

I am building my own Fly Machines Manager and also published a Portable app in Github for who want to play with it GitHub - Arshu/FlyManager: Portalble Fly Manager for Managing Machines in Desktop, Servers and Mobile and so far every thing works in my Mac as long as I login and able to create a wireguard VPN, even though I have not tested this extensively.

But I have usability problem in using the application inside the Micro VM.

Show stopper Issue 1 : I am able to login/retrieve token and generally query orgs/regions/apps and create/delete/allocate IP/Release IP from my App without any problem except the login flow is not optimum.

But before I can use my App to Create/Delete/Stop/Start Machines I need to create a Wireguard VPN connection which I am not able to create programatically.

The api which is used to create the VPN expects a config filename and there is no parameter to specify the file in parameters and hence it hangs and am not able to input the filename in the command process (My problem using C#). Is it possible to provide a parameter for specifying the file name of wireguard config -f <?.conf> so that I can find if I can complete the fireguard setup through my App.

Another Issue : This app can be only used by me and I want to support a flow where anyone can clone my app into their own account. Is this possible. Any suggestions to solve this use case.

Cache Invalidation of Machines Image : Only on destroying and recreating the machine I am able to use the new image checked into . Stoping and Starting does not use the new image checked in the fly registry. Any other simpler way to invalidate the Machine image so that it is refreshed from registry again.

Cold Start Up: Newly created machines take more than 3 to 4 minutes to shutdown even though I have configured it to auto shutdown after 30 seconds with 30 seconds initial offset. After the initial stop machines auto shutdown every 31 seconds after any new start. The timing for initial vm creating in the Fly Dashboard is also too fast like 11 millisecond being reported, but after the initial consistency the vm start within 400 to 500 millisecond and I can check that my application cold start is less than 2 seconds while monitoring from the browser even though the hot loading is about 100 millisecond to 300 millisecond. Only newly created machines I believe is not able to shutdown due to request metrics even though I have disabled http metrics.

Sorry for too many questions/clarifications.

1 Like

This looks cool!

If this is running as a Fly app or machine, you don’t need wireguard. _api.internal will work just fine. Wireguard is just used to connect you to the same private network.

You can update a machine to get it using a new image.

When you say that machines take ~4 min to stop, do you mean when you’ve called “stop” via our API? Or your own idle logic is taking 4 min to exit?

If it’s taking a long time to stop when you call our API, it’s likely not handling sigint properly.

You can run fly logs -i <machine id> to see more about what’s happening in our infrastructure to debug stop timings.

1 Like

I just tried and not able to resolve the api url. You can try now using and see what I mean. I have logged in and you can retrieve the token and try clicking the refresh machine list and it will give the above error.

Ok Will try Update Machine to see if the image gets refreshed.

I have coded application with a middleware to auto stop if no request is received for 30 seconds after initial offset. Only when a newly created machine is taking 3 to 4 minutes time to stop. I time the stop timing in my logs which is visible in fly logs. After that when a request comes it auto starts and stops after 31 seconds. There is no problem in executing a stop command from Api.

Fly machines is very cool technology and will be a game changer economically also.

I think I need to investigate further on the api url, many not fly problem since I am able to curl into the vm and execute flyctl curl http://_api.internal:4280 and able to get result. Need to find what is the problem in my code. Will investigate further.

Also why is the status of the App [Pending] for machine created apps even though I have a machine which has been successfully deployed.

The access to _api.internal got sorted out. I think it is program code where I need to force using ip6 and hence the problem.

Another problem I encountered is trying to create a machine under Personal Organisation which I have topped up sufficient funds since I don’t want to play in my Company Org since we have already started hosting production application under it. But I hit unprocessable entity error. Any help deeply appreciated. Thanks.

1 Like