cozystack / cozystack

Free and Open Source PaaS framework for seamless management of virtual machines, managed Kubernetes, and Databases-as-a-Service
https://cozystack.io
Apache License 2.0
1.36k stars 94 forks source link

cozyctl CLI #819

Open kevin880202 opened 3 weeks ago

kevin880202 commented 3 weeks ago

Hello team, it would be great to have a CLI tool. A CLI tool could make the cozystack admin experience better, including managing Cozystack and interacting with Cozystack api. The CLI could also be integrated with Talm and talos-bootstrap. cozyctl talm and cozyctl talos-bootstrap Here are some examples:

  1. cozyctl install -v 0.30 for

    kubectl create ns cozy-system
    kubectl apply -f cozystack-config.yaml
    kubectl apply -f https://github.com/cozystack/cozystack/releases/download/v0.30.0/cozystack-installer.yaml
  2. cozyctl get monitoring-password -n tenant-root for

    kubectl get secret -n tenant-root grafana-admin-password -o go-template='{{ printf "%s\n" (index .data "password" | base64decode) }}'
  3. cozyctl gen config --bundle paas-full for generating the manifests

  4. cozyctl deploy kubernetes for deploying a kubernetes through capi

NickVolynkin commented 3 weeks ago

I believe, talm is close to what you are talking about for deployment tasks

https://cozystack.io/docs/operations/talos/configuration/talm/

kevin880202 commented 3 weeks ago

Talm is only for managing talos linux, not the cozystack platform. I hope there is a CLI tool for the platform itself to make some operations easier.

kvaps commented 3 weeks ago

I love this idea, we can create a kubectl plugin an distribute it via krew

gecube commented 3 weeks ago

I also like this idea!

rxinui commented 1 week ago

now that the Feature tag is added, can we start to work on this feature?

If so, I'd like to start the CLI work, if you are planning a sub-module or a separate repository for it, these have beeb discussed in a community meeting?

cc: @kvaps @NickVolynkin