Skip to content

Commit c72f9c0

Browse files
mariaob1201claude
andcommitted
CI hardening, accurate worker docs, announcement banner, 404 page
- deploy.yml: bump actions to Node 24 versions (checkout v6, setup-python v6, configure-pages v6, upload-pages-artifact v5, deploy-pages v5); add PR build job (build + linkcheck, no deploy); fail the build on Sphinx warnings (--warningiserror) - worker.md: rewrite to match the real OpenLambda API (/run/<name>, ol worker init/up/down/status, SOCK sandbox, HTTP/Kafka/cron triggers) — the old page documented a nonexistent API - Add announcement banner and a branded 404 page (sphinx-notfound-page, absolute asset paths so it styles at any depth) - Pin sphinx-notfound-page Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1cdc1ba commit c72f9c0

5 files changed

Lines changed: 139 additions & 51 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
- 'README.md'
88
- 'CONTRIBUTING.md'
99
- 'LICENSE'
10+
pull_request:
11+
paths-ignore:
12+
- 'README.md'
13+
- 'CONTRIBUTING.md'
14+
- 'LICENSE'
1015

1116
permissions:
1217
contents: read
@@ -18,34 +23,45 @@ concurrency:
1823
cancel-in-progress: false
1924

2025
jobs:
21-
deploy:
22-
environment:
23-
name: github-pages
24-
url: ${{ steps.deployment.outputs.page_url }}
26+
build:
2527
runs-on: ubuntu-latest
26-
2728
steps:
28-
- uses: actions/checkout@v4
29-
30-
- name: Setup Pages
31-
uses: actions/configure-pages@v5
29+
- uses: actions/checkout@v6
3230

3331
- name: Setup Python
34-
uses: actions/setup-python@v5
32+
uses: actions/setup-python@v6
3533
with:
3634
python-version: '3.11'
3735

3836
- name: Install dependencies
3937
run: pip install -r requirements.txt
4038

4139
- name: Build Jupyter Book
42-
run: jupyter-book build .
40+
run: jupyter-book build . --warningiserror
41+
42+
- name: Check links
43+
# Informational: external links can be flaky, so this never blocks the build.
44+
continue-on-error: true
45+
run: jupyter-book build . --builder linkcheck
46+
47+
- name: Setup Pages
48+
if: github.event_name == 'push'
49+
uses: actions/configure-pages@v6
4350

4451
- name: Upload artifact
45-
uses: actions/upload-pages-artifact@v3
52+
if: github.event_name == 'push'
53+
uses: actions/upload-pages-artifact@v5
4654
with:
4755
path: _build/html
4856

57+
deploy:
58+
needs: build
59+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
60+
environment:
61+
name: github-pages
62+
url: ${{ steps.deployment.outputs.page_url }}
63+
runs-on: ubuntu-latest
64+
steps:
4965
- name: Deploy to GitHub Pages
5066
id: deployment
51-
uses: actions/deploy-pages@v4
67+
uses: actions/deploy-pages@v5

404.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
orphan: true
3+
myst:
4+
html_meta:
5+
description: "Page not found."
6+
robots: "noindex"
7+
---
8+
9+
# 404 — Page Not Found
10+
11+
Sorry, the page you were looking for doesn't exist or may have moved.
12+
13+
Try one of these instead:
14+
15+
- [Home](index.md)
16+
- [Worker](worker.md)
17+
- [Applications](applications/index.md)
18+
- [Blog](blog/index.md)
19+
20+
If you followed a link here, please
21+
[open an issue](https://github.com/open-lambda/open-lambda.github.io/issues) so we can fix it.

_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ sphinx:
4949
extra_extensions:
5050
- ablog
5151
- sphinxext.opengraph
52+
- notfound.extension
5253
config:
5354
html_theme: "sphinx_book_theme"
5455
html_show_sourcelink: false
@@ -59,10 +60,15 @@ sphinx:
5960
ogp_site_name: "OpenLambda"
6061
ogp_image: "https://open-lambda.github.io/_static/open-lambda.png"
6162
ogp_use_first_image: true
63+
64+
# ---- Custom 404 page ----
65+
# This is a root (user/org) Pages site, so served from "/".
66+
notfound_urls_prefix: "/"
6267
html_theme_options:
6368
use_download_button: false
6469
navigation_depth: 2
6570
show_navbar_depth: 1
71+
announcement: "🚧 OpenLambda is a research project under active development — <a href='https://github.com/open-lambda/open-lambda'>follow along on GitHub</a>."
6672
logo:
6773
text: "OpenLambda"
6874

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ myst-parser==3.0.1
77
sphinx-copybutton==0.5.2
88
ablog==0.11.13
99
sphinxext-opengraph==0.9.1
10+
sphinx-notfound-page==1.0.4

worker.md

Lines changed: 82 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,113 @@
11
---
22
myst:
33
html_meta:
4-
description: "The OpenLambda worker — the core node component that handles HTTP requests, manages containers, and scales horizontally."
5-
keywords: "OpenLambda, worker, serverless, Linux containers, HTTP, configuration"
4+
description: "The OpenLambda worker — the core node component that runs lambdas in SOCK sandboxes and serves HTTP, Kafka, and cron triggers."
5+
keywords: "OpenLambda, worker, serverless, SOCK, sandbox, HTTP, triggers, ol"
66
---
77

88
# Worker
99

1010
The OpenLambda **worker** is the core server-side component of a node. It listens for
11-
incoming HTTP requests, manages container lifecycle, and returns responses to callers.
11+
incoming requests, runs lambdas inside isolated sandboxes, and returns responses to callers.
12+
The worker is part of the `ol` binary.
1213

13-
## Overview
14+
```{note}
15+
This page is a high-level summary. The authoritative, version-tracked documentation lives in
16+
the main repository under
17+
[`docs/worker`](https://github.com/open-lambda/open-lambda/tree/main/docs/worker).
18+
```
1419

15-
Each worker is a standalone Go binary that exposes a single HTTP endpoint:
20+
## Architecture
1621

17-
```
18-
POST /runLambda/<lambda-name>
19-
```
22+
A worker is built from three layers, from the bottom up:
23+
24+
1. **Sandbox** — isolates lambdas from one another. This layer is pluggable; the main
25+
implementation today is **SOCK** (serverless-optimized containers), described in
26+
[Oakes et al., ATC '18](https://www.usenix.org/conference/atc18/presentation/oakes).
27+
Early versions used Docker.
28+
2. **Lambda** — a *lambda instance* is a robust virtual container backed by zero or one
29+
sandboxes; a *lambda function* routes incoming requests to instances and decides how many
30+
instances to provision based on load.
31+
3. **Event** — the trigger sources that invoke lambdas.
2032

21-
When a request arrives the worker:
33+
## Triggers
2234

23-
1. Checks whether the lambda's container image is already present on the node; if not, pulls it from the registry.
24-
2. Starts a Linux container from the image.
25-
3. Passes the request payload to the lambda function running inside the container.
26-
4. Waits for the function to return a result, then forwards that result back to the caller.
27-
5. Optionally keeps the container warm for a short period to reduce cold-start latency on subsequent calls.
35+
The worker supports three kinds of triggers:
2836

29-
## Configuration
37+
- **HTTP** — a request to `http(s)://<worker-addr>:<port>/run/<lambda-name>` invokes a lambda
38+
directly.
39+
- **Kafka** — a lambda can be configured to consume messages from a Kafka topic.
40+
- **Cron** — a lambda can be invoked on a schedule.
3041

31-
The worker is configured via a JSON file (default `config.json`) in the working directory.
32-
Key fields:
42+
## Building
43+
44+
OpenLambda is actively tested on **Ubuntu 24.04 LTS**, requires **cgroups v2**, and relies on
45+
operations that need root privilege. After installing the
46+
[dependencies](https://github.com/open-lambda/open-lambda/blob/main/docs/worker/getting-started.md#dependencies),
47+
build the Python-only ("min") deployment:
48+
49+
```bash
50+
make ol imgs/ol-min
51+
```
3352

34-
| Field | Description | Default |
35-
|---|---|---|
36-
| `worker_port` | Port the HTTP server listens on | `8080` |
37-
| `registry` | URL of the lambda registry | `""` |
38-
| `sandbox` | Container backend (`docker` or `sock`) | `docker` |
39-
| `log_output` | Where to write logs (`stdout` or a file path) | `stdout` |
53+
## Running a worker
4054

41-
## Starting the Worker
55+
The `ol worker` subcommands manage a worker's lifecycle (run `./ol worker --help` for the
56+
full list):
4257

4358
```bash
44-
# From the repo root after building:
45-
./bin/worker --config config.json
59+
# Create a worker directory with a config.json and base image
60+
./ol worker init -i ol-min
61+
62+
# Start the worker (use -d to run in the background)
63+
./ol worker up -d
64+
65+
# Check status
66+
./ol worker status
67+
68+
# Stop the worker
69+
./ol worker down
4670
```
4771

48-
The worker prints its listening address on startup. You can verify it is running with:
72+
`init` creates a worker directory (named `default-ol` by default) containing the worker
73+
configuration (`config.json`), the read-only base image shared by all lambda instances, and
74+
other resources. Per-worker settings such as memory limits are edited in `config.json`:
75+
76+
```json
77+
"limits": {
78+
"mem_mb": 512
79+
}
80+
```
81+
82+
## Deploying a lambda
83+
84+
Functions can be installed directly from a Git repository, with dependencies pinned via a
85+
`requirements.txt` and behavior configured via an `ol.yaml` file:
4986

5087
```bash
51-
curl -w "\n" localhost:8080/status
88+
./ol admin install -c ol.yaml -r requirements.txt https://github.com/<org>/<repo>.git
89+
90+
# Invoke it
91+
curl http://localhost:5000/run/<lambda-name>/
5292
```
5393

54-
## Deploying Multiple Workers
94+
See the [Applications](applications/index.md) section and the
95+
[Ag Forecasting case study](blog/post/2026-05-18-ag-forecasting-case-study.md) for a complete
96+
worked example, including `ol.yaml` configuration and ASGI entry points.
97+
98+
## Scaling out
5599

56-
Workers are stateless with respect to routing — each one operates independently. To scale
57-
horizontally, start one worker process per node and place a standard HTTP load balancer
58-
(Nginx, HAProxy, or similar) in front of them. No coordination between workers is required.
100+
Workers are independent and require no coordination, so you can scale horizontally by running
101+
one worker per node behind a standard HTTP load balancer (Nginx, HAProxy, or similar).
59102

60103
```{note}
61-
A centralized **boss** component for cluster-wide management is currently under development.
62-
Until then, manual deployment behind a load balancer is the recommended approach for
63-
multi-node setups.
104+
A centralized **boss** component for cluster-wide management is under development. Until then,
105+
manual deployment behind a load balancer is the recommended approach for multi-node setups.
64106
```
65107

66-
## Further Reading
108+
## Further reading
67109

68-
- [Quickstart guide](https://github.com/open-lambda/open-lambda/blob/main/docs/quickstart.md) — get a single worker running locally in minutes
69-
- [SOCK: Rapid Task Provisioning with Serverless-Optimized Containers](https://www.usenix.org/conference/atc18/presentation/oakes) — the research paper describing the container backend.
110+
- [Getting started](https://github.com/open-lambda/open-lambda/blob/main/docs/worker/getting-started.md) — build, deploy, and run your first lambda
111+
- [Lambda configuration](https://github.com/open-lambda/open-lambda/blob/main/docs/worker/lambda-config.md) — the `ol.yaml` format
112+
- [Deploying applications](https://github.com/open-lambda/open-lambda/blob/main/docs/worker/apps.md) — example app walkthroughs
113+
- [SOCK: Rapid Task Provisioning with Serverless-Optimized Containers](https://www.usenix.org/conference/atc18/presentation/oakes) — the sandbox research paper

0 commit comments

Comments
 (0)