netplanner icon indicating copy to clipboard operation
netplanner copied to clipboard

Netplanner is netplan.io compatible CLI which adds more netdev devices.

netplanner

[!WARNING] netplanner is deprecated.

We've created this project to implement a few features that we were missing from canonical/netplan. Since version 1.0.0 of netplan, all features we require are implemented upstream. A few of them were also contributed by us. We will therefore retire this project in favour of upstream.

Description

Netplanner implements the top-down datacenter approach for IP and Network Interface Management. It plans the network on the host by using systemd-networkd as the underlying network configuration provider.

It refuses to implement L2 capabilities such as DHCP.

It also implements interfaces which are needed for L3 capabilities such as Veth and Dummy interface types.

It is open to be extended with other providers which have a different text-based input.

Architecture

Netplanner Overview and Architecture

Licenses

Running Code Licenses

Building Tool for Dynamic Linked CLI Binary

We relicensed this project to GPLv3 recently to cater for derivative work from netplan and to ease integration.

How to use it

# This is a developer command --local ensures that ./ is set on the output.
$ netplanner --local --config examples/worker-config-old.yaml --output /run/systemd/network --only-networkd configure

$ netplanner --help
usage: netplanner [-h] [--version] [--config CONFIG] [--debug] [--local] [--only-sriov] [--reload] [--only-networkd] [--output OUTPUT] {configure,apply,generate,rebind} ...

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --config CONFIG       Defines the path to the configuration file or directory.
  --debug               Enables debug logging.
  --local               This templates the configuration into a local directory
  --only-sriov          This only runs sriov configuration on supported interfaces.
  --reload              This reloads networkd and networkctl via systemd.
  --only-networkd       This templates only networkd configuration files.
  --output OUTPUT       The output directory to which the files will be written.

subcommands:
  valid subcommands

  {configure,apply,generate,rebind}
                        sub-command help
    configure           Configure Network Adapters flawlessly with the knowledge of the netplanner.
    apply               Configure Network Adapters flawlessly with the knowledge of the netplanner.
    generate            Configure Network Adapters flawlessly with the knowledge of the netplanner.
    rebind              Rebind SR-IOV interfaces

Examples Directory

Inside the examples directory you can have a overview of different types of configurations.