Sinfonia
Manages discovery of nearby cloudlets and deployment of backends for edge-native applications.
Tier 1 is located in the cloud and it tracks availability of Tier 2 instances at various 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
This should be installable with pip install sinfonia-tier3.
Usage
The sinfonia-tier3 application would normally be called by an edge-native
application to start an application specific backend on a nearby cloudlet.
The information normally provided by the app are the URL of a Tier1 instance and the UUID identifying the needed backend. Finally the actual frontend application and arguments that will be launched once the backend deployment has started.
$ 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 are automatically released once Tier2 notices the VPN tunnel has gone idle for some time
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 does we need a sudo password when deploying
We need root access to create and configure a Wireguard tunnel endpoint that connects the local application's network namespace/container to the deployed backend. All of the code running as root is contained in src/sinfonia_tier3/root_helper.py
Right now it runs the equivalent of,
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.3.1
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 | Actions |
|---|---|---|---|---|
| sinfonia_tier3-0.3.1.tar.gz | 19.4 kB | Without provenance | Details for sinfonia_tier3-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sinfonia_tier3-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for sinfonia_tier3-0.3.1-py3-none-any.whl |
Total release size: 39.3 kB
Release files / sinfonia_tier3-0.3.1.tar.gz
| Download URL | sinfonia_tier3-0.3.1.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6118ab191e34bf0c27f13f6b882f6a6c0266c16d14ba5950387f7c1ae1829fd6
|
|
BLAKE2b-256 checksum How to use checksums |
29b5639ec2e74284bd4512d2f0fc8d8109a290cdd5d8ff82504ecddcc76f956c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.9.2 Linux/5.10.0-18-amd64
|
Release files / sinfonia_tier3-0.3.1-py3-none-any.whl
| Download URL | sinfonia_tier3-0.3.1-py3-none-any.whl |
|---|---|
| Size | 20.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0db38569eb409c276abc8601c4caf2984ecdc5bbf4153bd3d0eecc7d18236ce0
|
|
BLAKE2b-256 checksum How to use checksums |
ee5f57540e2b3b5fdde2e6e0b472fe121fb0484e8cc4e4cb3152cb5f7c7c63f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.9.2 Linux/5.10.0-18-amd64
|
Security for sinfonia-tier3 0.3.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.