Giter Club home page Giter Club logo

portainer-ctl's Introduction

Portainer controller

Install

This project is published to PyPi and you can install it using pip:

pip install portainer-ctl

You can also use the published container images:

docker pull hnaderi/pctl
# or
docker pull ghcr.io/hnaderi/pctl

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.

portainer-ctl's People

Contributors

hnaderi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.