diff --git a/README.md b/README.md index 8f67b71d2..056e74c79 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,15 @@ An example `finch.yaml` looks like this: cpus: 4 # memory: the amount of memory to dedicate to the virtual machine. (required) memory: 4GiB +# snapshotter: the snapshotter a user want to use as there default snapshotter +# Supported Snapshotters List: +# - soci https://github.com/awslabs/soci-snapshotter/tree/main +# Once the option has been set the snapshotter will be installed on either finch vm init or finch vm start. +# The snapshotter binary will be downloaded on the virtual machine and will be configured and ready for use. +# To change your default snpahotter back to overlayfs, simply remove the snapshotter value from finch.yaml +# To completely remove the snapshotter binary, shell into your VM and remove /usr/local/bin/{snapshotter binary} +# and remove the snapshotter configuration in the containerd config file found at /etc/containerd/config.toml +snapshotter: soci # creds_helpers: a list of credential helpers that will be installed and configured automatically. # Supported Credential Helpers List: # - ecr-login https://github.com/awslabs/amazon-ecr-credential-helper diff --git a/finch.yaml b/finch.yaml index 8e19f8623..f1dcc0f43 100644 --- a/finch.yaml +++ b/finch.yaml @@ -121,11 +121,10 @@ containerd: user: false # # Override containerd archive # # 🟢 Builtin default: hard-coded URL with hard-coded digest (see the output of `limactl info | jq .defaultTemplate.containerd.archives`) - # adding archive for nerdctl 1.5.0 just for e2e testing - archives: - - location: "https://github.com/containerd/nerdctl/releases/download/v1.5.0/nerdctl-full-1.5.0-linux-arm64.tar.gz" - arch: "aarch64" - digest: "sha256:32a2537e0a80e1493b5934ca56c3e237466606a1b720aef23b9c0a7fc3303bdb" +# archives: +# - location: "~/Downloads/nerdctl-full-X.Y.Z-linux-amd64.tar.gz" +# arch: "x86_64" +# digest: "sha256:..." # Provisioning scripts need to be idempotent because they might be called # multiple times, e.g. when the host VM is being restarted. diff --git a/pkg/config/lima_config_applier_test.go b/pkg/config/lima_config_applier_test.go index a6cd9003b..97aeb7b8f 100644 --- a/pkg/config/lima_config_applier_test.go +++ b/pkg/config/lima_config_applier_test.go @@ -88,7 +88,7 @@ fi want: nil, }, { - name: "adds soci script when soci is set to true in config", + name: "adds soci script when snapshotter is set to soci in config", config: &Finch{ Memory: pointer.String("2GiB"), CPUs: pointer.Int(4), @@ -150,13 +150,13 @@ fi want: nil, }, { - name: "doesn't add soci script when soci is set to false in config", + name: "doesn't add soci script when snapshotter is not set in config", config: &Finch{ Memory: pointer.String("2GiB"), CPUs: pointer.Int(4), VMType: pointer.String("qemu"), Rosetta: pointer.Bool(false), - Snapshotter: pointer.String("string"), + Snapshotter: pointer.String(""), }, path: "/lima.yaml", isInit: true,