How to scale from zero

Hello,

Sometimes I need to just scale a machine, do a workload and scale to 0.

Normally I do that starting with:

fly scale count 1 --yes

I noted this scales from the most basic vm:

fly scale show -a microlink-next

Groups
NAME	COUNT	KIND  	CPUS	MEMORY	REGIONS
app 	2    	shared	1   	256 MB	mad(2)

so still I need to run flyctl scale to scale it to the right size:

flyctl scale vm shared-cpu-2x --memory=1024

The question: is it a way to perform

fly scale count 1 --yes && 
fly scale vm shared-cpu-2x --memory=1024

in a single action? my suggestion:

fly scale count 1 --vm=shared-cpu-2x --memory=1024 --yes

This sounds like a good fit to our machines API. The tl;dr: you can run a machine that will exit the process when it’s done and it’s going to stay stopped until you fly machine restart ID again.

You’d need something like fly machine run [args] once and whenever you need to run it again do a fly machine restart

You’re not billed for stopped machines unless there’s a volume.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.