Hello, World
The Fuzzfile below specifies a simple “Hello, world” workflow that uses a public Alpine container from Dockerhub to prints the host where the job is located. This simple workflow will help familiarize you with the Fuzzball GUI and CLI.
version: v1
jobs:
hello-world:
image:
uri: docker://alpine:latest
command: ['/bin/sh', '-c', 'echo "Hello, world! Hostname ${HOSTNAME}"']
resource:
cpu:
cores: 1
affinity: NUMA
memory:
size: 1GB
This workflow can be run through the GUI or the CLI.
If you click “Workflow Editor” and “Create New”, you will see a blank page in the workflow editor.
Now you can either click the ellipses (...
) menu in the lower right and select “Edit YAML” or
simply press e
on your keyboard. An editor with a Fuzzfile stub will appear.
You can delete the current contents and copy and paste the workflow definition of from above.
Now pressing “save” will return you to the interactive workflow editor. You will now see the hello-world job instead of a blank editor page. The Fuzzball GUI will automatically validate the yaml file for syntax errors.
Submitting your workflow to Fuzzball with the GUI is easy. Simply press the triangular “Start Workflow” button in the lower right corner of the workflow editor. You will be prompted to provide an optional descriptive name for your workflow.
Now you can click on “Start Workflow” in the lower right corner of the dialog box and your workflow will be submitted. If you click “Go to Status” you can view the workflow status page. The screenshot below shows the status page for a hello world workflow submission.
To retrieve logs produced by this workflow, select the hello-world
job within the workflow, and
click the “Logs” option on the right.
To run this workflow through the CLI you will need access to the Fuzzball CLI. You can install it using the Fuzzball CLI installation instructions.
First, you can create a Fuzzfile hello-world.fz
with the contents above using the text
editor of your choice.
You can start start this workflow using the CLI by running the following command:
$ fuzzball workflow start hello-world.fz
Workflow "065e8665-f025-4247-8783-d4abdb7723be" started.
You can monitor the workflow’s status by running the following command:
$ fuzzball workflow describe 065e8665-f025-4247-8783-d4abdb7723be
Name: hello-world.yaml
Email: bphan@ciq.co
UserId: e554e134-bd2d-455b-896e-bc24d8d9f81e
Status: STAGE_STATUS_FINISHED
Created: 2024-06-14 04:11:03PM
Started: 2024-06-14 04:11:03PM
Finished: 2024-06-14 04:11:43PM
Error:
Stages:
KIND | STATUS | NAME | STARTED | FINISHED
Workflow | Finished | 065e8665-f025-4247-8783-d4abdb7723be | 2024-06-14 04:11:03PM | 2024-06-14 04:11:43PM
Image | Finished | docker://docker.io/library/alpine:latest | 2024-06-14 04:11:04PM | 2024-06-14 04:11:22PM
Job | Finished | hello-world | 2024-06-14 04:11:40PM | 2024-06-14 04:11:42PM
You can view outputs logged by the workflow, by executing the following command:
$ fuzzball workflow log 065e8665-f025-4247-8783-d4abdb7723be hello-world
Hello, world! Hostname hello-world