Skip to content

henrybarreto/hull

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hull

Hull is a simple utility tool that simplifies creating and managing virtual networks using Open vSwitch.

Requirements

  • rust
  • ovs-vsctl, ovs-ofctl
  • ip
  • ping

Installation

  1. Clone this repository:
git clone https://github.com/henrybarreto/hull
  1. Install the CLI tool using Cargo:
cargo install --path client

This installs the hull client from the client workspace member.

Install the daemon separately:

cargo install --path daemon

Start hulld first, then use hull from another terminal.

  1. Test it:
hull --version

Configuration & environment

Hull determines its on-disk layout and configuration file location from the following sources (in precedence order):

  • CLI --config <path> argument (highest precedence)
  • HULL_PATH environment 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 default hull.json. Resolution order when this is not set:
    1. $XDG_DATA_HOME/hull if XDG_DATA_HOME is set
    2. /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.

Example usage

  1. Start the daemon:
sudo hulld
  1. Initialize the Hull project:
hull init
  1. Create a network switch:
hull switch create sw0 10.0.0.0 24
  1. Create a network interface:
hull interface create tap0
  1. Add a port to the switch:
hull switch port create port0 sw0 tap0
  1. Create a router:
hull router create router0
  1. Attach the switch to the router:
hull router attach router0 sw0

Now, 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.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Hull is a simple utility tool that simplifies creating and managing virtual networks using Open vSwitch.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages