Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 7 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ jobs:
- name: Run unit tests
run: just unit

- name: Pull test images
run: just pull-test-images

- name: Create nextest archive
run: |
cargo nextest archive --release -p integration-tests --archive-file nextest-archive.tar.zst
Expand Down Expand Up @@ -95,16 +92,16 @@ jobs:
with:
libvirt: 'true'

- name: Extract image lists from Justfile
run: |
echo "PRIMARY_IMAGE=$(just --evaluate PRIMARY_IMAGE)" >> $GITHUB_ENV
echo "ALL_BASE_IMAGES=$(just --evaluate ALL_BASE_IMAGES)" >> $GITHUB_ENV
- name: Install additional dependencies
run: sudo apt install -y go-md2man dosfstools mtools

- name: Setup Rust
uses: ./.github/actions/setup-rust

- name: Pull test images
run: just pull-test-images
- name: Extract image lists from Justfile
run: |
echo "PRIMARY_IMAGE=$(just --evaluate PRIMARY_IMAGE)" >> $GITHUB_ENV
echo "ALL_BASE_IMAGES=$(just --evaluate ALL_BASE_IMAGES)" >> $GITHUB_ENV

- name: Download nextest archive
uses: actions/download-artifact@v4
Expand All @@ -121,17 +118,7 @@ jobs:
run: chmod +x target/release/bcvk

- name: Run integration tests (partition ${{ matrix.partition }}/4)
run: |
# Clean up any leftover containers before starting
cargo run --release --bin test-cleanup -p integration-tests 2>/dev/null || true

# Run the partitioned tests
cargo nextest run --archive-file nextest-archive.tar.zst \
--profile integration \
--partition hash:${{ matrix.partition }}/4

# Clean up containers after tests complete
cargo run --release --bin test-cleanup -p integration-tests 2>/dev/null || true
run: just test-integration-partition nextest-archive.tar.zst ${{ matrix.partition }}
env:
BCVK_PATH: ${{ github.workspace }}/target/release/bcvk
BCVK_PRIMARY_IMAGE: ${{ env.PRIMARY_IMAGE }}
Expand Down
29 changes: 28 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@ unit *ARGS:
pull-test-images:
podman pull -q {{ALL_BASE_IMAGES}} >/dev/null

# Build cloud-init test image
build-cloud-init-image:
#!/usr/bin/env bash
set -euo pipefail
echo "Building cloud-init test image..."
podman build -t localhost/bootc-cloud-init tests/fixtures/cloud-init/
echo "✓ Cloud-init test image built: localhost/bootc-cloud-init"

# Run integration tests (auto-detects nextest, with cleanup)
test-integration *ARGS: build pull-test-images
test-integration *ARGS: build pull-test-images build-cloud-init-image
#!/usr/bin/env bash
set -euo pipefail
export BCVK_PATH=$(pwd)/target/release/bcvk
Expand All @@ -48,6 +56,25 @@ test-integration *ARGS: build pull-test-images

exit $TEST_EXIT_CODE

# Run integration tests from a partition (used by CI)
test-integration-partition ARCHIVE PARTITION: pull-test-images build-cloud-init-image
#!/usr/bin/env bash
set -euo pipefail

# Clean up any leftover containers before starting
cargo run --release --bin test-cleanup -p integration-tests 2>/dev/null || true

# Run the partitioned tests
cargo nextest run --archive-file {{ARCHIVE}} \
--profile integration \
--partition hash:{{ PARTITION }}/4
TEST_EXIT_CODE=$?

# Clean up containers after tests complete
cargo run --release --bin test-cleanup -p integration-tests 2>/dev/null || true

exit $TEST_EXIT_CODE

# Clean up integration test containers
test-cleanup:
cargo run --release --bin test-cleanup -p integration-tests
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,34 @@ disk images that can be imported into other virtualization frameworks.

See [docs/src/installation.md](./docs/src/installation.md).

## Dependencies

bcvk requires the following runtime dependencies:

### Core virtualization
- **QEMU** - The core virtualization engine
- **virtiofsd** - VirtIO filesystem daemon for sharing directories with VMs
- **podman** - Container runtime for managing bootc images

### For libvirt integration
- **libvirt** - Virtualization management for persistent VMs

### For cloud-init support
- **dosfstools** - Provides `mkfs.vfat` for creating VFAT filesystems
- **mtools** - Provides `mcopy` for populating VFAT images (used for cloud-init ConfigDrive)

### Package installation

**Debian/Ubuntu:**
```bash
sudo apt install qemu-kvm qemu-system qemu-utils virtiofsd podman libvirt-daemon libvirt-clients dosfstools mtools
```

**Fedora/RHEL:**
```bash
sudo dnf install qemu-kvm qemu-img virtiofsd podman libvirt libvirt-client dosfstools mtools
```

## Quick Start

### Running a bootc container as ephemeral VM
Expand Down
1 change: 1 addition & 0 deletions crates/integration-tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub(crate) use integration_tests::{
};

mod tests {
pub mod cloud_init;
pub mod libvirt_base_disks;
pub mod libvirt_port_forward;
pub mod libvirt_upload_disk;
Expand Down
Loading
Loading