A poor man's kubectl for docker swarm
Project description
Portainer controller
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
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
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.
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
portainer_ctl-0.1.2.tar.gz
(8.7 kB
view details)
Built Distribution
File details
Details for the file portainer_ctl-0.1.2.tar.gz
.
File metadata
- Download URL: portainer_ctl-0.1.2.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a304b65518b60715cea552fec696090f718153585d10c0dfd8d2bb48da83ed5 |
|
MD5 | 09d657c131fc743c94b1585e297d7aaf |
|
BLAKE2b-256 | e970d64dac84f6120c09cf3e865a77a0adbeb2c8ff0ad7e4e15b069ca51d752c |
File details
Details for the file portainer_ctl-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: portainer_ctl-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e53c1a2910e963f773540f7d74a73bddef1a748cb82b68222304580259b2363e |
|
MD5 | 76579e1b1628c348cfd1f28ebb67b737 |
|
BLAKE2b-256 | bde11cd96d19d0aac596d2d6ee8addc20064b1d5b60fc497e69b706e87baf92b |