Chapter 10. Installing the OpenShift Serverless Logic Knative Workflow plugin
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 using the artifacts image Prerequisites You have installed the Knative ( kn ) CLI. You have installed Podman on your local machine. Procedure Download the Knative Workflow plugin using the logic-kn-workflow-cli-artifacts-rhel8 image by running the following commands: Log in to the Red Hat Registry by running the following command: USD podman login registry.redhat.io You can use your Red Hat Customer Portal account or a registry service account. Set a variable for KN_IMAGE to start the logic-kn-workflow-cli-artifacts-rhel8 image by running the following command: USD export KN_IMAGE=registry.redhat.io/openshift-serverless-1/logic-kn-workflow-cli-artifacts-rhel8:1.33.0 Set a variable for KN_CONTAINER_ID by running the following command: USD export KN_CONTAINER_ID=USD(podman run -di USDKN_IMAGE) Copy the Knative Workflow plugin binary file by running the following command: USD podman cp USDKN_CONTAINER_ID:<path_to_binary> . where <path_to_binary> is the path to the file for your environment: Environment Path 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 Stop the container by running the following command: USD podman stop USDKN_CONTAINER_ID Delete the container by running the following command: USD podman rm USDKN_CONTAINER_ID Extract the selected Knative Workflow plugin binary file by running the following command: USD tar xvzf kn-workflow-linux-amd64.tar.gz Rename the Knative Workflow plugin binary file to kn-workflow by running the following command: USD mv kn kn-workflow Install the kn-workflow command as a plugin of the Knative CLI by running the following commands: 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 : USD cp path/to/downloaded/kn-workflow /usr/local/bin/kn-workflow Make the binary file executable: USD chmod +x /usr/local/bin/kn-workflow Verification Run the following command to verify that the kn-workflow plugin is installed successfully: USD kn plugin list 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.
podman login registry.redhat.io export KN_IMAGE=registry.redhat.io/openshift-serverless-1/logic-kn-workflow-cli-artifacts-rhel8:1.33.0 export KN_CONTAINER_ID=USD(podman run -di USDKN_IMAGE) podman cp USDKN_CONTAINER_ID:<path_to_binary> . podman stop USDKN_CONTAINER_ID podman rm USDKN_CONTAINER_ID tar xvzf kn-workflow-linux-amd64.tar.gz mv kn kn-workflow cp path/to/downloaded/kn-workflow /usr/local/bin/kn-workflow chmod +x /usr/local/bin/kn-workflow kn plugin list kn-workflow 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.