A tool for managing docker swarm stacks
Project description
devstack
A tool for managing docker stacks.
It reads a yaml file in the docker-compose (for swarm) format and creates the following things:
- a stack name using the 'stem' part of the file (ex: omg.yml → stack name = omg)
- create every external network defined in the file before starting the stack.
- deploy the stack using
docker stack deploy
In the spirit of kubectl command, devstack
command take a yaml file as argument.
List of currently implemented commands:
Usage: devstack [OPTIONS] COMMAND [ARGS]...
Options:
--install-completion [bash|zsh|fish|powershell|pwsh]
Install completion for the specified shell.
--show-completion [bash|zsh|fish|powershell|pwsh]
Show completion for the specified shell, to
copy it or customize the installation.
--help Show this message and exit.
Commands:
logs
create
status
destroy
- devstack create {stack file}.yml
- devstack status {stack file}.yml
- devstack logs {stack file}.yml {service defined in stack}
- devstack destroy {stack file}.yml
Example
Go to examples directory a play with the devstack
command:
# cd examples
# devstack create test.yml
Creating service test_nginx
# devstack status test.yml
ID NAME MODE REPLICAS IMAGE PORTS
t952y8uhg7wk test_nginx replicated 1/1 nginx:alpine *:8088->80/tcp
# curl http://127.0.0.1:8088
<!DOCTYPE html>
<html lang="en">
<body>
<h1>Hello world!</h1>
</body>
</html>
# devstack logs test.yml nginx
...
test_nginx.1.1aeijjmut4rh@thosil02 | 2024/03/13 13:28:10 [notice] 1#1: start worker process 46
test_nginx.1.1aeijjmut4rh@thosil02 | 2024/03/13 13:28:10 [notice] 1#1: start worker process 47
test_nginx.1.1aeijjmut4rh@thosil02 | 2024/03/13 13:28:10 [notice] 1#1: start worker process 48
test_nginx.1.1aeijjmut4rh@thosil02 | 2024/03/13 13:28:10 [notice] 1#1: start worker process 49
test_nginx.1.1aeijjmut4rh@thosil02 | 10.0.0.2 - - [13/Mar/2024:13:28:35 +0100] "GET / HTTP/1.1" 200 81 "-" "curl/8.2.1" "-"
^C
Aborted.
# devstack destroy test.yml
Removing service test_nginx
Contributing
This is a python project, with poetry as package manager
- install poetry
- install deps:
poetry install
- make yourself confident with Typer
Have fun
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
devstack-0.1.3.tar.gz
(4.2 kB
view details)
Built Distribution
File details
Details for the file devstack-0.1.3.tar.gz
.
File metadata
- Download URL: devstack-0.1.3.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-41-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ea5224f832f2f2fa5b4626849779db90180cbcf9ec06cc9152f537368938b29e
|
|
MD5 |
3d730a1a0aefb68f436ffa46d0645619
|
|
BLAKE2b-256 |
a84bae35580dd6e0ad2e0dfe8712c093617f61c06d8e3cabb3d12f12ff408b17
|
File details
Details for the file devstack-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: devstack-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-41-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
c4291b8649d29b36b1a7786dfc7a4ad1251a60d16164aa9313c8bd1d6e606264
|
|
MD5 |
f5bb109a10e9e82bce89d087a0776bc3
|
|
BLAKE2b-256 |
37062006198d21b8db6bfd40774564081aaa37845532841d2c677dc4d47ceff8
|