### Portainer controller
[![](https://img.shields.io/pypi/v/portainer-ctl)](https://pypi.org/project/portainer-ctl/)
### Install
```
pip install portainer-ctl
```
#### Features
- Fully automated deployment
- Support for multiple config and secret
- Support for .env files and multiple variables
- Support for api tokens introduced in portainer 2.11.0
#### Usage
``` plaintext
usage: pctl [-h] [-T API_TOKEN] [-H HOST] [-U USERNAME] [-P PASSWORD] {deploy,destroy} ...
Portainer deployment client
optional arguments:
-h, --help show this help message and exit
-T API_TOKEN, --api-token API_TOKEN
api token for user, overrides PORTAINER_TOKEN variable
-H HOST, --host HOST portainer host, overrides PORTAINER_HOST variable; defaults to `http://localhost`
-U USERNAME, --username USERNAME
username to login, overrides PORTAINER_USERNAME variable; defaults to `admin`
-P PASSWORD, --password PASSWORD
password for user, overrides PORTAINER_PASSWORD variable; defaults to admin
subcommands:
valid subcommands
{deploy,destroy} additional help
Use it to automate workflows for less mouse clicks!
```
You can provide host, username and password in environment:
- PORTAINER_HOST
- PORTAINER_USERNAME
- PORTAINER_PASSWORD
- PORTAINER_TOKEN
##### deploy command
``` plaintext
usage: pctl deploy [-h] -f COMPOSE_FILE -n NAME -E {staging,production}
[-S STACK_NAME] [--env-file ENV_FILE] [-e VARIABLE]
[-c CONFIG] [-s SECRET]
options:
-h, --help show this help message and exit
-f COMPOSE_FILE, --compose-file COMPOSE_FILE
compose manifest file
-n NAME, --name NAME deployment name
-E {staging,production}, --environment {staging,production}
environment to deploy on
-S STACK_NAME, --stack-name STACK_NAME
use this to override stack name
--env-file ENV_FILE dot env file used for deployment, it will be used as
stack environment in portainer
-e VARIABLE, --variable VARIABLE
environment variable `SOME_ENV=some-value`
-c CONFIG, --config CONFIG
create config; args must be like `local-path-to-
file:conf-name`; NOTE that as configs are immutable
and might be already in use, your config name must not
exist! use versioning or date in names to always get a
new name
-s SECRET, --secret SECRET
create a new secret; see --config.
```
Raw data
{
"_id": null,
"home_page": "",
"name": "portainer-ctl",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "portainer,swarm,docker,docker swarm,kubectl",
"author": "Hossein Naderi",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/e9/70/d64dac84f6120c09cf3e865a77a0adbeb2c8ff0ad7e4e15b069ca51d752c/portainer_ctl-0.1.2.tar.gz",
"platform": null,
"description": "### Portainer controller\n[![](https://img.shields.io/pypi/v/portainer-ctl)](https://pypi.org/project/portainer-ctl/)\n\n### Install\n```\npip install portainer-ctl\n```\n\n#### Features\n- Fully automated deployment\n- Support for multiple config and secret\n- Support for .env files and multiple variables\n- Support for api tokens introduced in portainer 2.11.0\n\n#### Usage\n\n``` plaintext\nusage: pctl [-h] [-T API_TOKEN] [-H HOST] [-U USERNAME] [-P PASSWORD] {deploy,destroy} ...\n\nPortainer deployment client\n\noptional arguments:\n -h, --help show this help message and exit\n -T API_TOKEN, --api-token API_TOKEN\n api token for user, overrides PORTAINER_TOKEN variable\n -H HOST, --host HOST portainer host, overrides PORTAINER_HOST variable; defaults to `http://localhost`\n -U USERNAME, --username USERNAME\n username to login, overrides PORTAINER_USERNAME variable; defaults to `admin`\n -P PASSWORD, --password PASSWORD\n password for user, overrides PORTAINER_PASSWORD variable; defaults to admin\n\nsubcommands:\n valid subcommands\n\n {deploy,destroy} additional help\n\nUse it to automate workflows for less mouse clicks!\n```\n\nYou can provide host, username and password in environment:\n- PORTAINER_HOST\n- PORTAINER_USERNAME\n- PORTAINER_PASSWORD\n- PORTAINER_TOKEN\n\n##### deploy command\n\n``` plaintext\nusage: pctl deploy [-h] -f COMPOSE_FILE -n NAME -E {staging,production}\n [-S STACK_NAME] [--env-file ENV_FILE] [-e VARIABLE]\n [-c CONFIG] [-s SECRET]\n\noptions:\n -h, --help show this help message and exit\n -f COMPOSE_FILE, --compose-file COMPOSE_FILE\n compose manifest file\n -n NAME, --name NAME deployment name\n -E {staging,production}, --environment {staging,production}\n environment to deploy on\n -S STACK_NAME, --stack-name STACK_NAME\n use this to override stack name\n --env-file ENV_FILE dot env file used for deployment, it will be used as\n stack environment in portainer\n -e VARIABLE, --variable VARIABLE\n environment variable `SOME_ENV=some-value`\n -c CONFIG, --config CONFIG\n create config; args must be like `local-path-to-\n file:conf-name`; NOTE that as configs are immutable\n and might be already in use, your config name must not\n exist! use versioning or date in names to always get a\n new name\n -s SECRET, --secret SECRET\n create a new secret; see --config.\n```\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "A poor man's kubectl for docker swarm",
"version": "0.1.2",
"project_urls": null,
"split_keywords": [
"portainer",
"swarm",
"docker",
"docker swarm",
"kubectl"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bde11cd96d19d0aac596d2d6ee8addc20064b1d5b60fc497e69b706e87baf92b",
"md5": "76579e1b1628c348cfd1f28ebb67b737",
"sha256": "e53c1a2910e963f773540f7d74a73bddef1a748cb82b68222304580259b2363e"
},
"downloads": -1,
"filename": "portainer_ctl-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "76579e1b1628c348cfd1f28ebb67b737",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10572,
"upload_time": "2023-09-05T06:01:24",
"upload_time_iso_8601": "2023-09-05T06:01:24.498066Z",
"url": "https://files.pythonhosted.org/packages/bd/e1/1cd96d19d0aac596d2d6ee8addc20064b1d5b60fc497e69b706e87baf92b/portainer_ctl-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e970d64dac84f6120c09cf3e865a77a0adbeb2c8ff0ad7e4e15b069ca51d752c",
"md5": "09d657c131fc743c94b1585e297d7aaf",
"sha256": "0a304b65518b60715cea552fec696090f718153585d10c0dfd8d2bb48da83ed5"
},
"downloads": -1,
"filename": "portainer_ctl-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "09d657c131fc743c94b1585e297d7aaf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 8687,
"upload_time": "2023-09-05T06:01:25",
"upload_time_iso_8601": "2023-09-05T06:01:25.999972Z",
"url": "https://files.pythonhosted.org/packages/e9/70/d64dac84f6120c09cf3e865a77a0adbeb2c8ff0ad7e4e15b069ca51d752c/portainer_ctl-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-05 06:01:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "portainer-ctl"
}