Creating a Garden Linux Firecracker Image
Creating a Firecracker image is as easy as building regular images and can simply be accomplished by running:
Production Image
make firecracker # Dev image (autologin, etc.) make firecracker-dev This creates the kernel- & filesystem image artifacts: * kernel image: firecracker_dev-amd64-today-0ee7682b.vmlinux * filesystem image: firecracker_dev-amd64-today-0ee7682b.ext4Run Pytest on Garden Linux Firecracker image. Afterwards, the regular Pytest can be performed (see also: Garden Linux Pytest docs). Make sure to have /dev/kvm present and accessible and create a simple firecracker IAAS configuration (all options can be found here):
# firecracker.yaml firecracker: # Path to a final artifacts. This includes the Kernel # and a filesystem image kernel: /gardenlinux/.build/firecracker_dev-amd64-today-0ee7682b.vmlinux image: /gardenlinux/.build/firecracker_dev-amd64-today-0ee7682b.ext4 readonly: False # Filesystem mount path to mount filesystem image for further # inlcudes and adjustments (optioanl) # Default: tmpdir image_mount: /tmp/image_mount # List of features that is used to determine the tests to run features: - "base" # SSH configuration (required) ssh: # Defines if a new SSH key should be generated (optional) # Default: true ssh_key_generate: true # Defines path where to look for a given key # or to save the new generated one. Take care # that you do NOT overwrite your key. (required) ssh_key_filepath: /tmp/ssh_priv_key # Defines the user for SSH login (required) # Default: root user: rootNext, just start the integration-test container and run Pytest:
sudo podman run -it --rm --privileged -v `pwd`:/gardenlinux gardenlinux/integration-test:`bin/garden-version` bash
Run Pytest
pytest --iaas=firecracker --configfile=myfirecrackerconfig.yamlGlad to have the tests for Firecracker images covered, now.