I tried following the instructions at Build VyOS — VyOS 1.4.x (sagitta) documentation but I must be missing something here?
I noticed that the iso that got built didnt include my “T1234” branch with fixes at all but the original older files were still in the iso, so what did I do wrong?
Anyone in the forum who could write some ELI5 instructions on this topic?
What I want to do:
-
Before you start make sure to install package
docker-ce
and then either run the docker (build) usingsudo
or add current user to docker-group on the system (which it seems as similar risk). -
Build my own dockerfile based on GitHub - vyos/vyos-build: VyOS image build scripts (latest current).
Solution?
1.1)
mkdir vyos && cd vyos && git clone -b current --single-branch https://github.com/vyos/vyos-build
1.2)
And then create a /home/username/vyos/vybld.sh
with following content:
#!/bin/sh
docker run --rm -it \
-v "$(pwd)":/vyos \
-v "$HOME/.gitconfig":/etc/gitconfig \
-v "$HOME/.bash_aliases":/home/vyos_bld/.bash_aliases \
-v "$HOME/.bashrc":/home/vyos_bld/.bashrc \
-w /vyos --privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 \
-e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) \
vyos/vyos-build:current bash
1.3)
Finally run ./vybld.sh
.
Variant of above:
- Build my own dockerfile based on a branch I have created at github for example T1234 at https://github.com/username/vyos-build
Solution?
2.1)
mkdir vyos && cd vyos && git clone -b T1234 --single-branch https://github.com/username/vyos-build
Then the remaining steps are as chapter 1 above?
- Build my own ISO to be able to run smoketests, also based on a branch I have created at github for example T1234 at https://github.com/username/vyos-1x
Solution?
3.0)
First do chapter 1 or 2 above.
Then:
3.1)
mkdir vyos && cd vyos && git clone -b 1234 --single-branch https://github.com/username/vyos-1x
3.2)
Smoketest image:
docker run --rm --privileged -v ./vyos-build/:/vyos -w /vyos vyos/vyos-build:current sudo --preserve-env make clean
docker run --rm --privileged -v ./vyos-build/:/vyos -w /vyos vyos/vyos-build:current sudo --preserve-env ./build-vyos-image --architecture amd64 --build-by "none@example.com" --vyos-mirror https://rolling-packages.vyos.net/current/ --debian-mirror http://deb.debian.org/debian/ --build-type release --custom-package vyos-1x-smoketest --version "1337-2023" iso
Release image:
docker run --rm --privileged -v ./vyos-build/:/vyos -w /vyos vyos/vyos-build:current sudo --preserve-env make clean
docker run --rm --privileged -v ./vyos-build/:/vyos -w /vyos vyos/vyos-build:current sudo --preserve-env ./build-vyos-image --architecture amd64 --build-by "none@example.com" --vyos-mirror https://rolling-packages.vyos.net/current/ --debian-mirror http://deb.debian.org/debian/ --build-type release --version "1337-2023" iso
Finally to run the smoketests, boot the iso (do there perhaps already exist a script for this?) and run:
/usr/bin/vyos-smoketest > /home/vyos/smoketest.log
Also do you have to install VyOS on a drive for the smoketests to run properly or is it fine to run it as a live boot image?
Wild guess, is it “vyos/vyos-build:current” which I should change into “vyos/vyos-build:T1234”?