diff options
Diffstat (limited to 'data/build-flavors')
-rw-r--r-- | data/build-flavors/README.md | 76 | ||||
-rw-r--r-- | data/build-flavors/azure-iso.toml | 5 | ||||
-rw-r--r-- | data/build-flavors/edgecore.toml | 46 | ||||
-rw-r--r-- | data/build-flavors/iso.toml | 14 | ||||
-rw-r--r-- | data/build-flavors/xcpng.toml | 6 |
5 files changed, 147 insertions, 0 deletions
diff --git a/data/build-flavors/README.md b/data/build-flavors/README.md new file mode 100644 index 00000000..19716255 --- /dev/null +++ b/data/build-flavors/README.md @@ -0,0 +1,76 @@ +# VyOS build flavors + +VyOS supports multiple different hardware and virtual platforms. +Those platforms often need custom packages and may require custom +configs. To make maintenance of existing flavors simpler +and to allow everyone to make and maintain their own flavors, +the build scripts support storing flavor configuration in [TOML](https://toml.io) files. + +Flavor files must be in `data/build-flavors`. Here's an example: + +```toml +# Generic (aka "universal") ISO image + +image_format = "iso" + +# Include these packages in the image regardless of the architecture +packages = [ + # QEMU and Xen guest tools exist for multiple architectures + "qemu-guest-agent", + "vyos-xe-guest-utilities", +] + +[architectures.amd64] + # Hyper-V and VMware guest tools are x86-only + packages = ["hyperv-daemons", "vyos-1x-vmware"] +``` + +## Image format + +The `image_format` option specifies the default format to build. + +```toml +image_format = "iso" +``` + +**Note:** currently, ISO is the only supported format, +support for different flavors is in progress. + +## Including custom packages + +If you want the build scripts to include custom packages from repositories +in the image, you can list them in the `packages` field. + +For example, this is how to include the GNU Hello package: + +```toml +packages = ['hello'] +``` + +It's possible to include packages only in images with certain build architectures +by placing them in a subtable. + +If you want to include GNU Hello only in AMD64 images, do this: + +```toml +[architectures.amd64] + packages = ['hello'] +``` + +## Including custom files + +You can include files inside the SquashFS filesystem by adding entries +to the `includes_chroot` array. + +```toml +[[includes_chroot]] + path = "etc/question.txt" + data = ''' +Can you guess how this file ended up in the image? + ''' + + path = "etc/answer.txt" + data = ''' +It was in the flavor file! + ''' +``` diff --git a/data/build-flavors/azure-iso.toml b/data/build-flavors/azure-iso.toml new file mode 100644 index 00000000..b4774483 --- /dev/null +++ b/data/build-flavors/azure-iso.toml @@ -0,0 +1,5 @@ +image_format = "iso" + +packages = ["waagent"] + + diff --git a/data/build-flavors/edgecore.toml b/data/build-flavors/edgecore.toml new file mode 100644 index 00000000..efea4863 --- /dev/null +++ b/data/build-flavors/edgecore.toml @@ -0,0 +1,46 @@ +# ISO image for EdgeCore routers + +image_format = "iso" + +# udev rules for correct ordering of onboard NICs +[[includes_chroot]] + path = "lib/udev/rules.d/64-vyos-SAF51015I-net.rules" + data = ''' +ATTR{[dmi/id]board_name}!="SAF51015I-0318-EC", GOTO="end_ec_nic" + +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:02:00.0", ENV{VYOS_IFNAME}="eth1" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:03:00.0", ENV{VYOS_IFNAME}="eth2" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:04:00.0", ENV{VYOS_IFNAME}="eth3" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:05:00.0", ENV{VYOS_IFNAME}="eth4" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:06:00.0", ENV{VYOS_IFNAME}="eth5" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:06:00.1", ENV{VYOS_IFNAME}="eth6" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:06:00.2", ENV{VYOS_IFNAME}="eth7" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:06:00.3", ENV{VYOS_IFNAME}="eth8" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:0a:00.0", ENV{VYOS_IFNAME}="eth9" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:0a:00.1", ENV{VYOS_IFNAME}="eth10" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:0b:00.0", ENV{VYOS_IFNAME}="eth11" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:0b:00.1", ENV{VYOS_IFNAME}="eth12" + +LABEL="end_ec_nic" + +''' + +[[includes_chroot]] + path = "lib/udev/rules.d/64-vyos-SAF51003I-net.rules" + data = ''' +ATTR{[dmi/id]board_name}!="SAF51003I", GOTO="end_ec_nic" + +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:02:00.0", ENV{VYOS_IFNAME}="eth1", ATTR{ifalias}="LAN1" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:02:00.1", ENV{VYOS_IFNAME}="eth2", ATTR{ifalias}="LAN2" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:02:00.2", ENV{VYOS_IFNAME}="eth3", ATTR{ifalias}="LAN3" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:02:00.3", ENV{VYOS_IFNAME}="eth4", ATTR{ifalias}="LAN4" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:05:00.0", ENV{VYOS_IFNAME}="eth5", ATTR{ifalias}="LAN5" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:05:00.1", ENV{VYOS_IFNAME}="eth6", ATTR{ifalias}="LAN6" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:05:00.2", ENV{VYOS_IFNAME}="eth7", ATTR{ifalias}="LAN7" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:05:00.3", ENV{VYOS_IFNAME}="eth8", ATTR{ifalias}="LAN8" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:08:00.0", ENV{VYOS_IFNAME}="eth9", ATTR{ifalias}="DMZ" +ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:08:00.1", ENV{VYOS_IFNAME}="eth10", ATTR{ifalias}="WAN" + +LABEL="end_ec_nic" + +''' diff --git a/data/build-flavors/iso.toml b/data/build-flavors/iso.toml new file mode 100644 index 00000000..9bf7044d --- /dev/null +++ b/data/build-flavors/iso.toml @@ -0,0 +1,14 @@ +# Generic (aka "universal") ISO image + +image_format = "iso" + +# Include these packages in the image regardless of the architecture +packages = [ + # QEMU and Xen guest tools exist for multiple architectures + "qemu-guest-agent", + "vyos-xe-guest-utilities", +] + +[architectures.amd64] + # Hyper-V and VMware guest tools are x86-only + packages = ["hyperv-daemons", "vyos-1x-vmware"] diff --git a/data/build-flavors/xcpng.toml b/data/build-flavors/xcpng.toml new file mode 100644 index 00000000..81689b5e --- /dev/null +++ b/data/build-flavors/xcpng.toml @@ -0,0 +1,6 @@ +# Installation ISO for the XCP-ng virtualization platform + +image_formats = "iso" + +# Include these packages in the image +packages = ["xe-guest-utilities"] |