Skip to content

Commit

Permalink
Support KissCache style proxies
Browse files Browse the repository at this point in the history
LAVA supports an alternative cache style where it just passes the URL to
be fetched to a web service and accepts whatever the web service
provides as valid, allowing caching of objects served over HTTPS without
complicated certificate management.  This is configured in the worker
config with the 'http_url_format_string' parameter, support doing so via
lava-docker.

Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
broonie committed Feb 17, 2024
1 parent 2c0c955 commit b89bcbc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@ There are two way to add custom devices types.
If you are modifying an already present (upstream) device-type, it is the best way.

## How to made LAVA slave use a proxy ?
Add env to a slave like:

For a standard HTTP/HTTPS proxy add env to a slave like:

slave:
env:
- "http_proxy: http://dns:port"
Expand All @@ -490,6 +492,11 @@ Or on master via
- "http_proxy: http://squid_IP_address:3128"
- "https_proxy: http://squid_IP_address:3128"

Or alternatively for a URL format string style proxy such as KissCache:

slave:
http_url_format_string: http://kisscache_host:port


## How to use a board which uses PXE ?
All boards which uses PXE, could be used with LAVA via grub.
Expand Down
8 changes: 6 additions & 2 deletions lavalab-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def main():
"custom_volumes",
"devices", "dispatcher_ip", "default_slave",
"extra_actions", "export_ser2net", "expose_ser2net", "expose_ports", "env",
"host", "host_healthcheck",
"host", "host_healthcheck", "http_url_format_string",
"loglevel", "lava-coordinator", "lava_worker_token",
"name",
"remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "remote_user_token",
Expand Down Expand Up @@ -564,7 +564,7 @@ def main():
fcoordinator.close()
if "dispatcher_ip" in worker:
fconfig = open("%s/worker-config" % workerdir, 'a')
fconfig.write("dispatcher_ip: %s" % worker["dispatcher_ip"])
fconfig.write("dispatcher_ip: %s\n" % worker["dispatcher_ip"])
fconfig.close()
if "expose_ports" in worker:
for eports in worker["expose_ports"]:
Expand All @@ -583,6 +583,10 @@ def main():
if remote_master in worker and "build_args" in worker[remote_master]:
dockcomp["services"]["healthcheck"]["build"]["args"] = worker[remote_master]['build_args']
shutil.copytree("healthcheck", "output/%s/healthcheck" % host)
if "http_url_format_string" in worker:
fconfig = open("%s/worker-config" % workerdir, 'a')
fconfig.write("http_url_format_string: \"%s\"\n" % worker["http_url_format_string"])
fconfig.close()
if "extra_actions" in worker:
fp = open("%s/scripts/extra_actions" % workerdir, "w")
for eaction in worker["extra_actions"]:
Expand Down

0 comments on commit b89bcbc

Please sign in to comment.