An overview of the architecture can be found at netplan.io/design
Find the full documentation for Netplan on "Read the Docs".
To contribute documentation, these steps should get you started:
-
Fork and clone the repo:
git clone git@github.com:your_user_name/netplan.git -
Create a new branch:
git checkout -b <your_branch_name> -
Navigate to the
doc/directory and make your contribution:cd doc -
View your documentation in the browser by running the
makecommand from within thedoc/directory:make run -
Test your contribution to ensure good quality.
-
Push your contribution to GitHub and create a pull request.
If you face issues, refer to our comprehensive contribution guide.
Install the required build and test dependencies (Ubuntu/Debian):
sudo apt install \
build-essential \
pkg-config \
meson \
libglib2.0-dev \
libyaml-dev \
libsystemd-dev \
uuid-dev \
bash-completion \
python3-dev \
python3-cffi \
python3-coverage \
python3-pytest \
python3-pytest-cov \
pyflakes3 \
pycodestyle \
libcmocka-dev \
gcovr \
pandocA Makefile wrapper is also provided for simplified usage. For that approach, please refer to the Build using Makefile section below.
Steps to build Netplan using the Meson build system inside the build/ directory:
- meson setup build --prefix=/usr [-Db_coverage=true]
- meson compile -C build
- meson test -C build --verbose [TEST_NAME]
- meson install -C build --destdir ../tmproot
Convenience targets are available via make:
-
makeormake default
Set up the build directory (_build) and build the project -
make check
Build and run all tests in_build -
make linting
Run Mesonlintingandcodestyletest targets -
make install [DESTDIR=../tmproot]
Build and install into a staging root (defaults to../tmproot) -
make clean
Remove generated build and test artifacts -
make run ARGS='<command>'
Run the locally built netplan CLI with the appropriate environment, for example, to runnetplan help:$ make run ARGS="help"
After running:
$ make
$ make installthe locally built netplan can be tested without installing it system-wide:
$ make run ARGS="<command>"This wrapper sets the required environment variables (such as NETPLAN_GENERATE_PATH) automatically. These are needed because the Python CLI resolves binary and library paths at runtime.
As an example, let's use make run to run netplan info:
$ make run ARGS="info"
# output:
netplan.io:
website: "https://netplan.io/"
features:
- dhcp-use-domains
- auth-phase2
...Please file bug reports in Launchpad.
Please join us on IRC in #netplan at Libera.Chat.
Our mailing list is here.
Email the list at netplan-developers@lists.launchpad.net.