Rhoas CLI as an Host example

RHOAS CLI

Logo

rhoas is a command-line client for managing all of your application services on Kubernetes.

Guides

See our Guides for installation and usage instructions.

Commands

See the Command-Line Reference section for details of all available commands and options.

Contributing

Check out the Contributing Guide to learn more about the repository and how you can contribute.

Owner
AeroGear
Modern App Dev begins here - RealTime GraphQL and Push
AeroGear
Comments
  • refactor: make CLI use charmil core packages

    refactor: make CLI use charmil core packages

    Ref issue: https://github.com/aerogear/charmil/issues/234

    Description

    Refactored the CLI to use core packages from Charmil (expect config, which will be done in a separate PR).

    Packages Migrated:

    • [x] color
    • [x] logging
    • [x] localize
    • [x] iostreams
    • [ ] config

    Type of change

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] Documentation change
    • [x] Other (please specify): Refactor

    Checklist

    • [ ] Documentation added for the feature
    • [x] CI and all relevant tests are passing
    • [ ] Code Review completed
    • [ ] Verified independently by reviewer
  • feat: use charmil config management implementation

    feat: use charmil config management implementation

    Description

    • Similar to the changes made through PR: https://github.com/aerogear/charmil-plugin-example/pull/6, in the charmil-plugin-example repo.
    • Replaced the RHOAS config implementation with the one used in the Charmil Core Config package (after improving it).
    • Once this PR is merged, we'll have both the host and plugin config integrated (ie. instead of creating a separate file for plugin config, now the plugin config will be automatically be loaded/saved from/to the host config file).

    Demo

    • While using the host and plugin CLI together:

    https://user-images.githubusercontent.com/51479159/130294525-f4cc6191-2fee-4d22-9a73-64a5c4e80806.mp4

    • While using the plugin CLI in standalone mode:

    https://user-images.githubusercontent.com/51479159/130296442-6339a0ce-e5a2-4f2f-93c9-c0aeb87010b6.mp4

    Type of change

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] Documentation change
    • [ ] Other (please specify)

    Checklist

    • [x] Documentation added for the feature
    • [x] CI and all relevant tests are passing
    • [ ] Code Review completed
    • [ ] Verified independently by reviewer
  • refactor: bump example plugin dependency version

    refactor: bump example plugin dependency version

    Follow-up PR to: https://github.com/aerogear/charmil-plugin-example/pull/5

    Description

    Made the following changes:

    • Bumped the github.com/aerogear/charmil-plugin-example dependency to its latest version ie. v0.1.15
    • Removed redundant code in config initialization
    • Some minor refactoring to make the config management work as expected

    Type of change

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] Documentation change
    • [x] Other (please specify): Refactor

    Checklist

    • [ ] Documentation added for the feature
    • [x] CI and all relevant tests are passing
    • [ ] Code Review completed
    • [ ] Verified independently by reviewer
  • feat: integrate service-registry plugin

    feat: integrate service-registry plugin

    tested it locally.

    as @namit-chandwani suggested - replace github.com/aerogear/charmil-plugin-example => ../charmil-plugin-example

    • Used host's config package in plugin (Anyways charmil config package will be used in plugin as well host)

    Host Output

    ❯ go run ./cmd/rhoas service-registry list
    Refreshing tokens
    Tokens refreshed
      ID (8)    NAME           OWNER                   STATUS  
     --------- -------------- ----------------------- -------- 
      195       user-testing   dlabaj_kafka_devexp     ready   
      1760      enda           ephelan_kafka_devexp    ready   
      2027      jenn-test      jgiardin_kafka_devexp   ready   
      2953      wtrocki-net    wtrocki_kafka_devexp    ready   
      3148      wtrocki        wtrocki_kafka_devexp    ready   
      3290      enda2          ephelan_kafka_devexp    ready   
      3291      rkubis-test    rkubis_kafka_devexp     ready   
      3292      a              rkubis_kafka_devexp     ready  
    
  • feat: add registry commands

    feat: add registry commands

    @namit-chandwani I have pushed broken service-registry commands in host. Not able to configure config package. As you have done changes the config package. Can you apply the changes in the service-registry commands, according to new config package?

    Then we can merge this - in plugin I am doing the same for artifacts commands.

  • feat: integrate plugin with host

    feat: integrate plugin with host

    initial stage PR. Need to use charmil utilities for both plugin and host. But this is how I got it working.' Initialized Plugin's factory in host to pass it to plugin.

    • service-registry command is plugin
    ❯ go run ./cmd/rhoas
    Manage your application services directly from the command line.
    
    Usage:
      rhoas [command]
    
    Examples:
    # authenticate securely through your web browser
    $ rhoas login
    
    # create a Kafka instance
    $ rhoas kafka create my-kafka-cluster
    
    # create a service account and save credentials to a JSON file
    $ rhoas service-account create -o json
    
    # connect your Kubernetes/OpenShift cluster to a service
    $ rhoas cluster connect
    
    
    Available Commands:
      cluster          View and perform operations on your Kubernetes or OpenShift cluster
      completion       Outputs command completion for the given shell (bash, zsh, or fish)
      config           Change specific configuration for the options
      help             Help about any command
      kafka            Create, view, use, and manage your Apache Kafka instances
      login            Log in to RHOAS
      logout           Log out from RHOAS
      service-account  Create, list, describe, delete and update service accounts
      service-registry [Preview] Service Registry commands
      status           View the status of all currently used services
      whoami           Print current username
    
    Flags:
      -h, --help      Show help for a command
      -v, --verbose   Enable verbose mode
          --version   Show rhoas version
    
    Use "rhoas [command] --help" for more information about a command.
    
Related tags
Slack remote terminal - execute commands on remote host using slack slash command

slackRT Slack remote terminal - execute commands on remote host using slack slash command Installation Go to api.slack.com/apps and sign in and create

Jul 12, 2022
A template and a functioning example for a basic JFrog CLI plugin

hello-frog About this plugin This plugin is a template and a functioning example for a basic JFrog CLI plugin. This README shows the expected structur

Dec 21, 2021
A template and a functioning example for a basic JFrog CLI plugin

hello-frog About this plugin This plugin is a template and a functioning example for a basic JFrog CLI plugin. This README shows the expected structur

Nov 26, 2021
Inspect-descriptor-set - Example protobuf descriptor set inspector CLI tool

Quick little example of parsing a protobuf descriptor file. ❯ go run main.go -f

Jan 25, 2022
Elegant CLI wrapper for kubeseal CLI

Overview This is a wrapper CLI ofkubeseal CLI, specifically the raw mode. If you just need to encrypt your secret on RAW mode, this CLI will be the ea

Jan 8, 2022
CLI to run a docker image with R. CLI built using cobra library in go.
CLI  to run a docker image with R. CLI built using cobra library in go.

BlueBeak Installation Guide Task 1: Building the CLI The directory structure looks like Fastest process: 1)cd into bbtools 2)cd into bbtools/bin 3)I h

Dec 20, 2021
A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode.

aliyun-dns A wrapper of aliyun-cli subcommand alidns, run aliyun-cli in Declarative mode. Installation Install aliyun-cli. Usage $ aliyun-dns -h A wra

Dec 21, 2021
Symfony-cli - The Symfony CLI tool For Golang

Symfony CLI Install To install Symfony CLI, please download the appropriate vers

Dec 28, 2022
Go-file-downloader-ftctl - A file downloader cli built using golang. Makes use of cobra for building the cli and go concurrent feature to download files.

ftctl This is a file downloader cli written in Golang which uses the concurrent feature of go to download files. The cli is built using cobra. How to

Jan 2, 2022
Cli-algorithm - A cli program with A&DS in go!

cli-algorithm Objectives The objective of this cli is to implement 4 basic algorithms to sort arrays been Merge Sort Insertion Sort Bubble Sort Quick

Jan 2, 2022
Nebulant-cli - Nebulant's CLI
Nebulant-cli - Nebulant's CLI

Nebulant CLI Website: https://nebulant.io Documentation: https://nebulant.io/docs.html The Nebulant CLI tool is a single binary that can be used as a

Jan 11, 2022
News-parser-cli - Simple CLI which allows you to receive news depending on the parameters passed to it
News-parser-cli - Simple CLI which allows you to receive news depending on the parameters passed to it

news-parser-cli Simple CLI which allows you to receive news depending on the par

Jan 4, 2022
Go-api-cli - Small CLI to fetch data from an API sync and async

Async API Cli CLI to fetch data on "todos" from a given API in a number of ways.

Jan 13, 2022
Syno-cli - Synology unofficial API CLI and library

Synology CLI Unofficial wrapper over Synology API in Go. Focus on administrative

Jan 6, 2023
Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Nebula Diagnosis CLI Tool is an information diagnosis cli tool for the nebula service and the node to which the service belongs.

Jan 12, 2022
bcrypt-cli is the CLI tool for hashing passwords with bcrypt.

bcrypt-cli bcrypt-cli is the CLI tool for hashing passwords with bcrypt. Install go install github.com/ryicoh/bcrypt-cli Usage It can be used like bas

Jan 9, 2023
Gobby-cli - CLI application to debug gobby applications

go(bby) Interactive debugging tool for gobby applications Usage Coming soon™ Ins

Feb 8, 2022
GTDF-CLI - The official CLI tool to operate with Getting Things Done Framework
GTDF-CLI - The official CLI tool to operate with Getting Things Done Framework

This is the official CLI tool to operate with Getting Things Done Framework. How

Feb 14, 2022