For developers who want to try out OSMO or test out their changes, this guide will demonstrate how to run OSMO using Bazel:
Install the required tools for developing OSMO.
Set the following environment variables:
export HOST_IP=$(ifconfig | grep "inet " | grep -Fv 127.0.0.1 | grep 10. | awk '{print $2}' | head -1)Bazel mode runs OSMO services directly as local processes using bazel, providing faster iteration for development.
bazel run @osmo_workspace//run:start_service -- --mode bazelThis command:
- Creates postgres, redis, and localstack-s3 docker containers if they do not exist
- Starts core OSMO services (osmo, router) using bazel and the UI using pnpm (from
src/ui/)
After OSMO services are started, start the backend:
bazel run @osmo_workspace//run:start_backend -- --mode bazelThis command:
- Checks for a KIND backend cluster that can be used for compute
- If one is not accessible, a new KIND cluster is created for compute
- Starts backend operators (listener, worker) using bazel
bazel run @osmo_workspace//run:update_configs -- --mode bazelThis command:
- Updates workflow configuration with local development settings
- Configures object storage endpoints and credentials
- Sets up backend image configurations
- Sets the default pool for the user profile
The OSMO UI and APIs can be accessed at: http://$HOST_IP:8080
Log into OSMO using the CLI:
bazel run @osmo_workspace//src/cli -- login http://$HOST_IP:8000 --method=dev --username=testuserTest your setup with hellow_world.yaml:
bazel run @osmo_workspace//src/cli -- workflow submit ~/path/to/osmo/cookbook/tutorials/hello_world.yamlThe workflow should successfully submit and run to a "completed" state.