Skip to content

Commit

Permalink
[ami]: reduce snapshot size to minimum allowed
Browse files Browse the repository at this point in the history
Every AMI we create today hold 30Gb EBS snapshot, if we take into
account the fact that we copy those images to other regions and have
multiple images (dev, debug, releases) it is adding up to our cost.

This commit reduce the size of the snapshot to 8Gb (it's the minimum
value allowed for a snapshot)

In addtion, it's reducing also the time for build process from 30
minutes to ~12 minutes (which is also good)

Refs: scylladb/scylla-pkg#3712
  • Loading branch information
yaronkaikov committed Dec 5, 2023
1 parent 2e7ab63 commit 861e66e
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions packer/scylla.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,6 @@
"name": "aws",
"type": "amazon-ebs",
"access_key": "{{user `access_key`}}",
"ami_block_device_mappings": [
{
"device_name": "/dev/sdb",
"virtual_name": "ephemeral0"
},
{
"device_name": "/dev/sdc",
"virtual_name": "ephemeral1"
},
{
"device_name": "/dev/sdd",
"virtual_name": "ephemeral2"
},
{
"device_name": "/dev/sde",
"virtual_name": "ephemeral3"
},
{
"device_name": "/dev/sdf",
"virtual_name": "ephemeral4"
},
{
"device_name": "/dev/sdg",
"virtual_name": "ephemeral5"
},
{
"device_name": "/dev/sdh",
"virtual_name": "ephemeral6"
},
{
"device_name": "/dev/sdi",
"virtual_name": "ephemeral7"
}
],
"ami_name": "{{user `image_name`| clean_resource_name}}",
"associate_public_ip_address": "{{user `associate_public_ip_address`}}",
"sriov_support": true,
Expand All @@ -47,7 +13,7 @@
{
"delete_on_termination": true,
"device_name": "/dev/sda1",
"volume_size": 30
"volume_size": 8
}
],
"region": "{{user `region`}}",
Expand Down

0 comments on commit 861e66e

Please sign in to comment.