From 5bd29b99670fb9bd28dc2e8c675e3f64c0709801 Mon Sep 17 00:00:00 2001 From: Stephen Bates Date: Tue, 14 Nov 2023 13:51:27 -0700 Subject: [PATCH] ci: Add CI to the qemu-minimal project Add two workflows to the GitHub CI flow for both spell-checking and smoke-testing. The smoke-test does a simple VM creation via the QEMU-based approach. Fixes #20. --- .github/workflows/smoke-test.yml | 25 ++++++ .github/workflows/spell-check.yml | 19 +++++ .spellcheck.yaml | 16 ++++ .wordlist.txt | 124 ++++++++++++++++++++++++++++++ README.md | 14 ++-- 5 files changed, 191 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/smoke-test.yml create mode 100644 .github/workflows/spell-check.yml create mode 100644 .spellcheck.yaml create mode 100644 .wordlist.txt diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml new file mode 100644 index 0000000..f61be68 --- /dev/null +++ b/.github/workflows/smoke-test.yml @@ -0,0 +1,25 @@ +name: qemu-minimal-smoke-test + +on: + pull_request: + branches: [ master ] + +jobs: + ubuntu-smoke-test: + name: ubuntu-smoke-test + runs-on: ubuntu-latest + steps: + - name: Check out code using action/checkout + uses: actions/checkout@v4.1.1 + - name: Install a couple of packages via the apt package manager + run: sudo apt update && sudo apt install -y qemu-system-x86 cloud-image-utils + - name: Generate an ssh key-pair for this test + run: ssh-keygen -t rsa -q -f "$HOME/.ssh/id_rsa" -N "" + - name: Run a qemu-based ./gen-vm smoke-test + run: ./gen-vm + working-directory: qemu + env: + VM_NAME: qemu-minimal-smoke-test + KVM: none + USERNAME: ubuntu + PASS: password diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml new file mode 100644 index 0000000..b411a43 --- /dev/null +++ b/.github/workflows/spell-check.yml @@ -0,0 +1,19 @@ +name: qemu-minimal-spell-check + +on: + pull_request: + branches: [ master ] + paths: + - '**.md' + - '.wordlist.txt' + - '.spellcheck.yaml' + +jobs: + ubuntu-spell-check: + name: ubuntu-spell-check + runs-on: ubuntu-latest + steps: + - name: Check out code. + uses: actions/checkout@v4.1.1 + - name: GitHub Spellcheck Action + uses: rojopolis/spellcheck-github-actions@v0 diff --git a/.spellcheck.yaml b/.spellcheck.yaml new file mode 100644 index 0000000..3021db0 --- /dev/null +++ b/.spellcheck.yaml @@ -0,0 +1,16 @@ +spellchecker: aspell +matrix: +- name: markdown + aspell: + lang: en + sources: + - '**/*.md' + pipeline: + - pyspelling.filters.markdown + dictionary: + wordlists: + - .wordlist.txt + output: wordlist.dic + encoding: utf-8 + default_encoding: utf-8 + expect_match: true diff --git a/.wordlist.txt b/.wordlist.txt new file mode 100644 index 0000000..6558988 --- /dev/null +++ b/.wordlist.txt @@ -0,0 +1,124 @@ +Ansible +Bjorling's +Busybox +CMB +CONFIG +IPv +Initramfs +KVM +LFS +LightNVM +Matias +NVM +NVMe +NVMf +OpenChannel +OpenChannelSSD +PMEM +PRs +QEMU +QEMU's +RoCE +SSD +SSDs +Thie +VM +VMs +VirtFS +Virtfs +addr +alot +ansible +awhisten +batesste +bbs +blogspot +bss +busybox +busyboz +bzImage +bzimage +cd +chroot +config +cpio +csortu +currenly +deboostrap +dev +differntly +environemnt +eth +exe +filesystem +fs +gdb +github +gz +href +html +http +https +img +infradead +init +initramfs +initrd +intel +intresting +jessie +kbusch +ko +lfs +li +librxe +libs +libvirt +linux +localhost +lt +managable +mnt +modprobe +mon +multistrap +nbd +netdev +nographic +ntap +nvme +nvmef +nvmf +ol +passthrough +perfers +powerdown +qcow +qemu +queitly +rc +rdma +repo +roce +rootfs +runqemu +rxe +sbates +seperate +snapshotted +stackoverflow +sudo +symlink +sys +targetted +ttyS +ubuntu +usr +virt +virtfs +virtio +vm +vmlinux +wget +www +zerofree diff --git a/README.md b/README.md index 6bf0ed5..6e532aa 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ be used as a starting point for building a suitable kernel. To run qemu using this image from the command should be: ``` -./runqemu +./runqemu ``` You can run @@ -35,14 +35,14 @@ various stages of repair. A QEMU-only (no libvirt) way to generate new VMs. Uses the Ubuntu cloud image ISO and a cloud-init script. Note there is an issue that -the files for this cannot reside on a guest's virtfs (i.e. running +the files for this cannot reside on a guest's VirtFS (i.e. running this script inside a VM to generate a nested VM won't work due to file permission issues). This may be better with virtio-fs. ### ./libvirt/virt-install-ubuntu A libvirt-based script that uses cloud images and cloud-init and -virt-install. Thie seems to work quite well on bare-metal. +virt-install. This seems to work quite well on bare-metal. ### ./scripts/create @@ -92,7 +92,7 @@ second drive has a Controller Memory Buffer (CMB) advertised on it. Note that since upstream has a different level of support for NVMe drive options than the other forks we use a -u option to handle that -differntly. +differently. The host's /home file is also passthrough mounted to the guests /home directory so test scripts, etc can be stored and run directly from the @@ -181,7 +181,7 @@ following: For a more intresting initramfs example you can run busybox. To do this perform the following steps. - 1. Download the busyboz source and build it to include all the tools + 1. Download the busybox source and build it to include all the tools that you want. Make sure this is a statically linked executable. 2. cd scripts 3. ./busybox @@ -194,7 +194,7 @@ This should boot into busybox shell and you can execute your installed command from there. Enjoy! Note this will not then pass on to a subsequent root filesystem (yet). -## Virtfs +## VirtFS By default we map the /home folder on the host to the /home folder on the guest using Plan 9 folder sharing over VirtFS. However this @@ -229,7 +229,7 @@ folders and the jessie image needs updating with some of the libs For a few reasons it is easier to keep the rdma_rxe.ko module seperate to the kernel. Also you need the linux headers inside the VM root -filesystem to compile librxe. You currenly need to copy (or symlink) +filesystem to compile librxe. You currently need to copy (or symlink) /usr/lib64/* to /usr/lib. You also have to setup VM to VM networking for which I (for now) used -netdev socket. QEMU perfers ntap but that's alot more work. The IPv4 addresses on the eth0 interfaces of