UpCloudLtd/upcloud-packer

Change the default storage size to 25 GB

Jalle19 opened this issue · 5 comments

The new cheapest plan has 25 GB of storage instead of 30. Currently anyone who has to build a template for the cheapest plan will have to override storage_size.

... and we should be able to set core_numbers and memory_size.
Right now it is baked as 2 and 2048 respectively. (https://github.com/UpCloudLtd/upcloud-packer/blob/master/builder/upcloud/step_create_server.go)
So much for 'thorough' infrastructure as code ...

@ohenley the core size and memory doesn't matter that much since you'd be using the template to spin up your final server. The disk size however determines which pre-configured instance sizes you can use, e.g. if your template is larger than 25 GB you won't be able to use the cheapest plan.

@Jalle19 Do you mean that later down the road I will spin my custom image on the machine config of my choice (eg. 1 cpu and 1024 of ram)?

Yesterday, by executing the 'build' of my packer box, it automatically created a live instance... with 2 cores and 2048 ram. I had to delete those manually. I was even blocked of creating other images at some point (new to this IaC so I am testing a lot) because these configs maxed out my Upcloud credits. I do not consider this ideal. Now maybe I missed some config infos.

FYI, I just tried the Scaleway builder and by default:

  • No 'custom' binary to setup (eg. upcloud-packer)
  • No settings of disk, cpu and ram config at Packer level (determined at instanciation time)
  • No server instance created at 'build time' of your Packer image.

Their process isnt perfect though: a very brittle 'base image uuid availability mapping' and a good mess of credentials to setup (API token (access key, private key), api_access_key and organization_id all mixed up between a not backward compatible new builder and deprecated documentation laying around on official paths).

Yes, once the disk template has been created you can spin it up using whatever instance type/size you choose. The 2xCPU2GB default is just for the temporary instance Packer uses to provision your template, it gets deleted before Packer finishes. You shouldn't be left with any dangling instances.

I'm pretty sure the Scaleway builder also spins up a temporary instance.

Fixed in #24