Massive credits go to one of my best friends, and mentor Jonathan "stamp" G for all the help, coaching and lessons during this project. Without your support this project would never have been a reality.
VMware #clarity-ui channel for being super helpful with newbie questions about clarity!
go-via is a single binary, that when executed performs the tasks of dhcpd, tftpd, httpd, and ks.cfg generator, with a angular front-end, and http-rest backend written in go, and sqlite for persisting.
The old version of VIA had some things it didn't support which made it hard to run in enterprise environments. go-via brings added support for the following.
- IP-Helper , you can have the go-via binary running on any network you want and use RFC 3046 IP-Helper to relay DHCP requests to the server.
- UEFI , go-via does not support BIOS, but does support UEFI and secure-boot. BIOS may be added in the future.
- Virtual environments, it does not block nested esxi host deployment.
- HTTP-REST, everything you can do in the UI, you can do via automation also.
- Options to perform all prerequisites for VMware Cloud Foundation 4.x/5.x
UEFI x86_64 INTEL/AMD architecture UEFI arm_64 ARM architecture (including Project Monterey/SmartNICs)
username: admin
password: VMware1!
port: 8443
install docker-ce (https://docs.docker.com/engine/install/ubuntu/)
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
install latest docker-compose,
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose
Option A: create the following docker-compose.yaml file to not specify a config file (dhcpd will serve on all interfaces)
version: "3.9"
services:
go-via:
image: maxiepax/go-via:latest
network_mode: host
volumes:
- ./tftp:/go/tftp
- ./database:/go/database
- ./config:/go/config
- ./cert:/go/cert
- ./secret:/go/secret
Option B: or create this docker-compose.yaml to specify a config file, and place config in ./config/config.json
version: "3.9"
services:
go-via:
image: maxiepax/go-via:latest
network_mode: host
volumes:
- ./tftp:/go/tftp
- ./database:/go/database
- ./config:/go/config
- ./cert:/go/cert
- ./secret:/go/secret
command: -file /go/config/config.json
Example config file
{
"network": {
"interfaces": ["ens224", "ens192"]
},
"port": 443
}
now start the container
sudo docker-compose up -d
Most linux distributions should work, this has been tested on Ubuntu 20.20.
#wget the release you want to download, e.g go-via_.<release>_linux_amd64.tar.gz
wget https://github.com/maxiepax/go-via/releases/download/<release>/go-via_.<release>_linux_amd64.tar.gz
#untar/extract it
tar -zxvf go-via_.<release>_linux_amd64.tar.gz
This will extract the files README.MD (this document) and go-via binary.
Optional: example config files.
Multi interface, and custom port.
{
"network": {
"interfaces": ["ens224", "ens192"]
},
"port": 443
}
Single interface, default port 8443
{
"network": {
"interfaces": ["ens224"]
}
}
Now start the binary as super user, (optionally: pointing to the config file.)
#start the application with default settings
sudo ./go-via
#start the application with normal debug level
sudo ./go-via -file config.json
#start the application with verbose debug level
sudo ./go-via -file config.json -debug
Example systemd.service config file
[Unit]
Description=go-via
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=1
User=root
ExecStart=/home/govia/go-via
WorkingDirectory=/home/govia/go-via
[Install]
WantedBy=multi-user.target
You should be greeted with the following output.
INFO[0000] Startup commit=none date=unknown version=dev
WARN[0000] no interfaces have been configured, trying to find interfaces to serve to, will serve on all.
INFO[0000] Existing database sqlite-database.db found
INFO[0000] Starting dhcp server int=ens224 ip=172.16.100.1 mac="00:0c:29:91:cf:eb"
INFO[0000] Starting dhcp server int=ens192 ip=192.168.1.173 mac="00:0c:29:91:cf:e1"
INFO[0000] Starting dhcp server int=docker0 ip=172.17.0.1 mac="02:42:09:9f:04:4f"
INFO[0000] cert server.crt="server.crt found"
INFO[0000] Webserver port=":8443"
with Ubuntu 20.20 installed, do the following: install golang 1.16.x compiler
sudo snap install go --classic
install npm
sudo apt-get install npm
install angular-cli
sudo npm install npm@latest -g
sudo npm install -g @angular/cli
start two terminals:
terminal 1:
mkdir ~/go
cd ~/go
git clone https://github.com/maxiepax/go-via.git
cd go-via
go run *.go
terminal 2:
cd ~/go-via/web
npm install
# to only allow localhost access to gui:
ng serve
# to allow anyone access to gui:
ng serve --host 0.0.0.0
To troubleshoot, enable debugging.
Option 1: Docker Container. Append -debug to command.
command: -debug
or
command: -file /go/config/config.json -debug
Option 2: Source or Binary. Append -debug to command
./go-via -debug
Please note that go-via is still under heavy development, and there may be bugs. Following is the list of known issues.
currently tracking no known issues! :D
- Currently no requests have been made for features. Please submit any ideas you have.