How to Configure Pharia Kernel Namespaces
Deploying Skills
Pharia Kernel wants to enable teams outside of the Pharia Kernel Operators to deploy Skills in self service. To achieve this, Skills are organized into namespaces. The Pharia Kernel Operators maintain the list of namespaces and associate each one with a configuration file, which in turn is owned by a team.
Each namespace configuration typically would reside in a Git repository owned by the Team which owns the namespace. Changes in this file will be automatically detected by the Kernel.
A namespace is also associated with a registry to load the Skills from. These Skill registries can either be directories in filesystem (mostly used for a development setup) or point to an OCI registry (recommended for production).
Namespace With Local Config and Local Registry
# `my-team` is the name of this namespace
[namespaces.my-team]
# Path to the local namespace configuration file
config-url = "file://namespace.toml"
# Path to the local skill directory
path = "skills"
With the local configuration above, Pharia Kernel will serve any skill deployed at the skills
subdirectory of its working directory under the namespace my-team
. This is mostly intended for local development of Skills without a remote instance of Pharia Kernel. To deploy Skills in production it is recommended to use a remote namespace.
Namespace With Remote Config and Remote Registry
# `my-team` is the name of this namespace
[namespaces.my-team]
# The URL to the configuration listing the Skills of this namespace
# Pharia kernel will use the contents of the `NAMESPACES__MY_TEAM__CONFIG_ACCESS_TOKEN` environment variable to access (authorize) the config
config-url = "https://github.com/Aleph-Alpha/my-team/blob/main/config.toml"
# OCI Registry to load Skills from
# Pharia kernel will use the contents of the `NAMESPACES__MY_TEAM__REGISTRY_USER` and `NAMESPACES__MY_TEAM__REGISTRY_PASSWORD` environment variables to access (authorize) the registry
registry = "registry.acme.com"
# This is the common prefix added to the skill name when composing the OCI repository.
# e.g. ${base-repository}/${skill_name}
base-repository = "my-org/my-team/skills"
With the remote configuration above, Pharia Kernel will serve any skill deployed on the specified OCI registry under the namespace my-team
.
Authentication Against OCI Registries
You can provide each namespace in Pharia Kernel with credentials to authenticate against the specified OCI registry. Set the environment variables that are expected from the operator config:
NAMESPACES__MY_TEAM__REGISTRY_USER=Joe.Plumber
NAMESPACES__MY_TEAM__REGISTRY_PASSWORD=****
Update Interval
The environment variable NAMESPACE_UPDATE_INTERVAL
controls how much time the kernel waits between checking for changes in namespace configurations. The default is 10 seconds.
NAMESPACE_UPDATE_INTERVAL=10s
Logging
By default, only logs of ERROR
level are output. You can change this by setting the LOG_LEVEL
environment variable to one of trace
, debug
, info
, warn
, or error
(default).
LOG_LEVEL=info
Observability
Pharia Kernel can be configured to use an OpenTelemetry Collector endpoint by setting the OTEL_ENDPOINT
environment variable.
OTEL_ENDPOINT=http://127.0.0.1:4317