devstack


Namedevstack JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://pypi.org/project/devstack/
SummaryA tool for managing docker swarm stacks
upload_time2024-09-03 09:09:57
maintainerNone
docs_urlNone
authorThomas Silvestre
requires_python<4.0,>=3.10
licenseMIT
keywords docker swarm stack dev
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://python-poetry.org/) as package manager

- [install poetry](https://python-poetry.org/docs/#installation)
- install deps: `poetry install`
- make yourself confident with [Typer](https://github.com/tiangolo/typer)
 

Have fun
            

Raw data

            {
    "_id": null,
    "home_page": "https://pypi.org/project/devstack/",
    "name": "devstack",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "docker, swarm, stack, dev",
    "author": "Thomas Silvestre",
    "author_email": "t.silvestre@gravitysoftware.be",
    "download_url": "https://files.pythonhosted.org/packages/a8/4b/ae35580dd6e0ad2e0dfe8712c093617f61c06d8e3cabb3d12f12ff408b17/devstack-0.1.3.tar.gz",
    "platform": null,
    "description": "# devstack\n\nA tool for managing docker stacks.\n\nIt reads a yaml file in the docker-compose (for swarm) format and creates the following things:\n- a stack name using the 'stem' part of the file (ex: omg.yml \u2192 stack name = omg)\n- create every external network defined in the file before starting the stack.\n- deploy the stack using `docker stack deploy`\n\nIn the spirit of kubectl command, `devstack` command take a yaml file as argument.\n\n## List of currently implemented commands:\n\n```\nUsage: devstack [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  --install-completion [bash|zsh|fish|powershell|pwsh]\n                                  Install completion for the specified shell.\n  --show-completion [bash|zsh|fish|powershell|pwsh]\n                                  Show completion for the specified shell, to\n                                  copy it or customize the installation.\n  --help                          Show this message and exit.\n\nCommands:\n  logs\n  create\n  status\n  destroy\n```\n\n* devstack create {stack file}.yml\n* devstack status {stack file}.yml\n* devstack logs {stack file}.yml {service defined in stack}\n* devstack destroy {stack file}.yml\n\n## Example\n\nGo to examples directory a play with the `devstack` command:\n\n```\n# cd examples\n# devstack create test.yml\nCreating service test_nginx\n# devstack status test.yml\nID             NAME         MODE         REPLICAS   IMAGE          PORTS\nt952y8uhg7wk   test_nginx   replicated   1/1        nginx:alpine   *:8088->80/tcp\n# curl http://127.0.0.1:8088\n<!DOCTYPE html>\n<html lang=\"en\">\n<body>\n    <h1>Hello world!</h1>\n</body>\n</html>\n# devstack logs test.yml nginx\n...\ntest_nginx.1.1aeijjmut4rh@thosil02    | 2024/03/13 13:28:10 [notice] 1#1: start worker process 46\ntest_nginx.1.1aeijjmut4rh@thosil02    | 2024/03/13 13:28:10 [notice] 1#1: start worker process 47\ntest_nginx.1.1aeijjmut4rh@thosil02    | 2024/03/13 13:28:10 [notice] 1#1: start worker process 48\ntest_nginx.1.1aeijjmut4rh@thosil02    | 2024/03/13 13:28:10 [notice] 1#1: start worker process 49\ntest_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\" \"-\"\n^C\nAborted.\n# devstack destroy test.yml\nRemoving service test_nginx\n```\n\n## Contributing\n\nThis is a python project, with [poetry](https://python-poetry.org/) as package manager\n\n- [install poetry](https://python-poetry.org/docs/#installation)\n- install deps: `poetry install`\n- make yourself confident with [Typer](https://github.com/tiangolo/typer)\n \n\nHave fun",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A tool for managing docker swarm stacks",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://pypi.org/project/devstack/",
        "Repository": "https://gitlab.com/gravitysoftware/devstack"
    },
    "split_keywords": [
        "docker",
        " swarm",
        " stack",
        " dev"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "37062006198d21b8db6bfd40774564081aaa37845532841d2c677dc4d47ceff8",
                "md5": "f5bb109a10e9e82bce89d087a0776bc3",
                "sha256": "c4291b8649d29b36b1a7786dfc7a4ad1251a60d16164aa9313c8bd1d6e606264"
            },
            "downloads": -1,
            "filename": "devstack-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f5bb109a10e9e82bce89d087a0776bc3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 4794,
            "upload_time": "2024-09-03T09:09:56",
            "upload_time_iso_8601": "2024-09-03T09:09:56.049369Z",
            "url": "https://files.pythonhosted.org/packages/37/06/2006198d21b8db6bfd40774564081aaa37845532841d2c677dc4d47ceff8/devstack-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a84bae35580dd6e0ad2e0dfe8712c093617f61c06d8e3cabb3d12f12ff408b17",
                "md5": "3d730a1a0aefb68f436ffa46d0645619",
                "sha256": "ea5224f832f2f2fa5b4626849779db90180cbcf9ec06cc9152f537368938b29e"
            },
            "downloads": -1,
            "filename": "devstack-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3d730a1a0aefb68f436ffa46d0645619",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 4158,
            "upload_time": "2024-09-03T09:09:57",
            "upload_time_iso_8601": "2024-09-03T09:09:57.348344Z",
            "url": "https://files.pythonhosted.org/packages/a8/4b/ae35580dd6e0ad2e0dfe8712c093617f61c06d8e3cabb3d12f12ff408b17/devstack-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-03 09:09:57",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "gravitysoftware",
    "gitlab_project": "devstack",
    "lcname": "devstack"
}
        
Elapsed time: 0.32589s