From 861e66e76ba86c71cfbd5153b906dff8683846fa Mon Sep 17 00:00:00 2001 From: Yaron Kaikov Date: Tue, 5 Dec 2023 10:03:43 +0200 Subject: [PATCH] [ami]: reduce snapshot size to minimum allowed 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: https://github.com/scylladb/scylla-pkg/issues/3712 --- packer/scylla.json | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/packer/scylla.json b/packer/scylla.json index cbad5262..ef481216 100644 --- a/packer/scylla.json +++ b/packer/scylla.json @@ -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, @@ -47,7 +13,7 @@ { "delete_on_termination": true, "device_name": "/dev/sda1", - "volume_size": 30 + "volume_size": 8 } ], "region": "{{user `region`}}",