openziti / ziti-console

https://openziti.io
Apache License 2.0
23 stars 15 forks source link

Provide mechanisms to set server list from configuration #105

Closed sabedevops closed 1 year ago

sabedevops commented 1 year ago

It seems desirable for a number of deployment scenarios that the server list be configuration driven. In particular, for helm and compose (an other similar ziti stacks), the information regarding the servers is known in advance of deployment. Such a mechanism would allow all needed configuration to happen when the stack is "stood up".

In the same vein, the docker container should provide a means to configure at least a single server through environment variables to simplify the requirements when working in the relevant stacks.

Some suggestions:

servers.json:

{
  "controllers": {
    "edge": {
      "hosts": ["localhost:8441", "remote:8441", ...]
    }
  }
}

servers.yaml:

controllers:
  edge:
    hosts: 
      - "localhost:8441"
      - "remote:8441"
      - ...

Dockerfile:

ENV ZITI_EDGE_CONTROLLER_HOSTS

sudo docker run -d --name zac -p 1408:1408 -e ZITI_EDGE_CONTROLLER_HOSTS='["localhost:8441", "remote:8441", ...]' openziti/zac

JeremyTellier commented 1 year ago

You can do this now but pre-creating the ../ziti/settings.json file but I may make a setting that gets imported as well.

dovholuknf commented 1 year ago

@sabedevops -- no wonder why i didn't find it. I thought we had this ability... :) i've asked if we could instruct ZAC for the location of the file. that'd be better imo. i'd like to specify to zac where to find those settings and i think it'd work for your usecase too

JeremyTellier commented 1 year ago

This is available in the latest release