Skip to main content

Tier 3 component of the Sinfonia system

Project description

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>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sinfonia_tier3-0.3.1.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

sinfonia_tier3-0.3.1-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file sinfonia_tier3-0.3.1.tar.gz.

File metadata

  • Download URL: sinfonia_tier3-0.3.1.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.2 Linux/5.10.0-18-amd64

File hashes

Hashes for sinfonia_tier3-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6118ab191e34bf0c27f13f6b882f6a6c0266c16d14ba5950387f7c1ae1829fd6
MD5 f36fdfa39051446869aa50db3e6873a6
BLAKE2b-256 29b5639ec2e74284bd4512d2f0fc8d8109a290cdd5d8ff82504ecddcc76f956c

See more details on using hashes here.

File details

Details for the file sinfonia_tier3-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: sinfonia_tier3-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.9.2 Linux/5.10.0-18-amd64

File hashes

Hashes for sinfonia_tier3-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0db38569eb409c276abc8601c4caf2984ecdc5bbf4153bd3d0eecc7d18236ce0
MD5 115327b5938c57697cf553afabc2efc3
BLAKE2b-256 ee5f57540e2b3b5fdde2e6e0b472fe121fb0484e8cc4e4cb3152cb5f7c7c63f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page