Launch H2O-3
A callable workflow that creates an H2O-3 cluster through AI Engine Manager, then blocks until it is ready. Authenticates with the auto-injected H2O_CLOUD_CLIENT_PLATFORM_TOKEN.
Every input except engine_id is optional and falls back to the selected profile's defaults.
Workflow
id: launch-h2o3
name: Launch H2O-3 Instance
trigger:
callable: true
inputs:
engine_id:
type: string
required: true
description: "Engine ID — used to connect to the engine from subsequent jobs"
display_name:
type: string
required: false
default: ""
description: "Human-readable engine name"
node_count:
type: string
required: false
default: ""
description: "Cluster node count (default from profile)"
cpu:
type: string
required: false
default: ""
description: "CPU units per node (default from profile)"
memory:
type: string
required: false
default: ""
description: "Memory per node, e.g. 8Gi (default from profile)"
max_idle_duration:
type: string
required: false
default: ""
description: "Auto-terminate after idle, e.g. 30m, 2h (default from profile)"
max_running_duration:
type: string
required: false
default: ""
description: "Max running time, e.g. 12h (default from profile)"
version:
type: string
required: false
default: ""
description: "H2O-3 version resource name (default: latest)"
profile:
type: string
required: false
default: ""
description: "H2O-3 profile resource name (default: first available)"
jobs:
launch-h2o3:
name: Launch H2O-3 instance
timeout: "30m"
steps:
- name: Install AIEM client
run: sudo uv pip install --system h2o-engine-manager
- name: Launch H2O-3 engine
env:
ENGINE_ID: ${{ .inputs.engine_id }}
DISPLAY_NAME: ${{ .inputs.display_name }}
NODE_COUNT: ${{ .inputs.node_count }}
CPU: ${{ .inputs.cpu }}
MEMORY: ${{ .inputs.memory }}
MAX_IDLE: ${{ .inputs.max_idle_duration }}
MAX_RUNNING: ${{ .inputs.max_running_duration }}
VERSION: ${{ .inputs.version }}
PROFILE: ${{ .inputs.profile }}
run: |
python3 -c "
import os
import h2o_engine_manager
clients = h2o_engine_manager.login(
platform_token=os.environ['H2O_CLOUD_CLIENT_PLATFORM_TOKEN'],
)
kwargs = {'engine_id': os.environ['ENGINE_ID']}
if os.environ.get('DISPLAY_NAME'):
kwargs['display_name'] = os.environ['DISPLAY_NAME']
if os.environ.get('NODE_COUNT'):
kwargs['node_count'] = int(os.environ['NODE_COUNT'])
if os.environ.get('CPU'):
kwargs['cpu'] = int(os.environ['CPU'])
if os.environ.get('MEMORY'):
kwargs['memory_bytes'] = os.environ['MEMORY']
if os.environ.get('MAX_IDLE'):
kwargs['max_idle_duration'] = os.environ['MAX_IDLE']
if os.environ.get('MAX_RUNNING'):
kwargs['max_running_duration'] = os.environ['MAX_RUNNING']
if os.environ.get('VERSION'):
kwargs['h2o_engine_version'] = os.environ['VERSION']
if os.environ.get('PROFILE'):
kwargs['profile'] = os.environ['PROFILE']
engine = clients.h2o_engine_client.create_engine(**kwargs)
print(f'Engine created: {engine.name}')
print('Waiting for engine to become ready...')
engine.wait()
print(f'Engine is ready')
print(f'Engine URL: {engine.api_url}')
"
Calling it from your workflow
jobs:
start-h2o3:
workflow:
name: launch-h2o3
inputs:
engine_id: "my-h2o3-cluster"
Feedback
- Submit and view feedback for this page
- Send feedback about H2O Workflows to cloud-feedback@h2o.ai