Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 10. Installing the OpenShift Serverless Logic Knative Workflow plugin


OpenShift Serverless Logic provides a plugin named kn-workflow for the Knative CLI, enabling you to set up a local workflow project using the command line.

10.1. Installing the OpenShift Serverless Logic Knative Workflow plugin for Linux

If you are using a Linux distribution that does not have RPM or another package manager installed, you can install the Knative Workflow plugin.

Prerequisites

  • You have installed the Knative (kn) command-line interface (CLI).
  • If you are not using RHEL or Fedora, ensure that the libc library is installed in a directory on your path.

    Important

    If the libc library is not available, you might see the following error when you run commands:

    $ kn: No such file or directory

Procedure

  1. Download the latest tar archive suitable for your environment, from the Serverless Logic download mirror page.
  2. Extract the Knative Workflow plugin binary file by running the following command:

    $ tar xvzf <tar_archive>
  3. Rename the extracted Knative Workflow plugin binary file to kn-workflow by running the following command:

    $ mv <filename> kn-workflow
  4. Install the kn-workflow command as the Knative CLI plugin:

    1. Make the binary file executable by running the following command:

      $ chmod +x /usr/local/bin/kn-workflow
    2. Copy the kn-workflow binary file to a directory in the /usr/local/bin path by running the following command:

      $ cp <path/to/downloaded/kn-workflow> /usr/local/bin/kn-workflow

Verification

  • Run the following command to verify that the kn-workflow plugin is installed successfully:

    $ kn plugin list

10.2. Installing the OpenShift Serverless Logic Knative Workflow plugin for macOS

If you are using macOS, you can install the Knative Workflow plugin as a binary file.

Important

On macOS, some systems might block the application from running due to security policies. To fix this issue, click System Preferences Security & Privacy General to approve the application to run. For more information, see the Open a Mac app from an unidentified developer Apple support article.

Prerequisites

  • You have installed the Knative (kn) command-line interface (CLI).

Procedure

  1. Download the latest tar archive suitable for your environment, from the Serverless Logic download mirror page.
  2. Extract the Knative Workflow plugin binary file by running the following command:

    $ tar xvzf <tar_archive>
  3. Rename the extracted Knative Workflow plugin binary file to kn-workflow by running the following command:

    $ mv <filename> kn-workflow
  4. Install the kn-workflow command as the Knative CLI plugin:

    1. Make the binary file executable by running the following command:

      $ chmod +x /usr/local/bin/kn-workflow
    2. Copy the kn-workflow binary file to a directory in the /usr/local/bin path by running the following command:

      $ cp <path/to/downloaded/kn-workflow> /usr/local/bin/kn-workflow

Verification

  • Run the following command to verify that the kn-workflow plugin is installed successfully:

    $ kn plugin list

10.3. Installing the OpenShift Serverless Logic Knative Workflow plugin for Windows

If you are using Windows, you can install the Knative Workflow plugin.

Prerequisites

  • You have installed the Knative (kn) command-line interface (CLI).

Procedure

  1. Download the latest zip archive suitable for your environment, from the Serverless Logic download mirror page.
  2. Extract the Knative Workflow plugin binary file using PowerShell by running the following command:

    $ Expand-Archive -Path <filename>.zip -DestinationPath <destination>
  3. Rename the extracted Knative Workflow plugin binary file to kn-workflow by running the following command:

    $ Rename-Item -Path <destination>\<filename>.exe -NewName kn-workflow.exe
  4. Install the kn-workflow command as the Knative CLI plugin:

    On Windows, files with a .exe extension are treated as executable by default, so you do not need to change permissions.

    1. Move the kn-workflow.exe file to a directory in your PATH by running the following command:

      $ move C:\path\to\kn-workflow.exe "C:\Program Files"
    2. Copy the kn-workflow binary file to a directory in your PATH by running the following command:

      $ Copy-Item -Path <destination>\kn-workflow.exe -Destination "C:\Program Files\kn-workflow.exe"

Verification

  • Run the following command to verify that the kn-workflow plugin is installed successfully:

    $ kn plugin list

10.4. Installing the OpenShift Serverless Logic Knative Workflow plugin using the artifacts image

Prerequisites

  • You have installed the Knative (kn) CLI.
  • You have installed Podman on your local machine.

Procedure

  1. Download the Knative Workflow plugin using the logic-kn-workflow-cli-artifacts-rhel8 image by running the following commands:

    1. Log in to the Red Hat Registry by running the following command:

      $ podman login registry.redhat.io

      You can use your Red Hat Customer Portal account or a registry service account.

    2. Set a variable for KN_IMAGE to start the logic-kn-workflow-cli-artifacts-rhel8 image by running the following command:

      $ export KN_IMAGE=registry.redhat.io/openshift-serverless-1/logic-kn-workflow-cli-artifacts-rhel8:1.33.0
    3. Set a variable for KN_CONTAINER_ID by running the following command:

      $ export KN_CONTAINER_ID=$(podman run -di $KN_IMAGE)
    4. Copy the Knative Workflow plugin binary file by running the following command:

      $ podman cp $KN_CONTAINER_ID:<path_to_binary> .

      where <path_to_binary> is the path to the file for your environment:

      EnvironmentPath to binary file

      Linux amd64 architecture

      /usr/share/kn/linux_amd64/kn-workflow-linux-amd64.tar.gz

      Linux arm64 architecture

      /usr/share/kn/linux_arm64/kn-workflow-linux-arm64.tar.gz

      macOS amd64 architecture

      /usr/share/kn/macos_amd64/kn-workflow-macos-amd64.tar.gz

      macOS arm64 architecture

      /usr/share/kn/macos_arm64/kn-workflow-macos-arm64.tar.gz

      Windows amd64 architecture

      /usr/share/kn/windows/kn-workflow-windows-amd64.zip

    5. Stop the container by running the following command:

      $ podman stop $KN_CONTAINER_ID
    6. Delete the container by running the following command:

      $ podman rm $KN_CONTAINER_ID
    7. Extract the selected Knative Workflow plugin binary file by running the following command:

      $ tar xvzf kn-workflow-linux-amd64.tar.gz
    8. Rename the Knative Workflow plugin binary file to kn-workflow by running the following command:

      $ mv kn kn-workflow
  2. Install the kn-workflow command as a plugin of the Knative CLI by running the following commands:

    1. Copy the kn-workflow binary file to a directory in your PATH, such as /usr/local/bin, and ensure the file name is kn-workflow:

      $ cp path/to/downloaded/kn-workflow /usr/local/bin/kn-workflow
    2. Make the binary file executable:

      $ chmod +x /usr/local/bin/kn-workflow

Verification

  1. Run the following command to verify that the kn-workflow plugin is installed successfully:

    $ kn plugin list
  2. After installing the plugin, you can use kn-workflow to run the related subcommands.

    Aliases to use workflow subcommand

    kn-workflow

    Example output of kn-workflow help command

    Manage OpenShift Serverless Logic Workflow projects
    
    Usage:
      kn workflow [command]
    
    Aliases:
      kn workflow, kn-workflow
    
    Available Commands:
      completion  Generate the autocompletion script for the specified shell
      create      Creates a new OpenShift Serverless Logic Workflow project
      deploy      Deploy an OpenShift Serverless Logic Workflow project on Kubernetes via SonataFlow Operator
      help        Help about any command
      quarkus     Manage OpenShift Serverless Logic Workflow projects built in Quarkus
      run         Run an OpenShift Serverless Logic Workflow project in development mode
      undeploy    Undeploy an OpenShift Serverless Logic Workflow project on Kubernetes via SonataFlow Operator
      version     Show the version
    
    Flags:
      -h, --help      help for kn
      -v, --version   version for kn
    
    Use "kn [command] --help" for more information about a command.

Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.