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.

Source Distribution

skasip-docker_swarm-1.0.14.tar.gz (5.9 kB view hashes)

Uploaded Source

Built Distribution

skasip_docker_swarm-1.0.14-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

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