All Projects → visionspacetec → sle-provider

visionspacetec / sle-provider

Licence: AGPL-3.0 license
Space Link Extension Provider in Python3

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to sle-provider

ember-contextual-services
Services in Ember are scoped to the app as a whole and are singletons. Sometimes you don't want that. :) This addon provides ephemeral route-based services.
Stars: ✭ 20 (-16.67%)
Mutual labels:  provider
flutter read
A flutter project, 一款Flutter实战项目,已空安全适配,封装各种UI组件,网络组件以及使用peovider进行状态管理。
Stars: ✭ 51 (+112.5%)
Mutual labels:  provider
reactube-client
A clone Youtube Web Player using React Provider Pattern, React Context and Typescript
Stars: ✭ 92 (+283.33%)
Mutual labels:  provider
LeXun.Security.OAuth
用于 Asp.Net 和 Asp.Net Core 的OAuth2社交身份验证提供程序。支持支付宝,QQ,微信,百度等第三方登录
Stars: ✭ 19 (-20.83%)
Mutual labels:  provider
flutter app o2o
flutter高校食堂o2o预定服务,商业级应用,持续升级,完全开源。
Stars: ✭ 45 (+87.5%)
Mutual labels:  provider
eth-provider
A Universal Ethereum Provider Client
Stars: ✭ 139 (+479.17%)
Mutual labels:  provider
Bridges
🌉 SwifQL+NIO provider to Postgres and MySQL
Stars: ✭ 50 (+108.33%)
Mutual labels:  provider
Google-4-TbSync
This provider add-on adds Google synchronization capabilities to TbSync. Only contacts and contact groups are currently managed, using Google's People API.
Stars: ✭ 36 (+50%)
Mutual labels:  provider
Flutter Roadmap
This is a flutter roadmap and documentation repository. If anyone is interested you can join the party to help the community and make flutter great again.
Stars: ✭ 47 (+95.83%)
Mutual labels:  provider
oneview-chef
This project is no longer being developed and has limited support. In the near future this repository will be fully deprecated. Please consider using other OneView projects, such as Terraform and Ansible Collection
Stars: ✭ 16 (-33.33%)
Mutual labels:  provider
flutter mobx boilerplate
A Flutter Project contains a Boilerplate code with MobX and Provider as a State Management.
Stars: ✭ 29 (+20.83%)
Mutual labels:  provider
serverless-scaleway-functions
Plugin for Serverless Framework to allow users to deploy their serverless applications on Scaleway Functions
Stars: ✭ 58 (+141.67%)
Mutual labels:  provider
YugiohCards
Yugioh Cards Sample App using MobX, Provider, and Chopper
Stars: ✭ 31 (+29.17%)
Mutual labels:  provider
fashion app
Flutter E commerce Fashion 🛍
Stars: ✭ 80 (+233.33%)
Mutual labels:  provider
flutter expense manager
Flutter Provider and Shared Preferences Sample Application.
Stars: ✭ 59 (+145.83%)
Mutual labels:  provider
spark list
这是一款开源笔记应用, 支持Android/iOS双平台, 使用Flutter 3开发, 体验Flutter的同时也希望做一个能成为个人知识中转站的应用, 任重道远 :)
Stars: ✭ 47 (+95.83%)
Mutual labels:  provider
flutter database demo
🛠 Flutter 本地数据库存储 + 状态管理
Stars: ✭ 31 (+29.17%)
Mutual labels:  provider
city-cab
An open source flutter taxi - app for learning purpose(Provider & Bloc) using firebase as backend/server
Stars: ✭ 68 (+183.33%)
Mutual labels:  provider
JetEntityFrameworkProvider
Microsoft Access (Jet) Entity Framework provider
Stars: ✭ 77 (+220.83%)
Mutual labels:  provider
react-ecommerce
E-commerce monorepo application using NextJs, React, React-native, Design-System and Graphql with Typescript
Stars: ✭ 136 (+466.67%)
Mutual labels:  provider
visionspace logo

sle-provider

The sle-provider implements the Space Link Extension (SLE) protocol, for communication with satellite ground stations. It includes an interface for the Space Link Extension protocol, a management server and a connection to ground station equipment.

Framework

Overview

  • sle-common: Library for user and provider side Space Link Extension application development
  • sle-provider: Provider (ground station side) Space Link Extension application
  • sle-management-client: OpenAPI based client for sle-provider management

Features

  • Return All Frames (RAF) service
  • (in progress) Forward Communications Link Transmission Units (FCLTU) Service
    • Incomplete implementation: ASYNC NOTIFY, GET PARAMETER and THROW EVENT missing
  • Online Timely frame delivery
  • OpenAPI management server and client
  • Integration with the SatNOGS Network API
  • Docker Swarm based service
  • (in progress) Support for professional ground station equipment
    • CORTEX supported, required library available on request
  • (planned) Return Channel Frames (RCF) service
  • (planned) Online Complete frame delivery
  • (planned) Offline frame delivery

Installation & Usage

If you want to configure the SLE Provider at runtime install our sle-management-client.

Docker

The SLE Provider is started together with the GNU Radio telemetry middleware by running:

# Build and start the container
docker-compose up --build -d
# Check the state of the running container
docker ps --all
# Check the console output of the container
docker logs sleprovider
# Terminate the container
docker-compose down

Which scripts are executed on startup can be configured in ./docker/frame_generation/docker-entrypoint.py of by changing the Docker entrypoint in ./docker-compose.yml.

If you have troubles restarting the Docker container try out the following to update all dependencies:

docker-compose build --force-rm --pull --no-cache
docker-compose up --build -d

Setuptools

Install the sle-common package first, before installing the sle-provider!

python3 setup.py install --user

Virtual environment

cd sle-provider
virtualenv -p python3 venv
source venv/bin/activate
pip install -e .

Raspberry Pi

When installing on a Raspberry Pi, install these packages before the next steps:

sudo apt-get install libffi-dev libssl-dev

Getting started

Follow the installation procedure, then install a Space Link Extension Client, one of the following will work:

Stateless SLE telemetry server for SatNOGS

This example comes with a REST DB to simulate the SatNOGS Network DB locally, a configured Traefik instance and a scaleable, stateless SLE provider.

Features supported:

  • Scaleable Docker Swarm service
    • One user per running container
  • Reverse proxy
    • Round-robin loadbalancer
    • Limits maximum connection count to number of running SLE providers
  • SLE user database
    • Local database to manage SLE users
    • Users to satellites mapping
  • All SLE SHA-1 authentication modes supported
    • No authentication
    • Bind authentication
    • Full encryption
  • Return All Frames Service
    • Timely Online service
    • Offline service via Timely Online service

To build open terminal, go into the sle-provider folder, checkout the develop-satnogs branch and build the Docker image:

docker build -f ./docker/satnogs/Dockerfile . --tag sleprovider-stateless --force-rm

Add local DNS entry

sudo nano /etc/hosts

Add these lines to route requests to sle.network.satnogs.org to your local machine.

127.0.0.1 sle.network.satnogs.org

Save with CRTL+S and exit with CTRL+X.

Initialize the Docker swarm

docker swarm init

Deploy the test stack

docker stack deploy -c sle-stateless-traefik.yml sle

Check the status of the SLE service

docker service logs sle_provider

Check the virtual IP of the json-server, the second IP is used.

 docker service inspect sle_json-server -f "{{ .Endpoint.VirtualIPs }}"
{wuuq5q3jnkr2avqqthatcx8sq 10.11.0.31/16} {dt9om1lifuan221uqcq56dkgp 10.0.75.7/24}

Copy this IP to the sle-stateless-traefik.yml file into the user db url field. This is necessary since we are running a local server to simulate the planned behaviour of the SatNOGS Network API. Afterwads restart the SLE provider service to use the changed IP.

"SATNOGS_NETWORK_API_INTERNAL=http://10.0.75.7:80"

Make sure that the local volume mapping for the database file is correct.

Open your browser and navigate to localhost:8080 to view the Traefik dashboard. You can view the DB using the obtained IP on port 9090, from your local browser.

The SLE service can be scaled, they are round-robin loadbalanced.

docker service scale sle_provider=5

Metrics for the services can be measured using (hit tab to complete xxxx):

docker stats sle_provider.1.xxxx sle_provider.2.xxxx 

When updating the SLE provider image

docker service rm sle_provider
docker stack deploy -c sle-stateless-traefik.yml sle

Security

Usage of HTTPS and Basic Authentication on the management API is optional for development but highly recommended for production!

HTTPS for Management API

If you want to try the sle-management-client with HTTPS locally, you have to generate a HTTPS certificate first:

cd examples/
openssl genrsa -aes256 -passout pass:HereGoesYourPass -out server.key 2048
openssl req -new -key server.key -passin pass:HereGoesYourPass -out server.csr
# Fill the form, using localhost in "Common Name"
openssl x509 -req -passin pass:HereGoesYourPass -days 1024 -in server.csr -signkey server.key -out server.crt
cat server.crt server.key > server.pem

Now trust your own certificate:

sudo cp server.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates

Or, if you are working in a virtual environment:

cp -f server.pem /pathTo/venv/lib/python3.6/site-packages/certifi<your-version>/certifi/cacert.pem

HTTP Basic Authentication

To setup the local password database, for the HTTP Basic authentication schema, open authentication_db.py, enter a username-password combination in the empty fields and run the script. This is only needed when using the REST management API.

from sleprovider.management.security.authManager import AuthManager
user = ''  # Enter username here
password = ''  # Enter password here
AuthManager.create_user(user, password)

Use the 'http_rest_protocol' or 'https_rest_protocol', when initializing the management server.

Start the SLE Provider:

Run the example script

python3 start_provider.py

or configure the server for your own needs:

import os
from sleprovider.sleProvider import SleProvider

DATA_PORT = int(os.getenv('SLE_PROVIDER_DATA_PORT', 55555))
USER_PORT = int(os.getenv('SLE_PROVIDER_USER_PORT', 55529))
MANAGER_PORT = int(os.getenv('SLE_PROVIDER_MANAGER_PORT', 2048))

provider = SleProvider()

provider.local_id = 'SLE_PROVIDER'
provider.remote_peers = {
    'SLE_USER':
        {
            'authentication_mode': 'NONE',
            'password': ''
        }
}
provider.si_config = {
    'sagr=1.spack=VST-PASS0001.rsl-fg=1.raf=onlt1':
        {
            'start_time': None,
            'stop_time': None,
            'initiator_id': 'SLE_USER',
            'responder_id': 'SLE_PROVIDER',
            'return_timeout_period': 15,
            'delivery_mode': 'TIMELY_ONLINE',
            'initiator': 'USER',
            'permitted_frame_quality':
                ['allFrames', 'erredFramesOnly', 'goodFramesOnly'],
            'latency_limit': 9,
            'transfer_buffer_size': 1,
            'report_cycle': None,
            'requested_frame_quality': 'allFrames',
            'state': 'unbound'
        },
    'sagr=1.spack=VST-PASS0001.fsl-fg=1.cltu=cltu1':
        {
            'start_time': None,
            'stop_time': None,
            'initiator_id': 'SLE_USER',
            'responder_id': 'SLE_PROVIDER',
            'return_timeout_period': 15,
            'maximum_cltu_length': 306,
            'minimum_cltu_delay': 0,
            'maximum_cltu_delay': 6000000,
            'bit_lock_required': False,
            'rf_availiable_required': False,
            'report_cycle': None,
            'protocol_abort_clear_enabled': True,
            'state': 'unbound'
        }
}

provider.initialize_server('rest_manager', 'http_no_auth_rest_protocol', MANAGER_PORT)
provider.initialize_server('sle_provider', 'sle_protocol', USER_PORT, print_frames=False)
provider.initialize_server('data_endpoint', 'json_data_protocol', DATA_PORT, print_frames=False)
provider.start_reactor()

Connect with a client of our choice and start the generation of telemetry:

python3 dataEndpoint.py

Find out more

This work was created following the standards defined by the Consultative Committee for Space Data Systems (CCSDS): https://public.ccsds.org

Contributing

If you would like help implementing a new feature or fix a bug, check out our Contributing page and the Code of Conduct!

Questions or need help?

Please open an issue for bug reporting, enhancement or feature requests.

Acknowledgement

Support for this work was provided by the European Space Agency through the OPS Innovation Cup. The content of this repository is solely the responsibility of the authors and does not necessarily represent the official views of the European Space Agency.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].