### Supported path prefixes: ## | Prefix | Default path | Details ## | ${DATA_DIR} | ~/.local/share/obelisk | https://docs.rs/directories/5.0.1/directories/struct.ProjectDirs.html#method.data_dir ## | ${CACHE_DIR} | ~/.cache/obelisk | https://docs.rs/directories/5.0.1/directories/struct.ProjectDirs.html#method.cache_dir ## | ${CONFIG_DIR}| ~/.config/obelisk | https://docs.rs/directories/5.0.1/directories/struct.ProjectDirs.html#method.config_dir ## Server configuration api_listening_addr = "127.0.0.1:5005" # Address and port on which the API server will listen. Must match `obelisk_webui` TARGET_URL # sqlite.file = "${DATA_DIR}/obelisk.sqlite" # Path to sqlite database. Supports path prefixes. # oci.wasm_directory = "${CACHE_DIR}/wasm" # Path to directory where wasm files downloaded from an OCI registry are stored. Supports path prefixes. ## Comment out the `codegen_cache` table to disable the codegen cache. [codegen_cache] # directory = "${CACHE_DIR}/codegen" # Path to directory where generated code is cached. Supports path prefixes. ### WASM Component configuration ## Common settings for all components # name = "name" # Each component must be named. ## Location can be a file path or an OCI registry reference. # location.path = "path/to/wasm" # location.oci = "docker.io/repo/image:tag" # content_digest = "sha256:AA.." # Optional. If specified, the WASM file must have a matching hash. ## Common executor settings # exec.batch_size = 5 # Number of executions to lock for every event loop tick. # exec.lock_expiry.secs = 1 # Each execution is locked for 1s by default. # exec.tick_sleep.millis = 200 # Sleep between event loop ticks. # exec.max_inflight_instances = "unlimited" # If set to an integer, limits the number of inflight instances. ### WASM Activity components configuration # [[activity_wasm]] ## Common settings for all components - see above. ## Common executor settings - see above. ## Specific settings for activity_wasm: ## Retry customization: All activities are retried on trap (panic) and timeouts until `max_retries` condition is met. # max_retries = 5 # retry_exp_backoff.millis = 100 # First retry is scheduled after 100ms after the failure, the next one after 200ms, then after 400ms... # retry_on_err = true # When a function with a return type `result` returns the `Err` variant, attept to retry the execution. ## Guest std stream forwarding to host: one of "stdout","stderr","none". Default is "none". # forward_stdout="stderr" # forwards stdout to host's stderr # forward_stderr="stderr" # forwards stderr to host's stderr ## Environment variables: Set to a specific value or forward from the host. Default is empty. # env_vars = ["ENV1", "ENV2=somevalue"] ### Workflow components configuration # [[workflow]] ## Common settings for all components - see above. ## Common executor settings - see above. ## Retry customization: All workflows are retried on trap (panic) and timeouts forever. Therefore, `retry_exp_backoff` must not be zero. # retry_exp_backoff.millis = 100 # First retry is scheduled after 100ms after the failure, the next one after 200ms, then after 400ms... ## Joining strategy: When workflow requests a child execution result, it can either be interrupted, or kept in the memory. ## When "interrupt" is selected, after every child execution result the whole event history must be replayed. # join_next_blocking_strategy = "await" # Default strategy is "await" # non_blocking_event_batching = 100 # Number of non-blocking events that can be cached and written in a batch. # retry_on_trap = false # If set to true, traps(panics) will be handled as intermittent failures and retried until the problem goes away. ### Webhook section # [[http_server]] # name = "external" # listening_addr = "0.0.0.0:8080" # request_timeout.secs = 1 # max_inflight_requests = "unlimited" # If set to an integer, limits the number of inflight requests # # [[webhook_component]] ## Common settings for all components - see above. # http_server = "external" # link to a `http_server`'s name ### Routes section ## An array of routes that will be matched against incoming requests. ## Only the path portion of a URL is taken into cosideration, the query part ## ("?a=b") is ignored by the matcher. ## Syntax of a route: ## "/path" # All methods are matched, URL path must be exactly '/path'. ## { methods = ["GET"], route = "/some/path" } # Method must be GET and path '/some/path'. ## "/status/:param1/:param2" # When URL matches, `param1` and `param2` values will be exposed as env vars. ## "" # Fallback pattern. ## For details about the matching engine please see https://docs.rs/route-recognizer/latest/route_recognizer/ # routes = [{ methods = [ "GET" ], route = "/some"}, "/other"] ## Guest std stream forwarding to host: one of "stdout","stderr","none". Default is "none". # forward_stdout="stderr" # forwards stdout to host's stderr # forward_stderr="stderr" # forwards stderr to host's stderr ## Environment variables: Set to a specific value or forward from the host. Default is empty. # env_vars = ["ENV1", "ENV2=somevalue"] [[http_server]] name = "webui" listening_addr = "127.0.0.1:8080" [[webhook_component]] name = "obelisk_webui" http_server = "webui" location.oci = "docker.io/getobelisk/webui:2024-11-09@sha256:ece558114c49dcf7ffbf8f81f8c5e4b48f5b73c683f0ac6c07ded9050ab6b95c" routes = [{ route = "" }] forward_stdout = "stderr" forward_stderr = "stderr" env_vars = [ "TARGET_URL=http://127.0.0.1:5005", ] # Must match `api_listening_addr` [[http_server]] name = "external_webhook" listening_addr = "127.0.0.1:9090" [[activity_wasm]] name = "fibo_activity" location.oci = "docker.io/getobelisk/example_activity_fibo:2024-10-15@sha256:22ecc9d23282305c0f1bdd10fb157733f7aaf06d321993554842060e573d1fa7" max_retries = 0 [[workflow]] name = "fibo_workflow" location.oci = "docker.io/getobelisk/example_workflow_fibo:2024-10-18-2@sha256:9ea595f470bebbc88ebeee69a4e02383331c2f16ffc45dd83c0e5d1f7dd7236a" exec.lock_expiry.secs = 2 [[webhook_component]] name = "webhook_fibo" location.oci = "docker.io/getobelisk/example_webhook_fibo:2024-10-18-2@sha256:9933abb506fa6cc9e33b9e46eee3fc193933ce4910ee6b720593546007ecc981" http_server = "external_webhook" routes = [{ methods = ["GET"], route = "/fibo/:N/:ITERATIONS" }] [[activity_wasm]] name = "http_get_activity" location.oci = "docker.io/getobelisk/example_activity_http_get:2024-10-15@sha256:620aeb424f507c227b1b9927b5f5048c28afc0044e04d9362b4599e23ef25f9c" forward_stdout = "stderr" forward_stderr = "stderr" [[workflow]] name = "http_get_workflow" location.oci = "docker.io/getobelisk/example_workflow_http_get:2024-10-18-2@sha256:fe49c164b3a843aa63286c3b83ba9254a52b70a5197d68a895316d426da7a61e" [[activity_wasm]] name = "sleep_activity" location.oci = "docker.io/getobelisk/example_activity_sleep:2024-10-15@sha256:33bcd638ec60951d144c977679f23cb4b389278a6ba92b0ef82a4679834cfd55" exec.lock_expiry.secs = 10 [[workflow]] name = "sleep_workflow" location.oci = "docker.io/getobelisk/example_workflow_sleep:2024-10-18-2@sha256:1e8df12a9bb50bc9f9f538858afcd481e21e80e60996df826d562fde559a4c47" ## Send spans via gRPC to an OTLP collector. # [otlp] # Uncomment the table and run `docker run --rm -it -p 4317:4317 -p 16686:16686 jaegertracing/all-in-one:1.60` to start collecting traces. ## Defaults: # level = "info,app=debug" # service_name = "obelisk-server" # otlp_endpoint = "http://localhost:4317" # Stdout configuration, by default logs INFO and above. # Comment the table to disable stdout logging. [log.stdout] ## Defaults: # level = "info,app=debug" # style = "plain_compact" # One of "plain","plain_compact","json" # span = "none" # One of "none","new","enter","exit","close","active","full" # target = false ## Sample (rolling) file configuration # [log.file] # level = "info,obeli=debug,app=trace" # style = "json" # span = "close" # target = true # rotation = "daily" # directory = "." # prefix = "obelisk_server_daily"