ec2-github-runner icon indicating copy to clipboard operation
ec2-github-runner copied to clipboard

Is there a way to increase volume size of instance created

Open Nitish1814 opened this issue 1 year ago • 9 comments

Hi, I have created an AMI with 256 GB snapshot. However when I spinning up EC2 in workflow, it is creating instance with 8GB volume only. Do I need to specify some additional input in 'with' ? PS: Creating instance manually from AWS console using given AMI creates instance with 256GB

        uses: machulav/ec2-github-runner@v2
        with:
          mode: start
          github-token: ${{ inputs.PAT }}
          ec2-image-id: ami-xyz
          ec2-instance-type: t3.xlarge
          subnet-id: subnet-xyz
          security-group-id: sg-xyz

Regards,

Nitish1814 avatar Jan 26 '25 07:01 Nitish1814

Hmm, this seems off. Are you 100% sure that you are using the correct ami within the same region?

Preen avatar Jan 26 '25 09:01 Preen

Hmm, this seems off. Are you 100% sure that you are using the correct ami within the same region?

Hi, AMI is correct with 250GB snapshot. I am suspecting internally when RunInstancesCommand is fired then do it take default block device mapping ?

Nitish1814 avatar Jan 26 '25 14:01 Nitish1814

Hi Team, Can we add block device mapping volume size also as a part of input while running runInstancesCommand ?

  "BlockDeviceMappings": [
    {
      "DeviceName": "/dev/sdh",
      "Ebs": {
        "**VolumeSize**": 100
      }
    }
  ],
  "ImageId": "ami-abc12345",
  "InstanceType": "t2.micro",
  "SubnetId": "subnet-6e7f829e"

Nitish1814 avatar Jan 27 '25 07:01 Nitish1814

I dont have the time to implement this but do have the time to test it if you push a pull request? :)

I have not been able to recreate your issue with the wrong disk size on the nodes that Im starting.

Preen avatar Jan 27 '25 08:01 Preen

I dont have the time to implement this but do have the time to test it if you push a pull request? :)

I have not been able to recreate your issue with the wrong disk size on the nodes that Im starting.

sure, I'll then raise PR for this change in sometime as soon as I get some bandwidth.

Thanks,

Nitish1814 avatar Jan 27 '25 20:01 Nitish1814

Just to confirm when i use my custom AMI it always uses the AMI instance disk size..

stecullum avatar Jan 31 '25 17:01 stecullum

Just to confirm when i use my custom AMI it always uses the AMI instance disk size..

Hi @stecullum @Preen, the EBS snapshot associated with your AMI (say 256 GB). does it spin up an EC2 instance with 256 GB volume also?

You can look at AMI description and EBS Snapshot attached with 256GB but then also when instance is created only 8GB is assigned to it

Image

Thanks

Nitish1814 avatar Feb 03 '25 05:02 Nitish1814

I'm testing a change where can can fully configure all the block-device-mappings https://github.com/machulav/ec2-github-runner/pull/229

ktdreyer avatar May 16 '25 14:05 ktdreyer

I've successfully used #229. Can you test @Nitish1814 and report back? You may need to specify uses: machulav/[email protected] or later rather than @v2 to get the feature.

mcassaniti avatar Jul 01 '25 01:07 mcassaniti