diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2019-09-18 11:39:10 +0200 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2019-09-19 11:50:39 +0200 |
commit | d869ceab3a3bd42bb3da6eee9ff8b897f81faa6a (patch) | |
tree | 6271b6ad99918ca63c09a1b21b734b4350cfaf55 /lavalab-gen.py | |
parent | adf687abc9f9d9d3d114dcaa1208e52b4d88f446 (diff) |
Permit to not export overlay server port
When doing a qemu-only slave, there are no need to export the overlay
server.
This patch adds a use_overlay_server option.
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-x | lavalab-gen.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py index 58d57a5..bf4fd2e 100755 --- a/lavalab-gen.py +++ b/lavalab-gen.py @@ -304,7 +304,7 @@ def main(): else: slaves = workers["slaves"] for slave in slaves: - keywords_slaves = [ "name", "host", "dispatcher_ip", "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "extra_actions", "zmq_auth_key", "zmq_auth_key_secret", "default_slave", "export_ser2net", "expose_ser2net", "remote_user_token", "zmq_auth_master_key", "expose_ports", "env", "bind_dev", "loglevel", "use_nfs", "arch", "devices", "lava-coordinator", "use_tap", "host_healthcheck", "use_tftp", "use_nbd" ] + keywords_slaves = [ "name", "host", "dispatcher_ip", "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "extra_actions", "zmq_auth_key", "zmq_auth_key_secret", "default_slave", "export_ser2net", "expose_ser2net", "remote_user_token", "zmq_auth_master_key", "expose_ports", "env", "bind_dev", "loglevel", "use_nfs", "arch", "devices", "lava-coordinator", "use_tap", "host_healthcheck", "use_tftp", "use_nbd", "use_overlay_server" ] for keyword in slave: if not keyword in keywords_slaves: print("WARNING: unknown keyword %s" % keyword) @@ -334,7 +334,7 @@ def main(): dockcomp["services"][name] = {} dockcomp["services"][name]["hostname"] = name dockcomp["services"][name]["dns_search"] = "" - dockcomp["services"][name]["ports"] = [ "80:80" ] + dockcomp["services"][name]["ports"] = [] dockcomp["services"][name]["volumes"] = [ "/boot:/boot", "/lib/modules:/lib/modules" ] dockcomp["services"][name]["environment"] = {} dockcomp["services"][name]["build"] = {} @@ -485,6 +485,11 @@ def main(): use_nbd = worker["use_nbd"] if use_nbd: dockcomp["services"][name]["ports"].append("61950-62000:61950-62000") + use_overlay_server = True + if "use_overlay_server" in worker: + use_overlay_server = worker["use_overlay_server"] + if use_overlay_server: + dockcomp["services"][name]["ports"].append("80:80") use_nfs = False if "use_nfs" in worker: use_nfs = worker["use_nfs"] |