firecracker-microvm / firecracker-go-sdk

An SDK in Go for the Firecracker microVM API
Apache License 2.0
485 stars 123 forks source link

Fix CI build by using pre-built rootfs image #488

Closed fangn2 closed 1 year ago

fangn2 commented 1 year ago

Issue #, if available:

418

The main branch is failing due to hardcoded rootfs name as the name changed with upstream firecracker moving from bionic to jammy. Also devtool used to build rootfs is unstable.

cp: cannot stat 'build/firecracker/build/rootfs/bionic.rootfs.ext4': No such file or directory

Description of changes:

  1. Not specify the ubuntu version name but using regex to match it. The approach is safe since we will only have one rootfs built at a time.
  2. Use prebuilt rootfs and ssh key from S3 instead of building from devtool on fly which seems pretty unstable.
  3. Update readme of snapshotting example to reflect current status.
  4. Minor update for the snapshotting example code to clean up generated files.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: Tony Fang nhfang@amazon.com

fangn2 commented 1 year ago

Updated few other parts(please check Description of changes for details) to pass the build.
Cleaned up the examples code base a little bit.

CI seems a little bit unstable when it ran step test against Firecracker above which uses firecracker built from HEAD of main, but I think we can monitor from there.

@swagatbora90 @austinvazquez @ginglis13 PTAL