Welcome to the new DOCS.vastdata.com. We've added new menus and a version selector, plus new persona and resource pages to help customers get started. Looking for a previous article? Use the docs search.

Run a “Hello World” Pipeline

Prev Next

ℹ️ Info

Outcome: A scheduled pipeline runs a containerized function that returns “Hello World.”

Before you begin: Install and configure the vastde CLI, Docker, and access to the lab container registry.

Previous: Install the VAST DataEngine CLI Tools

📝 Note

You will need docker or docker desktop to build functions. Please see Install the VAST DataEngine CLI Tools for additional setup instructions once Docker is installed.

Hello World Function

In this exercise, you'll create a simple function that returns "Hello World" and deploy it with a scheduled trigger.

Step 1: Initialize the Function

 vastde functions init python-pip hello-world -t ~/test/functions/

Example Output

Creating pip scaffold for function: hello-world
Target folder: /Users/<username>/test/functions/
Handlers file: main.py
Python pip scaffold created successfully in /Users/<username>/test/functions/hello-world
Navigate to /Users/<username>/test/functions/hello-world and start implementing your function

The vast functions init command creates a scaffold, verify with tree or ls:

 tree ~/test/functions/hello-world/

Example Output

/Users/<username>/test/functions/hello-world
├── Aptfile
├── customDeps
├── main.py
├── README.md
└── requirements.txt

1 directory, 5 files

Step 2: Implement the Function

Open ~/test/functions/hello-world/main.py. Replace the scaffold handler with the reference implementation below, or use your own implementation.

import os

def init(ctx):
    # One time initialization comes here
    ctx.logger.info("Initialized...")

    # Log environment variables
    ctx.logger.info(f"MY_ENVVAR={os.environ.get('MY_ENVVAR')}")
    ctx.logger.info(f"MY_ENVVAR2={os.environ.get('MY_ENVVAR2')}")

def handler(ctx, event):
    # Events Processing comes here
    ctx.logger.info(f"Handler {event}")
    return "Hello World"

Note: The scaffold includes a basic structure, but you need to add environment-variable logging and a return statement. Feel free to modify this code or write your own implementation!

Step 3: Configure Environment Variables

Create: vi ~/test/functions/hello-world/config.yaml to set environment variables. You can set it to whatever you like; it's just to familiarize you with the concepts.

envs:
  MY_ENVVAR: "something"
  MY_ENVVAR2: "something2"

Step 4: Build the Function

vastde functions build -T latest hello-world -t ~/test/functions/hello-world

Note: This process can take a few minutes. If it does not finish within five minutes, inspect ~/test/functions/hello-world/build.log. An x509 error means the build host does not trust the registry certificate; repeat the trust steps in the Podman registry guide.

Example Output

Building hello-world:latest
App Path: /Users/<username>/test/functions/hello-world
Handlers File: main.py
Build log: /Users/<username>/test/functions/hello-world/build.log
2026/09/01 11:03:02 [Started] Python Builder: hello-world:latest
2026/09/01 11:03:53 [Completed] Python Builder: hello-world:latest
Build completed: hello-world:latest
Build log saved to: /Users/<username>/test/functions/hello-world/build.log

Note: After running vast functions build , it is common for your terminal cursor to become invisible. To resolve this, simply type the reset command.

You should now be able to see your built docker image locally:

docker images|grep hello

Example Output

hello-world                       latest    03c47e8b9bc4   46 years ago    1.1GB

(You  may see it appear twice because the latest tag is auto-created)

Step 5: Deploy to Container Registry

Logging into a Docker Repository

ℹ️ Info

If your docker uses credentials add them prior to attempting to push.

echo 'admin' | docker login 10.144.19.8:5000 \
  --username admin \
  --password-stdin

Tag the image and push it to the repository

# Tag the image 
docker tag hello-world:latest 10.144.19.8:5000/de-lab-test/hello-world:latest

# Push to registry
docker push 10.144.19.8:5000/de-lab-test/hello-world:latest

Example Output

The push refers to repository [10.144.19.8:5000/de-lab-test/hello-world]
83d85471d9f8: Pushed
8683796bc75b: Pushed
5fc621594494: Pushed
d6c1f1d9e5a0: Pushed
89bac1eee386: Pushed
1c8f9d3a9f43: Pushed
6a342b085a63: Pushed
92d4ebf08999: Pushed
e107f7cbb554: Pushed
f16a7947a76a: Pushed
f78205e678ea: Pushed
2982d6a1cbaa: Pushed
017953d434bf: Pushed
270a1170e7e3: Pushed
latest: digest: sha256:1a9829aa43d6a7f0a038ad4777442c60a873a37d2c22563e4ab226ddd4d8b617 size: 3243

⚠️ Warning

If the push fails due to an x509 error, you must trust the registry on your build host
Create a Podman Registry for the RKE2 Cluster

Step 6: Create the Function Configuration

Once all the pieces are in place, create the function configuration on the VAST cluster. For this test, use the VAST DataEngine UI.

  1. Log in to the VAST DataEngine UI: (for example: https://10.143.12.205/#/login/de-lab-tenant)

  2. Navigate to the Functions Page

    image-20260901-151709.png

  3. Choose “Create New Function”

    image-20260901-151805.png

  4. Fill out the form:

  • Function Name : de-test-function

  • Revision Alias : latest

  • Artifact Source : de-lab-test/hello-world

  • Image Tag : latest

image-20260901-152204.png

Once you click “Create Function” you will return to the “Manage Elements” window and see your function on the “Functions” tab.

You can return to your terminal, where you should now be able to see your function listed by running:

vastde functions list

Example Output

Function Name              Description                          Guid                                    Updated at
---------------------------------------------------------------------------------------------------------------------------
de-test-function                                                8e15fa07-cebf-422d-be74-9f04215ccdf0    2026-09-01 15:23

Step 7: Create a Schedule Trigger Configuration (runs every 1min, quartz cron syntax)

  1. Go back into the UI and navigate to Triggers

    image-20260901-152808.png

  2. Choose “Create New Trigger”

    image-20260901-152925.png

  3. Fill out the form: REPLACE all instances of "USER" with your AD Username If you have a "dot" (.) in your username, replace it with a hyphen (-)

  • Trigger Name : de-test-trigger

  • Trigger Type: Choose Schedule

  • Target Event Broker View: de-lab-broker (Internal)

  • Topic: Choose de-default-topic

  • Schedule: Choose 1 minutes

  • click “Create Trigger”

image-20260901-153641.png

You can list your triggers with:

vastde triggers list

Example Output

Trigger Name               Status        Type        Description                     GUID                                    Updated at
---------------------------------------------------------------------------------------------------------------------------------------------
de-test-trigger            Ready         Schedule                                    edee47a2-e959-4fff-83aa-1bfeb6d1f8e4    2026-09-01 15:37

Note: You can specify --output json or --output yaml if you want to see the full details and avoid truncating any field names.

vastde_544_6 triggers list --output json

Example Output

[
  {
    "broker": {
      "name": "de-lab-broker",
      "type": "Internal"
    },
    "config": {
      "cron_schedule": "0 * * ? * * *"
    },
    "created_at": "2026-09-01T15:37:00.996Z",
    "description": "",
    "guid": "edee47a2-e959-4fff-83aa-1bfeb6d1f8e4",
    "id": 7500577462271606784,
    "name": "de-test-trigger",
    "owner": {
      "id": "115",
      "id_type": "vid",
      "name": "de-lab-user"
    },
    "status": "Ready",
    "tenant_guid": "e4a5f854-ab5c-408f-b150-ae43eb5aabcc",
    "topic": "vast:dataengine:topics:de-lab-broker/de-default-topic",
    "topic_name": "de-default-topic",
    "type": "Schedule",
    "updated_at": "2026-09-01T15:37:00.996Z",
    "vrn": "vast:dataengine:triggers:de-test-trigger"
  }
]

Step 8: Create the Pipeline Configuration

As before, you'll keep using the GUI.

  1. Navigate to the Pipeline Management page:

    image-20260901-154247.png

  2. Choose “Create New Pipeline”

    image-20260901-154347.png

  3. Fill out the form. We don't need everything here, just:

    • Pipeline Name: de-test-pipeline

    • Kubernetes Cluster: de-lab-rke2

    • Namespace: choose vast-pipelines

      image-20260901-154826.png

  4. (Optional) : Set up environment variables

    image-20260901-155016.png

  5. Click Create Pipeline

  6. Now you're taken to the builder canvas

    image-20260901-155133.png

Drag the trigger onto the canvas, then drag the function onto the canvas. Draw a line from the trigger to the function.

image-20260901-155225.png

Now you can click Save Draft

Back in the terminal, you can list your pipelines with

vastde pipelines list

Example Output

Pipeline Name              Status        Description                          Guid                                    Updated at
-----------------------------------------------------------------------------------------------------------------------------------------
de-test-pipeline           Draft                                              8815f9ff-d42f-4e64-957e-32fea35e1af8    2026-09-01 15:52

Notice it's in Draft status. In order for it to run, deploy it by using its name:

vastde pipelines deploy de-test-pipeline

After 30-60 seconds, it should transition status; verify with:

vastde pipelines list

Example Output

Pipeline Name              Status        Description                          Guid                                    Updated at
-----------------------------------------------------------------------------------------------------------------------------------------
de-test-pipeline           Ready                                              847cf20f-a33b-40f7-a8b4-10b1cb242ff5    2026-09-01 17:12

Note that you could have clicked Deploy straight from the UI, but this lets you mix and match.

Congratulations!  VAST DataEngine is up and running!