NextChapterSoftware / ec2-action-builder

This is a custom GitHub action to provision and manage self-hosted runners using AWS EC2 On-Demand and/or Spot instances.
Apache License 2.0
11 stars 7 forks source link

Feature request: ability to customise Root volume size of Instance's storage #16

Closed yuravk closed 5 months ago

yuravk commented 5 months ago

Is there a possibility to implement overriding of Root volume size taken from AMI ?

As usual AMIs are configured with as less as possible storage. And that will be grate to have an ability to extend the storage for Instance, and so make self-hosted runner able to run disk size consuming tasks.

mahdi-torabi commented 5 months ago

Hi, It's a bit tricky with the disk resize/grow on startup but definitely doable. I am looking into it and will keep you posted.

Based on what I could find, our only option would be using an EBS volume mounted at the root disk location. Then using the startup (user-data) script to resize/grow the disk to use the new added storage capacity.

I just need to figure out a few more details first then try and give it a go. 1- How to accurately determine the root disk mount location (some AMIs use /dev/xvda while others use /dev/sda1) 2- Make sure EBS volumes are ephemeral and deleted after each execution 3- Verify that the disk resize can be done fast enough so that registration TTLs don't expire.

mahdi-torabi commented 5 months ago

Added support for specifying root volume size and storage class.

Released v1.5 with the new feature. https://github.com/NextChapterSoftware/ec2-action-builder/releases/tag/v1.5

I hope this helps.

yuravk commented 5 months ago

Grate. It works for me.

The issue may be resolved/closed. Thank you.