So I selfhost a Zerotier controller, which is deployed using Saltstack as a means of constructing a VM.
I have a requirement to server a set of internal services (which requires broadcasting) to a subnet which will need to be torn down and reset on a regular basis, and i’d like to have as little (read none) hands on configuration as possible.
That is the premise of the issue atleast.
Zerotier is a wonderful solution, albeit it does alot of random stuff, (ip addresses, network interfaces, IDs etc.)
The issue that i am having is that once the services are connected to the Zerotier network, they get random addresses from the pool, and from there on it works with connecting and everything else.
But what i would like to achieve is that the servers either gets assigned, or assign them self a static/fixed ip that all the clients can connect to.
The problem that rises is the chicken and egg!
The controller dont know what the “future” connecting IDs are to assign addresses
The clients cant seem to set their own IP using the zerotier-cli interface through assignedAddresses
The clients dont know the randomized interface name
So the solution that i am looking for is if there is any way for a cliient to use a “fixed” ID/set its own ID that the controller can reference
Or if the client can set its own IP through Zerotier CLI
the solution that i have at the moment is
- service joins
- list full json info and take the ..portDeviceName
- do some ip addr magic