Code Monkey home page Code Monkey logo

ctl's Introduction

Conduktor ctl

Release License Roadmap twitter

This repository contain Conduktor CLI source code. Conduktor CLI is a command line tool to interact with Conduktor Console. It is strongly inspired by Kubernetes kubectl CLI tool and reuse some of it's concepts.

How to install

From binaries (Linux, MacOS, Windows)

Look for assets of the last release at https://github.com/conduktor/ctl/releases

Using Docker image

How to get the latest docker image:

docker pull conduktor/conduktor-ctl:latest

From source

You will need Go 1.22+ installed and configured on your machine.

To build simply run

go build -o conduktor .

You will find the conduktor binary at the root of the project.

Usage

To run the CLI you will need to provide the Conduktor Console URL and an API access token.

Configure

To use Conduktor CLI, you need to define 2 environment variables:

  • The URL of Conduktor Console
  • Your API token (either a User Token or Application Token). You can generate an API token on /settings/public-api-keys page of your Console instance.
CDK_BASE_URL=http://localhost:8080
CDK_TOKEN=<admin-token>

Commands Usage

Usage:
  conduktor [command]
Available Commands:
  apply       Upsert a resource on Conduktor
  completion  Generate the autocompletion script for the specified shell
  delete      Delete resource of a given kind and name
  get         Get resource of a given kind
  help        Help about any command
  version     Display the version of conduktor
Flags:
  -h, --help      Help for conduktor
  -v, --verbose   Show more information for debugging

You can find more usage details on our documentation

How to use behind teleport

If you are using Conduktor behind a teleport proxy, you will need to provide the certificate and key to the CLI using CDK_CERT and CDK_KEY environment variables.

First login to your teleport proxy, for example:

tsh login --proxy="$TELEPORT_SERVER" --auth="$TELEPORT_AUTH_METHOD"
tsh apps login console
export CDK_CERT=$(tsh apps config --format=cert)
export CDK_KEY=$(tsh apps config --format=key)
conduktor get application

Development

How to run:

read CDK_TOKEN
export CDK_TOKEN
export CDK_BASE_URL=http://localhost:8080
go run . 

How to run unit test:

go test ./...

How to run integration test:

./test_final_exec.sh

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

ctl's People

Contributors

qboileau 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.