Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions .github/workflows/regression-whisk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ jobs:
- name: Configure OpenWhisk
run: |
WORKER_IP=$(kubectl get node kind-worker -o jsonpath='{.status.addresses[0].address}')
HOST_IP=$(hostname -I | awk '{print $1}')
echo "WORKER_IP=${WORKER_IP}" >> $GITHUB_ENV
echo "HOST_IP=${HOST_IP}" >> $GITHUB_ENV

git clone --depth 1 https://github.com/apache/openwhisk-deploy-kube.git /tmp/ow

Expand All @@ -159,25 +157,16 @@ jobs:

- name: Create OpenWhisk regression config
run: |
jq \
--arg host_ip "${HOST_IP}" \
'
.object.minio.address = ($host_ip + ":" + (.object.minio.mapped_port | tostring))
| .nosql.scylladb.address = ($host_ip + ":" + (.nosql.scylladb.mapped_port | tostring))
' storage.json > storage-openwhisk.json

jq \
--arg language "${LANGUAGE}" \
--arg version "${LANGUAGE_VERSION}" \
--arg architecture "${ARCHITECTURE}" \
--arg registry "localhost:${REGISTRY_PORT}" \
--slurpfile storage storage-openwhisk.json \
'
.experiments.architecture = $architecture
| .experiments.runtime.language = $language
| .experiments.runtime.version = $version
| .deployment.openwhisk.docker_registry.registry = $registry
| .deployment.openwhisk.storage = $storage[0]
' configs/openwhisk.json > openwhisk-regression.json

- name: Run OpenWhisk regression
Expand All @@ -188,6 +177,7 @@ jobs:
set -o pipefail
uv run sebs benchmark regression test \
--config openwhisk-regression.json \
--storage-configuration storage.json \
--deployment openwhisk \
--language ${LANGUAGE} \
--language-version ${LANGUAGE_VERSION} \
Expand Down Expand Up @@ -267,7 +257,6 @@ jobs:
diagnostics/
regression-cache/
storage.json
storage-openwhisk.json
openwhisk-regression.json
regression_*.json
if-no-files-found: ignore
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@

* Change to input of 120.uploader benchmark to conform with new Wikipedia policies (#308)

* Pull Minio images from quay.io, as the `minio/minio` repository was removed from Docker Hub.

* Restore cached ScyllaDB configuration independently of Minio; make the OpenWhisk `shutdownStorage` option work again.

### Improvements

* Support for multiple variants of the same programming language (#286).

* Support for new versions of Python and Java on AWS (#311).

* Self-hosted storage (Minio, ScyllaDB) advertises an externally reachable address to functions, detected automatically or set with `--external-address` when starting the storage, and overridable with `--storage-address` when running benchmarks. This removes the manual editing of storage addresses for OpenWhisk (#229).

### Deprecations

### Contributors
Expand Down
42 changes: 26 additions & 16 deletions configs/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,19 @@
},
"local": {
"storage": {
"address": "",
"mapped_port": -1,
"access_key": "",
"secret_key": "",
"instance_id": "",
"input_buckets": [],
"output_buckets": [],
"type": "minio"
"object": {
"type": "minio",
"minio": {
"address": "",
"external_address": "",
"mapped_port": -1,
"access_key": "",
"secret_key": "",
"instance_id": "",
"input_buckets": [],
"output_buckets": []
}
}
}
},
"openwhisk": {
Expand All @@ -112,14 +117,19 @@
"password": ""
},
"storage": {
"address": "",
"mapped_port": -1,
"access_key": "",
"secret_key": "",
"instance_id": "",
"input_buckets": [],
"output_buckets": [],
"type": "minio"
"object": {
"type": "minio",
"minio": {
"address": "",
"external_address": "",
"mapped_port": -1,
"access_key": "",
"secret_key": "",
"instance_id": "",
"input_buckets": [],
"output_buckets": []
}
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion configs/openwhisk.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"secret_key": "",
"instance_id": "",
"input_buckets": [],
"output_buckets": []
"output_buckets": [],
"external_address": ""
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion docs/platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,5 +461,7 @@ To use that feature in SeBS, set the `experimentalManifest` flag to true.

### Storage

Start the storage with `sebs storage start` and pass the generated configuration to benchmark commands with `--storage-configuration`; see the [storage documentation](storage.md) for details, including how to override the address advertised to functions with `--storage-address`.

OpenWhisk has a `shutdownStorage` switch that controls the behavior of SeBS.
When set to true, SeBS will remove the Minio instance after finishing all work.
When set to true, SeBS will stop the Minio and ScyllaDB instances after finishing all work.
70 changes: 29 additions & 41 deletions docs/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ This file contains all the necessary information to connect to the storage servi
"type": "minio",
"minio": {
"address": "172.17.0.2:9000",
"external_address": "10.10.1.15:9011",
"mapped_port": 9011,
"access_key": "XXX",
"secret_key": "XXX",
Expand All @@ -52,6 +53,7 @@ This file contains all the necessary information to connect to the storage servi
"type": "scylladb",
"scylladb": {
"address": "172.17.0.3:8000",
"external_address": "10.10.1.15:9012",
"mapped_port": 9012,
"alternator_port": 8000,
"access_key": "None",
Expand All @@ -67,65 +69,51 @@ This file contains all the necessary information to connect to the storage servi
}
```

As we can see, the Minio container is running on the default Docker bridge network with address `172.17.0.2` and uses port `9000`.
The default configuration maps the container's port to the host, making the storage instance available directly without referring to the container's IP address. Minio is mapped to port 9011, and ScyllaDB is mapped to port 9012.
Each storage instance has two addresses:

## Network Configuration

The storage instance must be accessible from the host network, and in some cases, from external networks.
For example, the storage can be deployed on a separate virtual machine or container.
Furthermore, even on a local machine, it's necessary to configure the network address, as OpenWhisk functions
are running isolated from the host network and won't be able to reach other containers running on the Docker bridge.
* `address` is used by SeBS itself, e.g., to upload benchmark inputs. On Linux, this is the container's address on the default Docker bridge network (`172.17.0.2`) and the container's port (`9000`). Functions of the local deployment run on the same bridge network and use this address as well.
* `external_address` is advertised to benchmark functions that run outside of the Docker bridge network, e.g., in a Kubernetes cluster hosting OpenWhisk. It combines the IP address of the machine with the port mapped on the host: Minio is mapped to port 9011, and ScyllaDB to port 9012.

When using Minio with cloud-hosted FaaS platforms like OpenWhisk or for local deployment, you need to ensure that the functions can reach the storage instance.
By default, the container runs on the Docker bridge network with an address (e.g., `172.17.0.2`) that is not accessible from outside the host.
Even when deploying both OpenWhisk and storage on the same system, the local bridge network is not accessible from the Kubernetes cluster.
To make it accessible, functions need to use the public IP address of the machine hosting the container instance and the mapped port.
You can typically find an externally accessible address via `ip addr`, and then replace the storage's address with the external address of the machine and the mapped port.

For example, for an external address `10.10.1.15` (a LAN-local address on CloudLab) and mapped port `9011`, set the SeBS configuration as follows:
The external address is detected automatically as the IP address of the host's default network interface, and SeBS verifies that the storage answers on it. To use a different interface or a hostname, pass the `--external-address` flag when starting the storage:

```bash
# For a LAN-local address (e.g., on CloudLab)
jq --slurpfile file1 storage.json '.deployment.openwhisk.storage = $file1[0] | .deployment.openwhisk.storage.object.minio.address = "10.10.1.15:9011"' configs/example.json > configs/openwhisk.json
sebs storage start all configs/storage.json --output-json storage.json --external-address 10.10.1.15
```

You can validate the configuration of Minio with an HTTP request by using `curl`:
> [!WARNING]
> The mapped ports are bound on all interfaces of the host. On a machine with a public IP address, restrict access to these ports with a firewall or use a private address.

## Network Configuration

To use the deployed storage with a benchmark, pass the generated configuration file with the `--storage-configuration` flag.
The storage configuration is merged into the deployment section of the SeBS configuration, so no manual editing of JSON files is needed:

```bash
$ curl -i 10.10.1.15:9011/minio/health/live
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 0
Content-Security-Policy: block-all-mixed-content
Server: MinIO
Strict-Transport-Security: max-age=31536000; includeSubDomains
Vary: Origin
X-Amz-Request-Id: 16F3D9B9FDFFA340
X-Content-Type-Options: nosniff
X-Xss-Protection: 1; mode=block
Date: Mon, 30 May 2022 10:01:21 GMT
sebs benchmark invoke 210.thumbnailer test --config configs/openwhisk.json --storage-configuration storage.json
```

If you use benchmarks relying on NoSQL storage (ScyllaDB), then you need to apply the same change to reflect the different address as well.
Here, we again assume the external IP address of the system is `10.10.1.15`, and the mapped port changes to `9012`.
Functions running in OpenWhisk or another Kubernetes-based platform cannot reach the Docker bridge network of the host, even when the cluster runs on the same machine.
They connect to the storage through the external address, which is detected when starting the storage.
If the detected address is not reachable from the functions, e.g., because the machine has multiple network interfaces or the storage runs on a different host, override it without changing any files:

```bash
# For a LAN-local address (e.g., on CloudLab)
jq '.deployment.openwhisk.storage.nosql.scylladb.address = "10.10.1.15:9012"' configs/openwhisk.json | sponge configs/openwhisk.json
sebs benchmark invoke 210.thumbnailer test --config configs/openwhisk.json --storage-configuration storage.json --storage-address 10.10.1.15
```

You can validate the configuration of ScyllaDB with an HTTP request by using `curl`:
The override applies to all storage instances, each with its own mapped port. Alternatively, provide the address once when starting the storage with `--external-address`.

You can validate that the storage is reachable with an HTTP request to Minio's health endpoint and ScyllaDB's root endpoint:

```bash
curl -i 10.10.1.15:9012
$ curl -i 10.10.1.15:9011/minio/health/live
HTTP/1.1 200 OK
Content-Length: 26
Content-Type: text/plain
Date: Sun, 07 Dec 2025 14:07:29 GMT
Server: Seastar httpd
...
Server: MinIO

healthy: 192.168.0.20:9012
$ curl -i 10.10.1.15:9012
HTTP/1.1 200 OK
...
healthy: 10.10.1.15:9012
```

## Lifecycle Management
Expand Down
2 changes: 1 addition & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def execute(cmd, cwd=None):
print("Install Python dependencies for local")
execute(". {}/bin/activate && pip3 install -r requirements.local.txt".format(env_dir))
print("Initialize Docker image for local storage.")
execute("docker pull minio/minio:latest")
execute("docker pull quay.io/minio/minio:latest")

# One of the installed dependencies causes a downgrade, which in turns breaks static typing.
print("Update typing-extensions (resolving bug with mypy)")
Expand Down
Loading