freifunk-berlin / bbb-configs

Ansible based configuration management openwrt mesh nodes in the city-wide backbone of Freifunk Berlin
GNU Affero General Public License v3.0
14 stars 24 forks source link

Change the configuration format to include full location #751

Open Noki opened 9 months ago

Noki commented 9 months ago

EDIT: This was decided on our community day February 2024.

I talked with @FFHener about ways to further standardize the configuration format. We came up with the following ideas:

Doing so will allow us to move some parts of the configuration into the new model files:

Further it will allow us to remove some lines from the configurations:

In addition this will allow us to:

Here are examples of how a model file for a non OpenWRT device could look like:

brand_nice: Ubiquiti
model_nice: Wave Long-Range

wireless_devices:
  - name: 11ad_standard
    band: 60g
  - name: 11a_standard
    band: 5g
    htmode_prefix: HE

snmp_profile: af60
brand_nice: Ubiquiti
model_nice: Nanostation 5AC

wireless_devices:
  - name: 11a_standard
    band: 5g
    htmode_prefix: HE

snmp_profile: airos_8

airos_dfs_reset:
  - username: "ubnt"
    password: "file:/root/pwd"
    daytime_limit: "2-7"

The host configuration for such an device could look like this:

hosts:
  - hostname: q216-tierpark
    role: ptp-ap
    os: airos                                # we should set defaults, but on some devices we run several OS
    model: "ubnt_nanobeam_5ac-gen2"
    ptp: true
    poe-passtrough: true                     # to override the default false
    vlan-passtrough: {20,40,42}              # to override the default None
    height: 15                               # to override location height
    altitude: 54                             # to override location altitude
    orientation: ost
    ssid: "q216-tierpark"                    # to override default SSID (freifunk-{location}-{orientation}-{frequency} / freifunk-{location}-{orientation})
    username: "root"                         # to override the default ("ubnt")
    password: "file:/root/tierpark-pwd.txt"  # to override the default ("file:/root/pwd.txt)
    daytime_limit: "4-5"                     # to override the default ("2-7")

Channel assignments for non OpenWRT devices could be done alongside the other channel assignments:

location__channel_assignments_11a_standard__to_merge:
  q216-core: 44-40
  q216-tierpark: 128-40
  q216-nf-s: 36-20

We want to discuss this at the community day. Please let us know about any thoughs you have on this.

FFHener commented 9 months ago

I added some comments in the proposed code. Did you check with the config files from the properitery devices that we need the wireless_devices in this way?

This issue is related to #370

Noki commented 9 months ago

Well, we need some way to know the band and we also need to know if it is a dual band device, so probably a good idea to just keep the syntax we already have and build on that.

pmelange commented 9 months ago

It would be cool if a config file for the ubiquiti devices were also generated. There isn't much to the ubnt config files and on a new device (or after reset) on the first landing page it's possible to upload a config file.

Noki commented 9 months ago

It would be cool if a config file for the ubiquiti devices were also generated. There isn't much to the ubnt config files and on a new device (or after reset) on the first landing page it's possible to upload a config file.

thats the plan... ;-)

FFHener commented 9 months ago

Another aspect would be to move the gateway config over to our default format. I think it should be manageable for everything that is not gateway specific as we allready have a way of describing mesh, management and uplink interfaces. At first glance it looked like we would need to modify 8 templates to make this work. I made a Issue #754 for it.

FFHener commented 2 weeks ago

I added a os flag as we use some devices with different operating systems, e.g. the M5 stuff from Ubiquity.