Code Monkey home page Code Monkey logo

csctl's Introduction

csctl - The Official Containership CLI

CircleCI Go Report Card codecov

Contributor Covenant

csctl is a command line interface for Containership.

Find more information at: https://github.com/containership/csctl

Usage:
  csctl [command]

Available Commands:
  create      Create a resource
  delete      Delete a resource
  export      Export a resource
  get         Get a resource
  help        Help about any command
  login       Log in to Containership cloud
  logout      Log out of the CLI
  scale       Scale a node pool
  ssh         SSH into nodes of a cluster
  upgrade     Upgrade a cluster node pool or resource
  version     Output the current version of csctl

Flags:
      --config string   config file (default is ~/.containership/csctl.yaml)
      --debug           enable/disable debug mode (trace all HTTP requests)
  -h, --help            help for csctl
      --token string    Containership token to authenticate with

Use "csctl [command] --help" for more information about a command.

This repository also contains the go client for interacting with Containership Cloud. For more info, please refer to the client documentation.

Warning: This project is currently under active development and is subject to breaking changes without notice.

Installing

To install the csctl binary, simply run:

go get -u github.com/containership/csctl

Alternatively, you can clone this repository and install via make:

make install

Docker

Docker images are also provided for users that don't want to install the binary. For example, to run the latest tag:

docker run containership/csctl <args>

Here's a convenient shell alias for running the latest Docker image with the config file at the default location mounted in:

alias csctl="docker run \
            --mount type=bind,source=$HOME/.containership/csctl.yaml,target=/app/csctl.yaml \
            containership/csctl --config /app/csctl.yaml"

Now it can be invoked as csctl <args> as usual.

Usage

Please use csctl -h for now to discover usage.

More documentation will be added as the project matures.

Configuration

csctl defaults to a config file located at ~/.containership/csctl.yaml. You may also choose to manually specify a config file using --config.

Authentication

A token is required to authenticate with Containership Cloud for almost every command.

It's recommended to generate a new Personal Access Token through the UI for this. csctl can then be configured to use this token by adding it under the token key in the config file. The token can also be specified on the command line via --token for any command that requires it; however, setting the token key of the config file is the preferred approach to limit command line complexity.

Contexts

When interacting with Containership resources, it's often required to specify an organization, cluster, etc. Instead of supplying these options via command lines flags every time, it's possible to specify them in the config file, creating a basic context to operate within. Command line flags will override config file keys of the same name.

For example, one way to list all clusters in an organization is to supply the --organization flag on the command line as follows:

csctl get clusters --organization a4de3b04-60eb-45c2-a5d5-0d145fa1de58

However, chances are that most of the work a user does is within the context of a single organization. In this case, a better way to specify the organization context is through the config file. The most basic config file that can accomplish the same as above but without any command line flags is the following:

token: <containership_cloud_token>
organization: a4de3b04-60eb-45c2-a5d5-0d145fa1de58

The same context concept extends to clusters and node pools.

Contributing

Thank you for your interest in this project and for your interest in contributing! Feel free to open issues for feature requests, bugs, or even just questions - we love feedback and want to hear from you.

PRs are also always welcome! However, if the feature you're considering adding is fairly large in scope, please consider opening an issue for discussion first.

csctl's People

Contributors

mattkelly avatar nicktate avatar normanjoyner avatar u5surf avatar noahp avatar desaias avatar

Watchers

James Cloos 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.