Sinfonia
Manages discovery of nearby cloudlets and deployment of backends for edge-native applications.
The framework is a 3 tiered system. Tier 1 is located in the cloud and tracks availability of the Tier 2 instances running on the edge of the network (cloudlets) where backends can be deployed. Tier 3 is the client application that mediates the discovery and deployment process for edge-native applications.
This repository implements an example Tier3 client which can be used both as a command-line application and as a Python library.
Installation
You probably don't need to install this directly, most of the time it should get installed as a dependency of whichever edge-native application is using the Sinfonia framework to discover nearby cloudlets.
But if you want to run the standalone command-line application, you can install
this with installable with pipx install sinfonia-tier3 or
pip install [--user] sinfonia-tier3.
Usage
The sinfonia-tier3 application would normally be called by any edge-native
application that uses the Sinfonia framework to deploy its application specific
backend on a nearby cloudlet.
The information needed by the application are the URL of a Tier1 instance and the UUID identifying the required backend. The remainder of the arguments consist of the actual frontend application and arguments that will be launched in an seperate network namespace connecting back to the deployed backend.
$ sinfonia-tier3 <tier1-url> <uuid> <frontend-app> <args...>
An example application with UUID:00000000-0000-0000-0000-000000000000 (or the convenient alias 'helloworld') starts an nginx server that will be accessible with the hostname 'helloworld'.
$ sinfonia-tier3 https://tier1.server.url/ helloworld /bin/sh
sinfonia$ curl -v http://helloworld/
...
sinfonia$ exit
When the frontend application exits, the network namespace and WireGuard tunnel are cleaned up. Any resources on the cloudlet will be automatically released once the Sinfonia-tier2 instance notices the VPN tunnel has been idle.
Installation from this source repository
You need a recent version of poetry
$ pip install --user pipx
$ ~/.local/bin/pipx ensurepath
... possibly restart shell to pick up the right PATH
$ pipx install poetry
And then use poetry to install the necessary dependencies,
$ git clone https://github.com/cmusatyalab/sinfonia-tier3.git
$ cd sinfonia-tier3
$ poetry install
$ poetry run sinfonia-tier3 ...
... or
$ poetry shell
(env)$ sinfonia-tier3 ...
Why do we need a sudo password when deploying
Actually you should not need a password if wireguard4netns works correctly
But if for some reason it fails to create the tuntap device and launch
wireguard-go, the code will fall back on the older sudo implementation.
The older sudo implementation uses the in-kernel Wireguard implementation and
needs root access to create and configure the WireGuard device and endpoint.
All of the code running as root is contained in
src/sinfonia_tier3/root_helper.py
It runs the equivalent of the following.
ip link add wg-tunnel type wireguard
wg set wg-tunnel private-key <private-key> peer <public-key> endpoint ...
ip link set dev wg-tunnel netns <application network namespace>
Metadata
Release files for sinfonia-tier3 0.7.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sinfonia_tier3-0.7.4.tar.gz | 14.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sinfonia_tier3-0.7.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.2 kB
Release files / sinfonia_tier3-0.7.4.tar.gz
| Download URL | sinfonia_tier3-0.7.4.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c470529b996ad65e9dd1b38f22bfa423928601a9f1da5e7266310b074c17dc85
|
|
BLAKE2b-256 checksum How to use checksums |
c1a80f783117973a190300622fd941a1e86a5715b6345626f19ec9f3b96d18a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.14 Linux/6.1.0-21-amd64
|
Release files / sinfonia_tier3-0.7.4-py3-none-any.whl
| Download URL | sinfonia_tier3-0.7.4-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e35e2926551cbff661b60b669d38850e5b99f85772e06d2d13b6d792c745f78
|
|
BLAKE2b-256 checksum How to use checksums |
b1811171c5cbe7b1cfd89402d8769cfd136fb29bb69fea6ba2398a7a80c94325
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.14 Linux/6.1.0-21-amd64
|
Security for sinfonia-tier3 0.7.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.