Skip to main content

symmetry

Cluster management tool for the MC2.

Build

To create a virtual environment and install the requirements, run (by default it uses python3.7, you can change that in the Makefile variable VENV_BIN)

make venv

Run Symmetry components manually

Prerequisites

Make sure the virtualenv is activated

source .venv/bin/activate

Symmetry publishes and reads telemetry data to and from redis, so you need a running redis instance first:

redis-server

Start the telemetry deamon

Download and start the telemetry daemon

./telemd

You can verify that the telemetry daemon sends data by suscribing to the topic via the redis CLI:

redis-cli psubscribe "telem/*"

Start the cluster deamon

Start the cluster daemon (which controls the cluster state)

python -m symmetry.cli.clusterd

Websocket server

To start the websocket server for the dashboard:

python -m symmetry.cli.websocket

The websocket is running on port 8082 and automatically connects to the local redis-server on localhost:6379. Connect with ws://ip:8082/topic to receive all published messages for the given topic.

Run the dashboard

Serve the app with gunicorn

gunicorn -w 4 --preload -b 0.0.0.0:5000 \
    -c symmetry/webapp/gunicorn.conf.py \
    symmetry.webapp.wsgi:api

Point your browser to http://localhost:5000/ui/dashboard.

Using Symmetry

Creating services

To create a new service in the cluster a POST request must be sent to the api/services/{service_id} endpoint, with service_id being the new service.

The POST request has one optional (tar-exported docker image) and one mandatory (service description) body element.

The service description is structured this way:

%YAML 1.2
---
id: #must be same id as in endpoint
maintainer: #the uploader of the service
name: #"Pretty" version of the name
version: #any version number
description: #simple description
image_tag: #if docker image uploaded then this tag must be provided by the image. otherwise it is pulled 
port: #the port which is exposed by the service

After correct execution the answer should look somewhat like this:

{
    "name": "Test Service",
    "version": "1.0.0",
    "desc": "This is a simple test_service",
    "maintainer": "silvio",
    "10.0.0.3": "1"
}

Other Client Scripts

Recording telemetry data

You can use the telemetry client cli.telemc to consume telemetry data in various ways.

# prints to system out
python -m symmetry.cli.telemc

# writes to a csv file
python -m symmetry.cli.telemc --file /tmp/telemetry-results.csv

Download files

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

Source Distribution

mc2-symmetry-0.6.0.tar.gz (41.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mc2_symmetry-0.6.0-py3-none-any.whl (61.8 kB view details)

Uploaded Python 3

File details

Details for the file mc2-symmetry-0.6.0.tar.gz.

File metadata

  • Download URL: mc2-symmetry-0.6.0.tar.gz
  • Upload date:
  • Size: 41.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.4

File hashes

Hashes for mc2-symmetry-0.6.0.tar.gz
Algorithm Hash digest
SHA256 0cebc2304f7a0dfa34eadb56ccf465cb61dbecefbb894762f11b23a7436625e5
MD5 6affe28d5d16a725286b841f652bce06
BLAKE2b-256 4e8846f9c1f5558478dc7eaa22cbf8447a1b60dd8d61e529911c78ce0fa59cb8

See more details on using hashes here.

File details

Details for the file mc2_symmetry-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: mc2_symmetry-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 61.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.4

File hashes

Hashes for mc2_symmetry-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01bba1f2246b35f9e334d7244b5642b0ace5f9aff295ee550d85cc8d4ab1fc84
MD5 8c23fd1898e1ea09b4fc0e0f42e60219
BLAKE2b-256 7cf96017b6d999cf71ff83a22451305ef858dadd202fb2b1d4ece706da6d5139

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

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