Skip to content

Commit a75b180

Browse files
authored
Merge pull request #1591 from dmbaturin/sagitta-updates
Updates for project changes since Sagitta release
2 parents 5cc3e61 + 9e51e4d commit a75b180

File tree

3 files changed

+24
-329
lines changed

3 files changed

+24
-329
lines changed

docs/contributing/build-vyos.rst

+16-173
Original file line numberDiff line numberDiff line change
@@ -14,72 +14,41 @@ Building using a :ref:`build_docker` container, although not the only way,
1414
is the easiest way as all dependencies are managed for you. However, you can
1515
also set up your own build machine and run a :ref:`build_native`.
1616

17-
.. note:: Starting with VyOS 1.2 the release model of VyOS has changed. VyOS
18-
is now **free as in speech, but not as in beer**. This means that while
19-
VyOS is still an open source project, the release ISOs are no longer free
20-
and can only be obtained via subscription, or by contributing to the
21-
community.
17+
.. note:: Starting with VyOS 1.4, only source code and Debian package repositories
18+
of the rolling release (the **current** branch) are publicly available.
2219

23-
The source code remains public and an ISO can be built using the process
24-
outlined in this chapter.
20+
The source code and pre-built Debian package repositories of LTS releases
21+
are only available to subscription holders (customers and active community members
22+
with contributors subscriptions).
2523

26-
The following includes the build process for VyOS 1.2 to the latest version.
24+
The following includes the build process for VyOS rolling release.
2725

2826
This will guide you through the process of building a VyOS ISO using Docker_.
29-
This process has been tested on clean installs of Debian Jessie, Stretch, and
30-
Buster.
27+
This process has been tested on clean installs of Debian Bookworm.
3128

3229
.. _build_native:
3330

3431
Native Build
3532
============
3633

37-
To build VyOS natively you require a properly configured build host with the
34+
To build VyOS natively you need a properly configured build host with the
3835
following Debian versions installed:
3936

40-
- Debian Jessie for VyOS 1.2 (crux)
41-
- Debian Buster for VyOS 1.3 (equuleus)
42-
- Debian Bookworm for VyOS 1.4 (sagitta)
43-
- Debian Bookworm for the upcoming VyOS 1.5/circinus/current
44-
(subject to change) - aka the rolling release
37+
- Debian Bookworm
4538

4639
To start, clone the repository to your local machine:
4740

4841
.. code-block:: none
4942
50-
# For VyOS 1.2 (crux)
51-
$ git clone -b crux --single-branch https://github.com/vyos/vyos-build
52-
53-
# For VyOS 1.3 (equuleus)
54-
$ git clone -b equuleus --single-branch https://github.com/vyos/vyos-build
55-
56-
# For VyOS 1.4 (sagitta)
57-
$ git clone -b sagitta --single-branch https://github.com/vyos/vyos-build
58-
59-
# For VyOS 1.5 (circinus,current)
60-
$ git clone -b current --single-branch https://github.com/vyos/vyos-build
61-
62-
$ cd vyos-build
63-
64-
# For VyOS 1.2 (crux) and VyOS 1.3 (equuleus)
65-
$ ./configure --architecture amd64 --build-by "[email protected]"
66-
$ sudo make iso
67-
68-
# For VyOS 1.4 (sagitta)
6943
$ sudo make clean
70-
$ sudo ./build-vyos-image iso --architecture amd64 --build-by "[email protected]"
71-
72-
# For VyOS 1.5 (circinus,current)
73-
$ sudo make clean
74-
$ sudo ./build-vyos-image generic --architecture amd64 --build-by "[email protected]"
44+
$ sudo ./build-vyos-image --architecture amd64 --build-by "[email protected]" generic
7545
7646
For the packages required, you can refer to the ``docker/Dockerfile`` file
7747
in the repository_. The ``./build-vyos-image`` script will also warn you if any
7848
dependencies are missing.
7949

8050
This will guide you through the process of building a VyOS ISO using Docker.
81-
This process has been tested on clean installs of Debian Bullseye (11) and
82-
Bookworm (12).
51+
This process has been tested on clean installs of Bookworm (12).
8352

8453
.. _build_docker:
8554

@@ -142,10 +111,7 @@ To manually download the container from DockerHub, run:
142111

143112
.. code-block:: none
144113
145-
$ docker pull vyos/vyos-build:crux # For VyOS 1.2
146-
$ docker pull vyos/vyos-build:equuleus # For VyOS 1.3
147-
$ docker pull vyos/vyos-build:sagitta # For VyOS 1.4
148-
$ docker pull vyos/vyos-build:current # For VyOS 1.5 rolling release
114+
$ docker pull vyos/vyos-build:current # For VyOS rolling release
149115
150116
Build from source
151117
^^^^^^^^^^^^^^^^^
@@ -154,20 +120,10 @@ The container can also be built directly from source:
154120

155121
.. code-block:: none
156122
157-
# For VyOS 1.2 (crux)
158-
$ git clone -b crux --single-branch https://github.com/vyos/vyos-build
159-
# For VyOS 1.3 (equuleus)
160-
$ git clone -b equuleus --single-branch https://github.com/vyos/vyos-build
161-
# For VyOS 1.4 (sagitta)
162-
$ git clone -b sagitta --single-branch https://github.com/vyos/vyos-build
163-
# For VyOS 1.5 (circinus,current)
164123
$ git clone -b current --single-branch https://github.com/vyos/vyos-build
165124
166125
$ cd vyos-build
167-
$ docker build -t vyos/vyos-build:crux docker # For VyOS 1.2
168-
$ docker build -t vyos/vyos-build:equuleus docker # For VyOS 1.3
169-
$ docker build -t vyos/vyos-build:sagitta docker # For VyOS 1.4
170-
$ docker build -t vyos/vyos-build:current docker # For VyOS 1.5 rolling release
126+
$ docker build -t vyos/vyos-build:current docker
171127
172128
.. note:: VyOS has switched to Debian (12) Bookworm in its ``current`` branch,
173129
Due to software version updates, it is recommended to use the official
@@ -177,7 +133,7 @@ Tips and Tricks
177133
---------------
178134

179135
You can create yourself some handy Bash aliases to always launch the latest -
180-
per release train (`current` or `crux`) - container. Add the following to your
136+
per release train (`current`) - container. Add the following to your
181137
``.bash_aliases`` file:
182138

183139
.. code-block:: none
@@ -191,16 +147,7 @@ per release train (`current` or `crux`) - container. Add the following to your
191147
-e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) \
192148
vyos/vyos-build:current bash'
193149
194-
alias vybld_crux='docker pull vyos/vyos-build:crux && docker run --rm -it \
195-
-v "$(pwd)":/vyos \
196-
-v "$HOME/.gitconfig":/etc/gitconfig \
197-
-v "$HOME/.bash_aliases":/home/vyos_bld/.bash_aliases \
198-
-v "$HOME/.bashrc":/home/vyos_bld/.bashrc \
199-
-w /vyos --privileged --sysctl net.ipv6.conf.lo.disable_ipv6=0 \
200-
-e GOSU_UID=$(id -u) -e GOSU_GID=$(id -g) \
201-
vyos/vyos-build:crux bash'
202-
203-
Now you are prepared with two new aliases ``vybld`` and ``vybld_crux`` to spawn
150+
Now you are prepared with a new aliase ``vybld`` to spawn
204151
your development containers in your current working directory.
205152

206153
.. note:: Some VyOS packages (namely vyos-1x) come with build-time tests which
@@ -220,20 +167,9 @@ Build ISO
220167

221168
Now as you are aware of the prerequisites we can continue and build our own
222169
ISO from source. For this we have to fetch the latest source code from GitHub.
223-
Please note as this will differ for both `current` and `crux`.
224170

225171
.. code-block:: none
226172
227-
# For VyOS 1.2 (crux)
228-
$ git clone -b crux --single-branch https://github.com/vyos/vyos-build
229-
230-
# For VyOS 1.3 (equuleus)
231-
$ git clone -b equuleus --single-branch https://github.com/vyos/vyos-build
232-
233-
# For VyOS 1.4 (sagitta)
234-
$ git clone -b sagitta --single-branch https://github.com/vyos/vyos-build
235-
236-
# For VyOS 1.5 (circinus,current)
237173
$ git clone -b current --single-branch https://github.com/vyos/vyos-build
238174
239175
@@ -243,57 +179,20 @@ Now a fresh build of the VyOS ISO can begin. Change directory to the
243179
.. code-block:: none
244180
245181
$ cd vyos-build
246-
# For VyOS 1.2 (crux)
247-
$ docker run --rm -it --privileged -v $(pwd):/vyos -w /vyos vyos/vyos-build:crux bash
248-
249-
# For VyOS 1.3 (equuleus)
250-
$ docker run --rm -it --privileged -v $(pwd):/vyos -w /vyos vyos/vyos-build:equuleus bash
251-
252-
# For VyOS 1.4 (sagitta)
253-
$ docker run --rm -it --privileged -v $(pwd):/vyos -w /vyos vyos/vyos-build:sagitta bash
254-
255-
# For VyOS 1.5 (current)
256182
$ docker run --rm -it --privileged -v $(pwd):/vyos -w /vyos vyos/vyos-build:current bash
257183
258184
.. code-block:: none
259185
260-
# For MacOS (crux, equuleus, sagitta)
261-
$ git clone https://github.com/vyos/vyos-utils-misc
262-
$ cd build-tools/macos-build
263-
264-
# For VyOS 1.2 (crux)
265-
$ os=jessie64 branch=crux make build
266-
267-
# For VyOS 1.3 (equuleus)
268-
$ os=buster64 branch=equuleus make build
269-
270-
# For VyOS 1.4 (sagitta)
271-
$ os=buster64 branch=sagitta make build
272-
273186
Start the build:
274187

275188
.. code-block:: none
276189
277-
# For VyOS 1.2 (crux) and VyOS 1.3 (equuleus)
278-
vyos_bld@8153428c7e1f:/vyos$ ./configure --architecture amd64 --build-by "[email protected]"
279-
vyos_bld@8153428c7e1f:/vyos$ sudo make iso
280-
281-
# For VyOS 1.4 (sagitta)
282190
vyos_bld@8153428c7e1f:/vyos$ sudo make clean
283-
vyos_bld@8153428c7e1f:/vyos$ sudo ./build-vyos-image iso --architecture amd64 --build-by "[email protected]"
284-
285-
# For VyOS 1.5 (circinus,current)
286-
vyos_bld@8153428c7e1f:/vyos$ sudo make clean
287-
vyos_bld@8153428c7e1f:/vyos$ sudo ./build-vyos-image generic --architecture amd64 --build-by "[email protected]"
191+
vyos_bld@8153428c7e1f:/vyos$ sudo ./build-vyos-image --architecture amd64 --build-by "[email protected]" generic
288192
289193
When the build is successful, the resulting iso can be found inside the
290194
``build`` directory as ``live-image-[architecture].hybrid.iso``.
291195

292-
Good luck!
293-
294-
.. hint:: Building VyOS on Windows WSL2 with Docker integrated into WSL2 will
295-
work like a charm. No problems are known so far!
296-
297196
.. _build source:
298197

299198

@@ -736,39 +635,6 @@ Simply use our wrapper script to build all of the driver modules.
736635
I: Cleanup qat source
737636
738637
739-
After compiling the packages you will find yourself the newly generated `*.deb`
740-
binaries in ``vyos-build/packages/linux-kernel`` from which you can copy them
741-
to the ``vyos-build/packages`` folder for inclusion during the ISO build.
742-
743-
744-
Mellanox OFED
745-
^^^^^^^^^^^^^
746-
747-
The Mellanox OFED drivers do not come from a Git repository, instead we fetch the
748-
tarball from Nvidia and compile the sources its contains against our kernel tree.
749-
750-
Simply use our wrapper script to build all of the driver modules.
751-
752-
.. code-block:: none
753-
754-
./build-mellanox-ofed.sh
755-
...
756-
Below is the list of OFED packages that you have chosen
757-
(some may have been added by the installer due to package dependencies):
758-
759-
ofed-scripts
760-
mlnx-tools
761-
mlnx-ofed-kernel-utils
762-
mlnx-ofed-kernel-modules
763-
...
764-
Building packages
765-
Building DEB for ofed-scripts-24.04.OFED.24.04.0.6.6 (ofed-scripts)...
766-
Running /usr/bin/dpkg-buildpackage -us -uc
767-
Installing ofed-scripts-24.04.OFED.24.04.0.6.6...
768-
Running /usr/bin/dpkg -i --force-confmiss '/vyos/packages/linux-kernel/MLNX_OFED_SRC-debian-24.04-0.6.6.0/DEBS/debian12.1/x86_64/ofed-scripts_24.04.OFED.24.04.0.6.6-1_amd64.deb'
769-
Building DEB for mlnx-tools-24.04.0 (mlnx-tools)...
770-
771-
772638
After compiling the packages you will find yourself the newly generated `*.deb`
773639
binaries in ``vyos-build/packages/linux-kernel`` from which you can copy them
774640
to the ``vyos-build/packages`` folder for inclusion during the ISO build.
@@ -816,29 +682,6 @@ during ISO build.
816682
817683
.. start_vyoslinter
818684
819-
820-
821-
Virtualization Platforms
822-
========================
823-
824-
QEMU
825-
----
826-
827-
Run the following command after building the ISO image.
828-
829-
.. code-block:: none
830-
831-
$ make qemu
832-
833-
VMware
834-
------
835-
836-
Run the following command after building the QEMU image.
837-
838-
.. code-block:: none
839-
840-
$ make vmware
841-
842685
.. _build_packages:
843686

844687
********

0 commit comments

Comments
 (0)