Skip to content
Snippets Groups Projects
Commit 97106922 authored by zphrs's avatar zphrs
Browse files

made external ports fully dynamic

parent 34dc4bd3
No related branches found
No related tags found
No related merge requests found
......@@ -271,7 +271,7 @@ class ClusterConductor:
"--env",
f"NODE_IDENTIFIER={i}",
"-p",
f"{external_port}:{port}",
f"{port}",
self.base_image,
]
if CONTAINER_ENGINE == "podman":
......@@ -283,6 +283,13 @@ class ClusterConductor:
log=self.log,
)
res = run_cmd_bg(
[CONTAINER_ENGINE, "port", node_name, str(port)],
verbose=True,
log=self.log,
)
external_port = int(res.stdout.rsplit(":", 1)[1])
# attach container to base network
self.log(f" attaching container {node_name} to base network")
run_cmd_bg(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment