Top-level VyOS image builder. Orchestrates the multi-step build that produces
a hybrid live ISO from Debian packages and VyOS-specific .debs. The official
starting point for anyone building a VyOS image from source. The ISO is
bootable on both BIOS and UEFI systems.
- Python entry-point for ISO image build is (
build-vyos-image) and someMakefilewrappers. - Container-based build via
docker/(Dockerfilepulls Debian + tooling). - Debian
live-build(forked at https://github.com/vyos/vyos-live-build) consumed at ISO assembly time as prebuilt.debpackage. - Configuration: TOML used as markup language which supports merging multiple
snippets into one final configuration. Best suited for inheritance. TOML
files used during build can be found here:
data/architectures/*.tomldata/build-flavors/*.tomldata/build-types/*.tomldata/defaults.toml
- TOML files are combined by
build-vyos-imageinto a single Python dict and used to instructlive-buildto create the ISO image.
make generic # builds the generic flavor
./build-vyos-image generic # equivalent direct call
- Must run inside the build container. Container
Dockerfilelocated indockerfolder. Usedocker build -t vyos/vyos-build dockerfrom top-level dir. - Git submodules are not in use. Prebuilt binary packages are pulled from
https://packages.vyos.net/repositories/<train>at build time.
- Requires ISO image generated from build instructions
Makefilehas several targets starting withtest*. Each target tests a different path of the resulting image.- The
test-ci-qcow2target requires a QCOW2 image being generated as special flavor and is used to validate cloud-init by providing the necessary seed data. Exclude this from automated tests. - Test framework is orchestrated by
scripts/check-qemu-installand internally also referred to as smoketests. - There is no need to run all tests all the time, a single smoketest like the
one named
test_protocols_bgp.pycan be executed by:make test -- --match protocols_bgp - Test framework must run as user
rootto spawn QEMU VMs.
build-vyos-image- Python entry-point.Makefile- flavor dispatcher (make <flavor>→./build-vyos-image <flavor>).data/defaults.toml- Holds cross-flavor defaults like Linux Kernel version, URL to VyOS Debian package repository, release branch/train or bootloadersdata/build-flavors/- per-flavor TOML descriptors (generic.tomlships canonical).docker/- build container.scripts/-check-qemu-install(smoketest harness), helper scripts.tools/,packages/- supporting assets.
- All listed packages can be found in the GitHub
vyosorganisation - Consumes pre-built
*.debpackages. The most important ones are:vyos-1xCLI representation and all configure/op-mode scriptsvyos-cloud-initour Cloud-init handlervyos-http-api-toolsHTTP API RESTful and GraphQLlive-bootfork with custom patches not yet upstreamedhvinfotool to get information from running Hypervisorvyatta-bashfork of bash to implement CLI completion helpvyatta-biosdevnameget NIC information also from Hypervisor platformsvyatta-cfgreferred to as the old configuration backend running CStore. It is old but very much in operation.
- ISO assembly delegates to
vyos/vyos-live-build(Debian live-build fork) instead of the upstream live-build version. - Smoketests inside the QEMU harness exercise
vyos-1x'ssmoketest/suite.
- Commit/PR title must follow:
component: T1234: description. Phorge IDs at https://vyos.dev. Enforced bycheck-pr-message.ymlreusable workflow. - See also
CONTRIBUTING.mdfor further hints on the commit messages. - Linting: unused-imports (Pylint) and J2 lint (note: workflow file is named
linit-j2.ymlin this repo — known cosmetic typo). Both inherited fromvyos/.github@production. - PR conflicts are flagged automatically via
check-pr-conflicts.yml(reusablecheck-pr-merge-conflict.ymlfromvyos/.github@production).
- No
git submodule initneeded - packages come from the apt mirror at build time. - Bumping
data/defaults.toml'sdebian_distributionorkernel_versionis a coordinated change touching multiple build-set repos. Open a Phorge task and coordinate with maintainers. - Reusable workflow
trigger_rebuild_packages.ymlfires RESTworkflow_dispatchinto$REMOTE_OWNER/vyos-build-packages(REMOTE_OWNER = the private side). The dispatcher runs asvyosbot. - For new flavors, add a
data/build-flavors/<flavor>.tomland document the resultingmake <flavor>target.