Pipekit Docs
Search
⌃K

Pipekit CLI

The Pipekit CLI allows you to interact with Pipekit services without leaving your terminal.

Installation

To install the Pipekit CLI, fetch the precompiled binaries or packages from our releases page, or use the following install instructions, depending on your OS:
MacOS & Linux (Homebrew)
brew install pipekit/tap/cli
Windows (Scoop)
scoop bucket add pipekit https://github.com/pipekit/scoop.git
scoop install pipekit/cli

Log in

Log in before using pipekit CLI to to submit workflows. This is done using your username & password, or using single sign-on (SSO), depending on how your account was created. Running the login command, you're prompted to choose one of the two mentioned methods:
$> pipekit login
? Select a login method: [Use arrows to move, type to filter]
> Login with username and password
Single sign-on (SSO)
After you've successfully logged in, either you provided username & password or you've gone through the SSO pathway, selecting your identity provider and following the redirects through your browser, you should see the following message in your terminal:
successfully logged in, token expires on: 2023-02-23T12:14:52+01:00
Pipekit CLI stores your access token in your home directory, under ~/.pipekit/.

Submitting a workflow

To submit a workflow yaml for execution, use the submit command. Upon submission, Pipekit will run this workflow on the specified cluster, creating a new pipe, if none of the existing pipes have the required name. Pipes can be automatically created when workflow is submitted, in that case, they will be named after the value of argo workflow's generateName property. All future submissions of the workflow with the same generateName will create new runs grouped under the same pipe. To submit a workflow, you need to provide the path to the workflow yaml as an argument, and a list of flags, out of which only cluster-name is required, example:
$> pipekit submit --namespace staging --cluster-name=staging -p param1=value1 -p param2=value2 ./path/to/workflow.yaml
Flag
Shorthand
Type
Description
--namespace
-n
string
name of the namespace to submit the workflow to
--cluster-name
-c
string
name of the cluster to submit the workflow to
--open-ui
bool
open UI for the submitted workflow
--parameter
-p
stringArray (key=value)
pass input parameter(s)
--wait
-w
bool
wait for the submitted workflow to complete

Listing clusters, pipes and runs

Pipekit CLI offers a list command that can be used to fetch and list pipekit entities, such as clusters, pipes and runs.

Listing clusters

$> pipekit list clusters
[CLUSTER NAME] [CLUSTER UUID] [ACTIVE] [REGISTERED]
clusterB 53fe39bc-b163-4d22-8f9e-d9da3dfa0d08 true true

Listing pipes

To list all pipes that have at least one run on a given cluster:
$> pipekit list pipes --cluster-name=clusterB
[PIPE NAME] [PIPE UUID] [ACTIVE]
diamond afba5ea5-34c1-42a3-abc3-af0aa7bd8941 true
Flag
Shorthand
Type
Description
--cluster-name
-c
string
name of the cluster that has pipe runs (required)
--all
-A
bool
get both active and inactive pipes
--active
bool
active/inactive switch (defaults to true)

Listing runs

To list all runs on a given cluster:
$> pipekit list runs --cluster-name=clusterB
NAMESPACE NAME STATUS AGE DURATION PRIORITY MESSAGE UI LINK
default diamond-m91tv RUNNING 2h 2h 0 http://localhost:30000/pipes/afba5ea5-34c1-42a3-abc3-af0aa7bd8941/runs/dabd11d2-730c-4d28-969f-5c6ad9007725
default diamond-89sfy RUNNING 2h 2h 0 http://localhost:30000/pipes/afba5ea5-34c1-42a3-abc3-af0aa7bd8941/runs/c5e36594-d19b-477e-9fb6-9f4aadc6e8bf
Flag
Shorthand
Type
Description
--cluster-name
-c
string
name of the cluster to list from
--all
-A
bool
get all runs, regardless of the status
--statuses
-s
stringArray
get runs with a given status (defaults to running)

Run actions

There are certain actions that can be applied to runs after the workflow is submitted, those are stop, terminate and restart.

Stop and terminate

To stop a running workflow:
$> pipekit stop --run-uuid b6129dbf-30c2-4135-bac5-7347a1928c22
To terminate a running workflow (meaning stop immediately without running exit handlers):
$> pipekit terminate --run-uuid b6129dbf-30c2-4135-bac5-7347a1928c22
Both of these commands have the same flags:
Flag
Shorthand
Type
Description
--run-uuid
-r
string
run UUID of the running workflow you want to stop/terminate (required)

Restart

To restart a run, resubmitting the workflow for execution:
$> pipekit restart --run-uuid b6129dbf-30c2-4135-bac5-7347a1928c22
Flag
Shorthand
Type
Description
--run-uuid
-r
string
run UUID of the run you want to restart (required)
--open-ui
bool
open the UI of the resubmitted workflow
--wait
-w
bool
wait for the workflow to complete

CRON workflows

Pipekit CLI provides create (equivalent to submit for regular workflows), delete, suspend, resume, and update commands for a cron workflow.

Create and update cron

To create a new cron workflow, on a given cluster:
$> pipekit create cron --cluster-name=clusterB ./path/to/workflow.yaml
This will create a new cron workflow, and a pipe based on the cron workflow name (part of the metadata inside yaml). If such pipe already exists, new cron workflow will be associated with it as well. Mind that you will not be able to create two cron workflows with the same name, on the same cluster, in the same namespace, so check the namespace specified in the meta part of your cron workflow yaml.
To update an existing cron workflow, on a given cluster:
$> pipekit update cron --cluster-name=clusterB ./path/to/workflow.yaml
Flag
Shorthand
Type
Description
--cluster-name
-c
string
name of the cluster to create cron workflow on (required)

Delete cron

To delete a cron workflow, from a given cluster, in a given namespace:
$> pipekit delete cron --cluster-name=clusterB --namespace=staging cron-wf-name
Argument passed to this command is the name of the cron workflow (should correspond to the pipe name).
Flag
Shorthand
Type
Description
--cluster-name
-c
string
name of the cluster from which to delete (required)
--namespace
-n
string
namespace in which cron workflow is located

Suspend and resume cron

To suspend a cron workflow, on a given cluster, in a given namespace:
pipekit suspend cron --cluster-name=clusterB --namespace=staging cron-wf-name
To resume a suspended cron workflow, on a given cluster, in a given namespace:
$> pipekit resume cron --cluster-name=clusterB --namespace=staging cron-wf-name
The only argument that these commands accept is the name of the cron workflow to suspend/resume.
Flag
Shorthand
Type
Description
--cluster-name
-c
string
name of the cluster from which to suspend (required)
--namespace
-n
string
namespace in which cron workflow is located

Hera

Users that want to run their Hera workflows (workflows and cron workflows), through Pipekit, just need to update the token for the one provided by Pipekit and point the host to Pipekit's Hera integration API. To get the necessary information use the hera command in the pipekit CLI:
$> pipekit hera
Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
To get the host configuration provide the cluster name:
$> pipekit hera --cluster-name=clusterB
Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Host: https://pipekit.io/api/users/v1/clusters/53fe39bc-b163-4d22-8f9e-d9da3dfa0d08/hera
Flag
Shorthand
Type
Description
--cluster-name
-c
string
name of the cluster hera should connect to

Logs

To observe pod logs directly in pipekit CLI, use the logs command:
$> pipekit logs -r b6129dbf-30c2-4135-bac5-7347a1928c22 -p diamond-18261664 -c main -f
Logs of a given pipe run can be filtered by the pod name and container name.
Flag
Shorthand
Type
Description
--run-uuid
-r
string
UUID of the run (required)
--container
-c
string
name of the container to filter logs by
--pod
-p
string
name of the pod to filter logs by
--follow
-f
bool
follow logs stream until run is finished