Skip to main content

SIP Docker Swarm client library.

Project description

SKA SDP SIP Docker Swarm Client API

Introduction

This package contains a client library for interfacing with the Docker engine for creating, deleting and inspecting Docker Swarm services as well as managing Docker Swarm nodes.

This library is intended to be used by other SKA SDP SIP Execution Control services, in particular the Processing Block Controller.

Quick-start

Install with:

pip3 install -U skasip-docker-swarm

Example usage:

from sip_docker_swarm import DockerSwarmClient
DOCKER_SWARM = DockerSwarmClient()
DOCKER_SWARM.get_service_list()

Testing

Linting and unit test are run automatically by SIP CI/CD system but can also be run manually from the docker_api code directory with:

pytest --pylint --docstyle --codestyle -s -v --pylint-rcfile=../../../.pylintrc .

or run the following command from the top level directory

./tools/run_tests.sh sip/execution_control/docker_api/sip_docker_swarm    

TODO

  • Need to add exception into the functions
  • Add Log to the script
  • depends_on is not enabled -> Need to look into this
  • Need to setup the environment variables
  • Unit test for update_node function
  • Figure out how to validate compose files
  • While it is useful to test that service exists, it mighe be even better to test that the service is running as well

Project details


Download files

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

Files for skasip-docker-swarm, version 1.0.14
Filename, size File type Python version Upload date Hashes
Filename, size skasip_docker_swarm-1.0.14-py3-none-any.whl (7.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size skasip-docker_swarm-1.0.14.tar.gz (5.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page