princeton-sns / firecracker-tools

5 stars 5 forks source link

Add scripts to generate runtime-specific root file systems #2

Closed alevy closed 5 years ago

alevy commented 5 years ago

Adds a (hopefully) simple script to generate a rootfs for a particular runtime. At a high level, it uses the base alpine docker image (the default one from Docker Hub), and runs three scripts inside the container:

Appfs images to follow.

LedgeDash commented 5 years ago

Yes, I believe it was modified to output to Firecracker's magic port so that kernel boot time can be measured.

alevy commented 5 years ago

... and another for changing ext4 file size.

Ideally we would resize the resulting file system to fit the contents. This is possible with resize2fs but is subtle enough for me to have skipped it for now. A command line argument would work as well (and maybe makes sense to have as a minimum in case we want to reserve extra space on the file system in some cases).

alevy commented 5 years ago

Yes, I believe it was modified to output to Firecracker's magic port so that kernel boot time can be measured.

I think that’s right. So this setup won’t actually work exactly as we want for Firecracker, we’ll have to continue to modify this and add in these features (e.g., replace a custom /sbin/init, etc).