Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-4154

CLI displays usage page whenever any command fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 1.6.0.Final
    • None
    • Operator
    • None
    • False
    • False
    • Undefined
    • Hide

      Step 1: Build the kogito cli from master.

      Step 2: In a fresh OCP/K8s cluster (without even installing CRDs) run any kogito cli command. For example:
      build/_output/bin/kogito deploy-service travels --image some-image

       

      Now the output will be:

      Image details are provided, skipping to install kogito build
      Error: kogito Operator CRDs not Found in the cluster. Please install operator before using
      Usage:
      kogito deploy-service NAME [SOURCE] [flags]

      Aliases:
      deploy-service, deploy

      Flags:
      -b, --branch string Git branch to use in the git repository
      --build-env stringArray Key/Pair value environment variables that will be set to the service. For example 'MY_VAR=my_value'. Can be set more than once.
      --build-limits strings Resource limits for the pod. Valid values are 'cpu' and 'memory'. For example 'cpu=1'. Can be set more than once.
      --build-requests strings Resource requests for the pod. Valid values are 'cpu' and 'memory'. For example 'cpu=1'. Can be set more than once.
      --config stringArray Custom application properties that will be set to the service. For example 'MY_VAR=my_value'. Can be set more than once.
      --config-file string Path for custom application properties file to be deployed with the service. This file will be mounted as an external ConfigMap to the service Deployment.
      -c, --context-dir string Context/subdirectory where the code is located, relatively to repository root
      --enable-events If set to true, deployed Kogito service will support integration with Kafka cluster for events. Default to false
      --enable-istio Enable Istio integration by annotating the Kogito service pods with the right value for Istio controller to inject sidecars on it. Defaults to false
      --enable-persistence If set to true, deployed Kogito service will support integration with Infinispan server for persistence. Default to false
      -e, --env stringArray Key/Pair value environment variables that will be set to the service. For example 'MY_VAR=my_value'. Can be set more than once.
      -h, --help help for deploy-service
      -i, --image string The image which should be used to run Service. For example 'quay.io/kiegroup/kogito-data-index:latest'
      --image-runtime string Custom image tag for the s2i build, e.g: quay.io/mynamespace/myimage:latest
      --image-s2i string Custom image tag for the s2i build to build the application binaries, e.g: quay.io/mynamespace/myimage:latest
      --incremental-build Build should be incremental? (default true)
      --infra stringArray Dependent KogitoInfra objects. Can be set more than once.
      --insecure-image-registry Indicates that the Service image points to insecure image registry
      --limits strings Resource limits for the pod. Valid values are 'cpu' and 'memory'. For example 'cpu=1'. Can be set more than once.
      --liveness-initial-delay int32 Number of seconds after the container has started before liveness probes are initiated. Default is 0
      --maven-mirror-url string Internal Maven Mirror to be used during source-to-image builds to considerably increase build speed, e.g: https://my.internal.nexus/content/group/public
      -m, --maven-output If set to true will print the logs for downloading/uploading of maven dependencies. Defaults to false
      --monitoring-path string HTTP path to scrape for metrics. Default is /metrics (default "/metrics")
      --monitoring-scheme string HTTP scheme to use for scraping.Default is http (default "http")
      --native Use native builds? Be aware that native builds takes more time and consume much more resources from the cluster. Defaults to false. Currently only works with s2i (requires [SOURCE] argument).
      -p, --project string The project name where the service will be deployed
      --project-artifact-id string Indicates the unique base name of the primary artifact being generated, e.g: 'project'
      --project-group-id string Indicates the unique identifier of the organization or group that created the project, e.g: 'com.company'
      --project-version string Indicates the version of the artifact generated by the project, e.g: '1.0-SNAPSHOT'
      --readiness-initial-delay int32 Number of seconds after the container has started before readiness probes are initiated. Default is 0
      --replicas int32 Number of pod replicas that should be deployed. (default 1)
      --requests strings Resource requests for the pod. Valid values are 'cpu' and 'memory'. For example 'cpu=1'. Can be set more than once.
      -r, --runtime string The runtime which should be used to build the Service. Valid values are 'quarkus' or 'springboot'. Default to 'quarkus'. (default "quarkus")
      --secret-build-env stringArray Secret Key/Pair value environment variables that will be set to the service. For example 'MY_VAR=secretName#secretKey'. Can be set more than once.
      --secret-env stringArray Secret Key/Pair value environment variables that will be set to the service. For example 'MY_VAR=secretName#secretKey'. Can be set more than once.
      --svc-labels strings Labels that should be applied to the internal endpoint of the Kogito Service. Used by the service discovery engine. Example: 'label=value'. Can be set more than once.
      --target-runtime string Set this field targeting the desired KogitoService when this KogitoBuild instance has a different name than the KogitoService
      --web-hook stringArray Secrets for source to image builds based on Git repositories (Remote Sources). For example 'WEB_HOOK_TYPE=WEB_HOOT_SECRET'. Can be set more than once.

      Global Flags:
      -o, --output string output format (when defined, 'json' is supported)
      -v, --verbose verbose output
      --version display version

      kogito Operator CRDs not Found in the cluster. Please install operator before using

      Although it mentions the error, it also displays the whole usage page.

      Show
      Step 1: Build the kogito cli from master. Step 2: In a fresh OCP/K8s cluster (without even installing CRDs) run any kogito cli command. For example: build/_output/bin/kogito deploy-service travels --image some-image   Now the output will be: Image details are provided, skipping to install kogito build Error: kogito Operator CRDs not Found in the cluster. Please install operator before using Usage: kogito deploy-service NAME [SOURCE] [flags] Aliases: deploy-service, deploy Flags: -b, --branch string Git branch to use in the git repository --build-env stringArray Key/Pair value environment variables that will be set to the service. For example 'MY_VAR=my_value'. Can be set more than once. --build-limits strings Resource limits for the pod. Valid values are 'cpu' and 'memory'. For example 'cpu=1'. Can be set more than once. --build-requests strings Resource requests for the pod. Valid values are 'cpu' and 'memory'. For example 'cpu=1'. Can be set more than once. --config stringArray Custom application properties that will be set to the service. For example 'MY_VAR=my_value'. Can be set more than once. --config-file string Path for custom application properties file to be deployed with the service. This file will be mounted as an external ConfigMap to the service Deployment. -c, --context-dir string Context/subdirectory where the code is located, relatively to repository root --enable-events If set to true, deployed Kogito service will support integration with Kafka cluster for events. Default to false --enable-istio Enable Istio integration by annotating the Kogito service pods with the right value for Istio controller to inject sidecars on it. Defaults to false --enable-persistence If set to true, deployed Kogito service will support integration with Infinispan server for persistence. Default to false -e, --env stringArray Key/Pair value environment variables that will be set to the service. For example 'MY_VAR=my_value'. Can be set more than once. -h, --help help for deploy-service -i, --image string The image which should be used to run Service. For example 'quay.io/kiegroup/kogito-data-index:latest' --image-runtime string Custom image tag for the s2i build, e.g: quay.io/mynamespace/myimage:latest --image-s2i string Custom image tag for the s2i build to build the application binaries, e.g: quay.io/mynamespace/myimage:latest --incremental-build Build should be incremental? (default true) --infra stringArray Dependent KogitoInfra objects. Can be set more than once. --insecure-image-registry Indicates that the Service image points to insecure image registry --limits strings Resource limits for the pod. Valid values are 'cpu' and 'memory'. For example 'cpu=1'. Can be set more than once. --liveness-initial-delay int32 Number of seconds after the container has started before liveness probes are initiated. Default is 0 --maven-mirror-url string Internal Maven Mirror to be used during source-to-image builds to considerably increase build speed, e.g: https://my.internal.nexus/content/group/public -m, --maven-output If set to true will print the logs for downloading/uploading of maven dependencies. Defaults to false --monitoring-path string HTTP path to scrape for metrics. Default is /metrics (default "/metrics") --monitoring-scheme string HTTP scheme to use for scraping.Default is http (default "http") --native Use native builds? Be aware that native builds takes more time and consume much more resources from the cluster. Defaults to false. Currently only works with s2i (requires [SOURCE] argument). -p, --project string The project name where the service will be deployed --project-artifact-id string Indicates the unique base name of the primary artifact being generated, e.g: 'project' --project-group-id string Indicates the unique identifier of the organization or group that created the project, e.g: 'com.company' --project-version string Indicates the version of the artifact generated by the project, e.g: '1.0-SNAPSHOT' --readiness-initial-delay int32 Number of seconds after the container has started before readiness probes are initiated. Default is 0 --replicas int32 Number of pod replicas that should be deployed. (default 1) --requests strings Resource requests for the pod. Valid values are 'cpu' and 'memory'. For example 'cpu=1'. Can be set more than once. -r, --runtime string The runtime which should be used to build the Service. Valid values are 'quarkus' or 'springboot'. Default to 'quarkus'. (default "quarkus") --secret-build-env stringArray Secret Key/Pair value environment variables that will be set to the service. For example 'MY_VAR=secretName#secretKey'. Can be set more than once. --secret-env stringArray Secret Key/Pair value environment variables that will be set to the service. For example 'MY_VAR=secretName#secretKey'. Can be set more than once. --svc-labels strings Labels that should be applied to the internal endpoint of the Kogito Service. Used by the service discovery engine. Example: 'label=value'. Can be set more than once. --target-runtime string Set this field targeting the desired KogitoService when this KogitoBuild instance has a different name than the KogitoService --web-hook stringArray Secrets for source to image builds based on Git repositories (Remote Sources). For example 'WEB_HOOK_TYPE=WEB_HOOT_SECRET'. Can be set more than once. Global Flags: -o, --output string output format (when defined, 'json' is supported) -v, --verbose verbose output --version display version kogito Operator CRDs not Found in the cluster. Please install operator before using Although it mentions the error, it also displays the whole usage page.
    • ---
    • ---
    • 2020 Week 52-03 (from Dec 21)

      Right now our kogito cli prints the whole usage page with all the options even when the command is correct and something else is wrong. 

      The usage page should only printed when user has made a typo or ran some unknown command.

            vajain Vaibhav Jain
            tarkhand Tarun Khandelwal (Inactive)
            Karel Suta Karel Suta
            Karel Suta Karel Suta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: