I'd like to share a project I've been working on for the last few days called OpenWrt Configurator. It's a simple CLI that makes it easy to define and provision configuration onto multiple OpenWrt devices from a single UCI-like JSON file.
OpenWrt Configurator is a CLI tool and corresponding JSON config file which lets you specify the entire state of your network including UCI configuration, packages and firmware versions in a single UCI-like JSON config file which can be provisioned to your OpenWrt devices using OpenWrt Configurator.
$ openwrt-configurator provision ./network-config.json
The JSON config file can be conditionally composed with
.overrides keys, and implements light abstractions over device ethernet ports and Wi-Fi radios to seamlessly support configuration for multiple devices, different device models/types, as well as different device roles (Router, switch, dump-ap etc) from a single JSON config file.
Some of the main features include:
- Store all network config for all devices in a single UCI-like JSON config file (UCI config, packages, firmware versions and more).
- Conditionally compose your JSON file to support multiple OpenWrt devices, different device models/types, and different roles (Routers, switches and dump-ap's etc).
- Light abstractions over ethernet ports and WiFi radios to keep multi-device configuration simple.
- Strict config syntax validation and logical error checking for configuration to prevent invalid configuration.
- Convert your JSON file into UCI commands for each of your OpenWrt devices.
- Provision your JSON file to your OpenWrt devices.
- JSON file migrations to keep your JSON file up-to-date with any UCI configuration changes/updates.
- Build and flash sysupgrade images to your OpenWrt devices based on your JSON config file.
I built this tool as a simpler and easier-to-use replacement for a large UCI script I used to use to provision my devices, which became very cumbersome and unwieldy to maintain and manage.
If you'd like to give it a try, or want to see more details, please see the OpenWrt Configurator GitHub Repo or reply below.
If you have any thoughts or suggestions etc, please do share