Browse code

image-builder, ami: Reduce AMI root fs size to fix ec2 upload failure

Commit d07c27b72 ("Additional improvements to image builder")
changed the root filesystem size of the photon AMI image from 8GB to
16GB (to make it uniform with all the other cloud images). However,
AWS imposes a size limit of 10GB on instance-store backed AMIs[1],
which leads to the following failure when uploading these AMIs to ec2:

ec2-bundle-image ...
"ERROR: the specified image photon-ami-3.0-a688d62.raw is too large"

Fix this by reverting the root filesystem size of AMIs to 8GB.

[1].
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ComponentsAMIs.html#storage-for-the-root-device

Change-Id: Ic153b028ad81f2eb219ef5f9c79e3a409a011ed8
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6300
Reviewed-by: michellew <michellew@vmware.com>
Tested-by: michellew <michellew@vmware.com>

Srivatsa S. Bhat (VMware) authored on 2018/12/06 06:01:58
Showing 1 changed files
... ...
@@ -7,7 +7,7 @@
7 7
             "text": "PASSWORD"
8 8
         },
9 9
     "packagelist_file": "packages_ami.json",
10
-    "size": {"root": "16", "swap": "0"},
10
+    "size": {"root": "8", "swap": "0"},
11 11
     "public_key":"<ssh-key-here>",
12 12
     "postinstallscripts": [ "ami-patch.sh", "../password-expiry.sh" ],
13 13
     "additionalfiles": [