Hull is a simple utility tool that simplifies creating and managing virtual networks using Open vSwitch.
- rust
- ovs-vsctl, ovs-ofctl
- ip
- ping
- Clone this repository:
git clone https://github.com/henrybarreto/hull- Install the CLI tool using Cargo:
cargo install --path clientThis installs the hull client from the client workspace member.
Install the daemon separately:
cargo install --path daemonStart hulld first, then use hull from another terminal.
- Test it:
hull --versionHull determines its on-disk layout and configuration file location from the following sources (in precedence order):
- CLI
--config <path>argument (highest precedence) HULL_PATHenvironment variable (root directory for Hull data)- XDG data directory & defaults described below
Environment variables supported by the codebase:
HULL_PATH— root directory used for images, instances, locks and the defaulthull.json. Resolution order when this is not set:$XDG_DATA_HOME/hullifXDG_DATA_HOMEis set/var/lib/hull
The configuration file loaded is either the path passed via --config or
{HULL_PATH}/hull.json (or the default root described above). Use
HULL_PATH to keep Hull data in a custom workspace, or pass --config to load
an explicit JSON file.
- Start the daemon:
sudo hulld- Initialize the Hull project:
hull init- Create a network switch:
hull switch create sw0 10.0.0.0 24- Create a network interface:
hull interface create tap0- Add a port to the switch:
hull switch port create port0 sw0 tap0- Create a router:
hull router create router0- Attach the switch to the router:
hull router attach router0 sw0Now, every VM connected to sw0 can communicate with each other and the router.
You can further configure the router to enable external connectivity by setting
a link interface.
This project is licensed under the MIT License. See the LICENSE file for details.