Skip to content

Commit

Permalink
Permit to choose on which address master process will listen
Browse files Browse the repository at this point in the history
If lava-docker is used with an apache in proxy mode, permit to restrict
it on a specific address (like localhost)

Signed-off-by: Corentin LABBE <[email protected]>
  • Loading branch information
montjoie committed Nov 17, 2023
1 parent 8456c3a commit f1c7b1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,9 @@ masters:
- name: lava-master name of the master
host: name name of the host running lava-master (default to "local")
version: "202x.xx" LAVA version for master
webadmin_https: Does the LAVA webadmin is accessed via https
webinterface_port: Port number to use for the LAVA web interface (default to "10080")
webadmin_https: Does the LAVA webadmin is accessed via https
listen_address: Address where webinterface_port will listen (default to 0.0.0.0)
webinterface_port: Port number to use for the LAVA web interface (default to "10080")
lava-coordinator: Does the master should ran a lava-coordinator and export its port
persistent_db: true/false (default false) Is the postgresql DB is persistent over reboot.
WARNING: this is working accross the same LAVA version, this do not work when there is a postgresql major update
Expand Down
7 changes: 6 additions & 1 deletion lavalab-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def main():
"event_notifications",
"groups", "gunicorn_workers",
"healthcheck_url", "host", "http_fqdn",
"listen_address",
"loglevel", "lava-coordinator",
"name",
"persistent_db", "pg_lava_password",
Expand All @@ -141,13 +142,17 @@ def main():
webinterface_port = "10080"
else:
webinterface_port = master["webinterface_port"]
if "listen_address" in master:
listen_address = master["listen_address"]
else:
listen_address = '0.0.0.0'
dockcomp = {}
dockcomp["version"] = "2.0"
dockcomp["services"] = {}
dockcomposeymlpath = "output/%s/docker-compose.yml" % host
dockcomp["services"][name] = {}
dockcomp["services"][name]["hostname"] = name
dockcomp["services"][name]["ports"] = [ str(webinterface_port) + ":80"]
dockcomp["services"][name]["ports"] = [ listen_address + ":" + str(webinterface_port) + ":80"]
dockcomp["services"][name]["volumes"] = [ "/boot:/boot", "/lib/modules:/lib/modules" ]
dockcomp["services"][name]["build"] = {}
dockcomp["services"][name]["build"]["context"] = name
Expand Down

0 comments on commit f1c7b1f

Please sign in to comment.