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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file skasip-docker_swarm-1.0.14.tar.gz
.
File metadata
- Download URL: skasip-docker_swarm-1.0.14.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b14fe77e1d4cba490291fe862dd9f2272a79714342622204097e25c35ce1085 |
|
MD5 | 5e63d34fa892e3c7046e238806689689 |
|
BLAKE2b-256 | 54d25a2e9dfe0502748ecc39cfb08f351f77b954cbb6b10472b4190af9d1c3e6 |
File details
Details for the file skasip_docker_swarm-1.0.14-py3-none-any.whl
.
File metadata
- Download URL: skasip_docker_swarm-1.0.14-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a871f4c28ecc8ae4e5b935a7490092d55ed6574752ec8205ac12036066a80f4 |
|
MD5 | 2345d43754810badeebeff0a2a99a355 |
|
BLAKE2b-256 | 18fc84c82af7be2d05dff6ff3ed9a2e50400df952dc880f1b4b2061fc9c97614 |