Custom Workflows
Custom workflows allow you to automate complex tasks like streamlining your data ingestion process. The following examples are configurations for a job and a workflow, as well as how to trigger this workflow using a GitHub Action.
Custom Workflow Examples
To handle the ingestion of your data, you can define a custom workflow in Release. Here's an example configuration for a job that ingests data:
jobs:
- name: rag-ingest
from_services: rag-ingest
command:
- python
- release-data-rag-ingest.py
envs:
- key: CHROMA_HOST
value: chroma
- key: CHROMA_PORT
value: 8000
- key: OLLAMA_BASE_URL
value: http://ollama:11434
memory:
limits: 4Gi
requests: 100Mi
cpu:
limits: 2000m
requests: 100mThis configuration defines a job named rag-ingest that runs a Python script to ingest the data. The necessary environment variables, memory, and CPU allocations are also specified to ensure the job runs smoothly.
Define the Workflow in Release
Next, include the workflow definition that leverages the job you've configured:
This workflow specifies that the rag-ingest job should be executed.
Example GitHub Action to Trigger the Workflow
With the Release workflow configured, you can now set up a GitHub Action in your data repository. This action will trigger the Release workflow whenever there's a push to the main branch. Below is a sample GitHub Action configuration:
In this example:
The workflow triggers on any push to the
mainbranch.It uses the
RELEASE_LOGINandRELEASE_TOKENsecrets for authentication.The job runs the Release
release-cliimage in a container in your Release environment.The
release deploys createcommand initiates the custom workflow defined in Release.
Last updated
Was this helpful?