“You mean we get a super basic feature, and you’re gonna try to pass it off as something awesome?” Yes - bear with me.
TL;DR: The fly deploy
(and fly launch
) commands have VM sizing options to let you set VM size, memory, or a preset thereof.
This means it’s now possible to set VM size BEFORE the first deploy - it previously wasn’t as easy.
Here’s the explanation.
V1 Apps of Yore
With V1 of the Apps platform, resizing VMs worked like this:
You could set a VM size on the fly launch
command, or after initial deployment via fly scale
’s memory
or vm
subcommands.
Neither of these options gave full control over the number of CPU’s or Memory allocated (you chose from some pre-defined sizes).
When Machines were released, you could set the VM size (CPUs and Memory) upon creation/update via the Machines API. These options were (and still are) also available via the fly machine <run|update>
commands.
The Machines platform gave more control over VM size, and since Apps V2 is based on Machines, you now have that control too.
V2 Apps of Today
Today (er, yesterdayish), we released an update. As of flyctl 0.1.8, the fly launch
and fly deploy
commands include VM sizing flags to give you more control.
# These also appear in the `fly launch` command
fly deploy -h
...
--vm-cpukind string The kind of CPU to use ('shared' or 'performance')
--vm-cpus int Number of CPUs
--vm-memory int Memory (in megabytes) to attribute to the VM
--vm-size string The VM size to use when deploying for the first time. See "fly platform vm-sizes" for valid values
You can give your VM up to 2gb of RAM per shared CPU, or up to 8gb of RAM per performance CPU.
This is useful to help size your VM’s before your first deployment - great for migrating off Apps V1 or when you want something like “1 shared CPU but 512m RAM instead of 256M”. We’re working on making sized VM’s on deployments even more intuitive, to make deployments even better than they are now!
Let us know what you think!
(95% of this was written by the wonderful @fideloper-fly )