Project aimed at building ISOs for OpenLAN Gateway
- Docker
- Linux or macOS operating system (sorry not sorry Windows)
- Run
script/build
The result of this will be an ISO in the project working folder.
- Boot on the ISO, once the install is completed the server will power-off
- Power back the server
- Login to the Linux host with username
olgadmand passwordolgadm - Edit
/opt/staging_scripts/setup-configand adjust the network interface names and if required the VyOS VM sizing parameters- If you will be using the "Standalone mode", you might need to adjust the VyOS rolling release path. Reference: https://github.com/vyos/vyos-nightly-build/releases
- Run the setup script:
sudo /opt/staging_scripts/setup-vyos-bridge.shto use the network bridge methodsudo /opt/staging_scripts/setup-vyos-hw-passthru.shto use the hardware passthru for the network interfaces (WIP, not tested)
- Reboot the host
- Connect to the VyOS console with
virsh console vyos - Login with username
vyosand passwordvyos - Type
install imageand press Enter. - Follow the prompts (you can use all defaults)
- Once completed, type
rebootto reboot the VM - For some reason the VyOS VM does not reboot after this first
rebootcommand. You must restart it manually withvirsh start vyos
At this time you can either load a default configuration and use VyOS in a "standalone" mode or have it connected to an OpenWifi Cloud SDK instance.
- SSH to the OLG Ubuntu host
- Run
sudo /opt/staging_scripts/ucentral-setup.sh setupto setup the ucentral-client container- You can also use the following parameters for the
ucentral-setup.shscript:shell: To get access to ucentral container.cleanup: To clean the setup.
- You can also use the following parameters for the
- Copy your certificates to olg and then to container at
/etc/ucentralin order to work with your cloud-controller.sudo docker cp cert.pem ucentral-olg:/etc/ucentral/operational.pemsudo docker cp cas.pem ucentral-olg:/etc/ucentral/operational.casudo docker cp key.pem ucentral-olg:/etc/ucentral/
- Run
sudo /opt/staging_scripts/ucentral-setup.sh shellto get shell access to the ucentral container and perform the following tasks:- Modify
/etc/ucentral/vyos-info.jsonand updatehostvalue to the IP address assigned to the VyOS VM br-wan interface. - Start the ucentral-client:
- Debug mode:
SERIALNUM=my_olg_serial ; URL=my_cloudsdk_uri ; /usr/sbin/ucentral -S $SERIALNUM -s $URL -P 15002 -d - Deamonized mode:
SERIALNUM=my_olg_serial ; URL=my_cloudsdk_uri ; /usr/sbin/ucentral -S $SERIALNUM -s $URL -P 15002 -d & - For example
SERIALNUM=74d4ddb965dcfor which certs are generated,URL=openwifi1.routerarchitects.com, for your OpenWifi Cloud SDK instance.
- Debug mode:
- Modify
Warning
Ucentral Client must be started only after VyOS gets started.
There is a bit of a chicken-and-the-egg scenario if the OLG device was never seen by the OpenWifi Cloud SDK instance. A blank configuration will be pushed to VyOS and the connection with the ucentral client might be broken.
At this time the order of execution should be the following if the OLG device was never seen by the OpenWifi Cloud SDK instance:
- Stop the VyOS VM with
virsh shutdown vyos - Start the ucentral-client
- Populate a configuration in the OpenWifi Cloud SDK for the OLG device
- Restart the VyOS VM with
virsh start vyos - If IP Address of VyOS VM gets changed then reconfigure value of
hostin/etc/ucentral/vyos-info.json, in ucentral and restart ucentral client.
The factory configuration consists of:
eth0as the WAN interface in DHCPeth1as the LAN interface- 3 VLANs:
- VLAN 100 for the switches
- VLAN 101 for the APs
- VLAN 1000 for the guest devices
- Each VLAN has it's own DHCP scope
Here is how to load this configuration:
- Open a console to the VyOS console with
virsh console vyos - If required login with your credentials
- Mound the ISO containing the configs
sudo mkdir /opt/vyos-configs ; sudo mount /dev/sr1 /opt/vyos-configs - Go in config mode with
config - Load the factory config with:
source /opt/olg-configs/vyos-factory-config commit save exit
Here are some sample configuration(s)
| File path | Description |
|---|---|
| mdu.json | MDU configuration with two VLAN networks and also adhere to olg ucentral schema enhancement for NAT object as proposed in olg-ucentral-schema ra_proposal branch |
- MinisForum MS-01
- Create an issue
- Create a branch and an assoiated PR
- Code
- Ask for review and get your changes merged
Use the Shipit CLI (https://gitlab.com/intello/shipit-cli-go)
This allows you to create the branch and associated PR in one simple command. The branch and PR will use a standardized naming scheme.
