Giter Site home page Giter Site logo

flacatus / chectl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from che-incubator/chectl

0.0 1.0 0.0 7.11 MB

CLI to manage Eclipse Che server and workspaces

License: Eclipse Public License 2.0

Shell 2.85% JavaScript 1.31% TypeScript 95.67% Batchfile 0.01% Dockerfile 0.16%

chectl's Introduction

chectl

Eclipse Che® CLI

oclif codecov

asciicast

Report issues

Issues are tracked on the main Eclipse Che® Repository: https://github.com/eclipse/che/issues

New questions New bug

Table Of Contents

Installation

There are two channels of chectl: stable and next

Stable is for all tagged versions of Eclipse Che®. Next is updated after each commit/Pull Request being merged in main branch of the Chectl repository.

If you're using Windows x64, here is how to install chectl by using one single PowerShell command:

  • For stable channel:
C:\Users> Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://www.eclipse.org/che/chectl/win/'))
  • For next channel:
C:\Users> $CHANNEL="next"; Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://www.eclipse.org/che/chectl/win/'))

If you're using linux or macOS, here is how to install chectl by using one single command:

  • For stable channel:
$ bash <(curl -sL  https://www.eclipse.org/che/chectl/)
  • For next channel:
$ bash <(curl -sL  https://www.eclipse.org/che/chectl/) --channel=next

Manual install:

  1. Download a .tgz file based on your Operating System / Arch from https://github.com/che-incubator/chectl/releases
  2. Unpack the assembly
  3. Move chectl folder into a folder like $HOME/chectl
  4. Add alias alias chectl=$HOME/chectl/bin/run

Updating

  1. Download a .tgz file based on your Operating System / Arch from https://github.com/che-incubator/chectl/releases
  2. Unpack the assembly into a local repository
CHECTL_VERSION=<DOWNLOADED_CHECTL_VERSION>
CHECTL_BINARIES=<DOWNLOADED_BINARIES_PATH>

CLIENT_DIR=${XDG_DATA_HOME:="$(cd && pwd)/.local/share"}/chectl/client/${CHECTL_VERSION}
mkdir ${CLIENT_DIR} -p
tar -xzf ${CHECTL_BINARIES} -C ${CLIENT_DIR} --strip-components=1
  1. Update chectl from the local repository chectl update --from-local by prompting the downloaded version

Usage

$ chectl server:start
running command...

$ chectl server:stop
running command...

$ chectl workspace:start --devfile
running command...

$ chectl --help [COMMAND]
USAGE
  $ chectl COMMAND
...

Commands

chectl autocomplete [SHELL]

display autocomplete installation instructions

USAGE
  $ chectl autocomplete [SHELL]

ARGUMENTS
  SHELL  shell type

OPTIONS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

EXAMPLES
  $ chectl autocomplete
  $ chectl autocomplete bash
  $ chectl autocomplete zsh
  $ chectl autocomplete --refresh-cache

See code: @oclif/plugin-autocomplete

chectl cacert:export

Retrieves Eclipse Che self-signed certificate

USAGE
  $ chectl cacert:export

OPTIONS
  -d, --destination=destination
      Destination where to store Eclipse Che self-signed CA certificate.
      If the destination is a file (might not exist), then the certificate will be saved there in PEM format.
      If the destination is a directory, then cheCA.crt file will be created there with Eclipse Che certificate in PEM
      format.
      If this option is omitted, then Eclipse Che certificate will be stored in a user's temporary directory as cheCA.crt.

  -h, --help
      show CLI help

  -n, --chenamespace=chenamespace
      Eclipse Che Kubernetes namespace.

  --telemetry=on|off
      Enable or disable telemetry. This flag skips a prompt and enable/disable telemetry

See code: src/commands/cacert/export.ts

chectl dashboard:open

Open Eclipse Che dashboard

USAGE
  $ chectl dashboard:open

OPTIONS
  -h, --help                       show CLI help
  -n, --chenamespace=chenamespace  Eclipse Che Kubernetes namespace.
  --telemetry=on|off               Enable or disable telemetry. This flag skips a prompt and enable/disable telemetry

See code: src/commands/dashboard/open.ts

chectl help [COMMANDS]

Display help for chectl.

USAGE
  $ chectl help [COMMANDS]

ARGUMENTS
  COMMANDS  Command to show help for.

OPTIONS
  -n, --nested-commands  Include all nested commands in the output.

See code: @oclif/plugin-help

chectl server:debug

Enable local debug of Eclipse Che server

USAGE
  $ chectl server:debug

OPTIONS
  -h, --help                       show CLI help
  -n, --chenamespace=chenamespace  Eclipse Che Kubernetes namespace.
  --debug-port=debug-port          [default: 8000] Eclipse Che server debug port
  --skip-kubernetes-health-check   Skip Kubernetes health check
  --telemetry=on|off               Enable or disable telemetry. This flag skips a prompt and enable/disable telemetry

See code: src/commands/server/debug.ts

chectl server:delete

delete any Eclipse Che related resource

USAGE
  $ chectl server:delete

OPTIONS
  -h, --help                       show CLI help
  -n, --chenamespace=chenamespace  Eclipse Che Kubernetes namespace.

  -y, --yes                        Automatic yes to prompts; assume "yes" as answer to all prompts and run
                                   non-interactively

  --batch                          Batch mode. Running a command without end user interaction.

  --delete-all                     Indicates to delete Eclipse Che and Dev Workspace related resources

  --delete-namespace               Indicates that a Eclipse Che namespace will be deleted as well

  --skip-kubernetes-health-check   Skip Kubernetes health check

  --telemetry=on|off               Enable or disable telemetry. This flag skips a prompt and enable/disable telemetry

See code: src/commands/server/delete.ts

chectl server:deploy

Deploy Eclipse Che server

USAGE
  $ chectl server:deploy

OPTIONS
  -b, --domain=domain
      Domain of the Kubernetes cluster (e.g. example.k8s-cluster.com or <local-ip>.nip.io)
      This flag makes sense only for Kubernetes family infrastructures and will be autodetected for Minikube and MicroK8s
      in most cases.
      However, for Kubernetes cluster it is required to specify.
      Please note, that just setting this flag will not likely work out of the box.
      According changes should be done in Kubernetes cluster configuration as well.
      In case of Openshift, domain adjustment should be done on the cluster configuration level.

  -d, --directory=directory
      Directory to store logs into

  -h, --help
      show CLI help

  -i, --cheimage=cheimage
      Eclipse Che server container image

  -n, --chenamespace=chenamespace
      Eclipse Che Kubernetes namespace.

  -p, --platform=minikube|k8s|openshift|microk8s|docker-desktop|crc
      (required) Type of Kubernetes platform.

  -t, --templates=templates
      Path to the templates folder

  --[no-]auto-update
      Auto update approval strategy for installation Eclipse Che.
      With this strategy will be provided auto-update Eclipse Che without any human interaction.
      By default this flag is enabled.

  --batch
      Batch mode. Running a command without end user interaction.

  --catalog-source-image=catalog-source-image
      OLM catalog source image or index bundle (IIB) from which to install the Eclipse Che operator.

  --catalog-source-name=catalog-source-name
      Name of the OLM catalog source or index bundle (IIB) from which to install Eclipse Che operator.

  --catalog-source-namespace=catalog-source-namespace
      Namespace for OLM catalog source to install Eclipse Che operator.

  --catalog-source-yaml=catalog-source-yaml
      Path to a yaml file that describes custom catalog source for installation Eclipse Che operator.
      Catalog source will be applied to the namespace with Eclipse Che operator.
      Also you need define 'olm-channel' name and 'package-manifest-name'.

  --che-operator-cr-patch-yaml=che-operator-cr-patch-yaml
      Path to a yaml file that overrides the default values in CheCluster CR used by the operator. This parameter is used
      only when the installer is the 'operator' or the 'olm'.

  --che-operator-cr-yaml=che-operator-cr-yaml
      Path to a yaml file that defines a CheCluster used by the operator.

  --che-operator-image=che-operator-image
      Container image of the operator.

  --cluster-monitoring
      Enable cluster monitoring to scrape Eclipse Che metrics in Prometheus.
      This parameter is used only when the platform is 'openshift'.

  --debug
      'Enables the debug mode for Eclipse Che server. To debug Eclipse Che server from localhost use 'server:debug'
      command.'

  --devfile-registry-url=devfile-registry-url
      The URL of the external Devfile registry.

  --k8spoddownloadimagetimeout=k8spoddownloadimagetimeout
      [default: 1200000] Waiting time for Pod downloading image (in milliseconds)

  --k8spoderrorrechecktimeout=k8spoderrorrechecktimeout
      [default: 60000] Waiting time for Pod rechecking error (in milliseconds)

  --k8spodreadytimeout=k8spodreadytimeout
      [default: 60000] Waiting time for Pod Ready condition (in milliseconds)

  --k8spodwaittimeout=k8spodwaittimeout
      [default: 60000] Waiting time for Pod scheduled condition (in milliseconds)

  --olm-channel=olm-channel
      Olm channel to install Eclipse Che, f.e. stable.
      If options was not set, will be used default version for package manifest.

  --package-manifest-name=package-manifest-name
      Package manifest name to subscribe to Eclipse Che OLM package manifest.

  --plugin-registry-url=plugin-registry-url
      The URL of the external plugin registry.

  --skip-cert-manager
      Skip installing Cert Manager (Kubernetes cluster only).

  --skip-devworkspace-operator
      Skip installing Dev Workspace Operator.

  --skip-kubernetes-health-check
      Skip Kubernetes health check

  --skip-oidc-provider-check
      Skip OIDC Provider check

  --skip-version-check
      Skip minimal versions check.

  --starting-csv=starting-csv
      Starting cluster service version(CSV) for installation Eclipse Che.
      Flags uses to set up start installation version Che.
      For example: 'starting-csv' provided with value 'eclipse-che.v7.10.0' for stable channel.
      Then OLM will install Eclipse Che with version 7.10.0.
      Notice: this flag will be ignored with 'auto-update' flag. OLM with auto-update mode installs the latest known
      version.

  --telemetry=on|off
      Enable or disable telemetry. This flag skips a prompt and enable/disable telemetry

  --workspace-pvc-storage-class-name=workspace-pvc-storage-class-name
      persistent volume(s) storage class name to use to store Eclipse Che workspaces data

See code: src/commands/server/deploy.ts

chectl server:logs

Collect Eclipse Che logs

USAGE
  $ chectl server:logs

OPTIONS
  -d, --directory=directory        Directory to store logs into
  -h, --help                       show CLI help
  -n, --chenamespace=chenamespace  Eclipse Che Kubernetes namespace.
  --skip-kubernetes-health-check   Skip Kubernetes health check
  --telemetry=on|off               Enable or disable telemetry. This flag skips a prompt and enable/disable telemetry

See code: src/commands/server/logs.ts

chectl server:start

Start Eclipse Che server

USAGE
  $ chectl server:start

OPTIONS
  -d, --directory=directory                                Directory to store logs into
  -h, --help                                               show CLI help
  -n, --chenamespace=chenamespace                          Eclipse Che Kubernetes namespace.
  --batch                                                  Batch mode. Running a command without end user interaction.

  --k8spoddownloadimagetimeout=k8spoddownloadimagetimeout  [default: 1200000] Waiting time for Pod downloading image (in
                                                           milliseconds)

  --k8spoderrorrechecktimeout=k8spoderrorrechecktimeout    [default: 60000] Waiting time for Pod rechecking error (in
                                                           milliseconds)

  --k8spodreadytimeout=k8spodreadytimeout                  [default: 60000] Waiting time for Pod Ready condition (in
                                                           milliseconds)

  --k8spodwaittimeout=k8spodwaittimeout                    [default: 60000] Waiting time for Pod scheduled condition (in
                                                           milliseconds)

  --skip-kubernetes-health-check                           Skip Kubernetes health check

  --telemetry=on|off                                       Enable or disable telemetry. This flag skips a prompt and
                                                           enable/disable telemetry

See code: src/commands/server/start.ts

chectl server:status

Status Eclipse Che server

USAGE
  $ chectl server:status

OPTIONS
  -h, --help                       show CLI help
  -n, --chenamespace=chenamespace  Eclipse Che Kubernetes namespace.
  --telemetry=on|off               Enable or disable telemetry. This flag skips a prompt and enable/disable telemetry

See code: src/commands/server/status.ts

chectl server:stop

stop Eclipse Che server

USAGE
  $ chectl server:stop

OPTIONS
  -h, --help                       show CLI help
  -n, --chenamespace=chenamespace  Eclipse Che Kubernetes namespace.
  --skip-kubernetes-health-check   Skip Kubernetes health check
  --telemetry=on|off               Enable or disable telemetry. This flag skips a prompt and enable/disable telemetry

See code: src/commands/server/stop.ts

chectl server:update

Update Eclipse Che server.

USAGE
  $ chectl server:update

OPTIONS
  -h, --help
      show CLI help

  -n, --chenamespace=chenamespace
      Eclipse Che Kubernetes namespace.

  -t, --templates=templates
      Path to the templates folder

  -y, --yes
      Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively

  --[no-]auto-update
      Auto update approval strategy for installation Eclipse Che.
      With this strategy will be provided auto-update Eclipse Che without any human interaction.
      By default this flag is enabled.

  --batch
      Batch mode. Running a command without end user interaction.

  --catalog-source-image=catalog-source-image
      OLM catalog source image or index bundle (IIB) from which to install the Eclipse Che operator.

  --catalog-source-name=catalog-source-name
      Name of the OLM catalog source or index bundle (IIB) from which to install Eclipse Che operator.

  --catalog-source-namespace=catalog-source-namespace
      Namespace for OLM catalog source to install Eclipse Che operator.

  --catalog-source-yaml=catalog-source-yaml
      Path to a yaml file that describes custom catalog source for installation Eclipse Che operator.
      Catalog source will be applied to the namespace with Eclipse Che operator.
      Also you need define 'olm-channel' name and 'package-manifest-name'.

  --che-operator-cr-patch-yaml=che-operator-cr-patch-yaml
      Path to a yaml file that overrides the default values in CheCluster CR used by the operator. This parameter is used
      only when the installer is the 'operator' or the 'olm'.

  --che-operator-image=che-operator-image
      Container image of the operator.

  --olm-channel=olm-channel
      Olm channel to install Eclipse Che, f.e. stable.
      If options was not set, will be used default version for package manifest.

  --package-manifest-name=package-manifest-name
      Package manifest name to subscribe to Eclipse Che OLM package manifest.

  --skip-devworkspace-operator
      Skip installing Dev Workspace Operator.

  --skip-kubernetes-health-check
      Skip Kubernetes health check

  --skip-version-check
      Skip minimal versions check.

  --starting-csv=starting-csv
      Starting cluster service version(CSV) for installation Eclipse Che.
      Flags uses to set up start installation version Che.
      For example: 'starting-csv' provided with value 'eclipse-che.v7.10.0' for stable channel.
      Then OLM will install Eclipse Che with version 7.10.0.
      Notice: this flag will be ignored with 'auto-update' flag. OLM with auto-update mode installs the latest known
      version.

  --telemetry=on|off
      Enable or disable telemetry. This flag skips a prompt and enable/disable telemetry

EXAMPLES
  # Update Eclipse Che:
  chectl server:update

  # Update Eclipse Che in 'eclipse-che' namespace:
  chectl server:update -n eclipse-che

  # Update Eclipse Che and update its configuration in the custom resource:
  chectl server:update --che-operator-cr-patch-yaml patch.yaml

  # Update Eclipse Che from the provided channel:
  chectl server:update --olm-channel next

  # Update Eclipse Che from the provided CatalogSource and channel:
  chectl server:update --olm-channel fast --catalog-source-name MyCatalogName --catalog-source-namespace 
  MyCatalogNamespace

  # Create CatalogSource based on provided image and update Eclipse Che from it:
  chectl server:update --olm-channel latest --catalog-source-image MyCatalogImage

  # Create a CatalogSource defined in yaml file and update Eclipse Che from it:
  chectl server:update --olm-channel stable --catalog-source-yaml PATH_TO_CATALOG_SOURCE_YAML

See code: src/commands/server/update.ts

chectl update [CHANNEL]

update the chectl CLI

USAGE
  $ chectl update [CHANNEL]

OPTIONS
  --from-local  interactively choose an already installed version

See code: @oclif/plugin-update

Contributing

Contributing to chectl is covered in CONTRIBUTING.md

Builds

This repo contains several actions, including:

  • release latest stable
  • PR
  • try in webIDE

Downstream builds can be found at the link below, which is internal to Red Hat. Stable builds can be found by replacing the 3.x with a specific version like 3.2.

See also:

License

Eclipse Che® is open sourced under the Eclipse Public License 2.0.

Trademark

"Che" is a trademark of the Eclipse Foundation.

chectl's People

Contributors

adamkarsenti avatar akervern avatar amisevsk avatar andrienkoaleksandr avatar apupier avatar azatsarynnyy avatar benoitf avatar davidfestal avatar dependabot-preview[bot] avatar dependabot[bot] avatar flacatus avatar forember avatar jeffmaury avatar l0rd avatar metlos avatar mikoto2000 avatar mkuznyetsov avatar mmorhun avatar nallikaea avatar nickboldt avatar rhopp avatar sdawley avatar sleshchenko avatar sparkoo avatar sunix avatar svor avatar themr0c avatar tolusha avatar tomgeorge avatar vitaliy-guliy avatar

Watchers

 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.