Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d3b9def
test: deserialize registry from environment
moldhouse Dec 19, 2024
1d5c8d6
test: deserialize nested registry
moldhouse Dec 19, 2024
0da06ac
test: deserialize namespace config
moldhouse Dec 19, 2024
a0f2ead
test: deserialize operator config from environment
moldhouse Dec 19, 2024
8a1c9a8
test: use double underscore as separator
moldhouse Dec 19, 2024
7f8b0da
test: load config from two sources
jhl-aa Dec 19, 2024
9fcd690
chore: cleanups
benbrandt Dec 20, 2024
a84385c
test: load two namespaces from independent sources
jhl-aa Dec 21, 2024
6fa7739
feat: support configuring namespaces via environment variables
jhl-aa Dec 21, 2024
24fdae1
feat!: update fields for credentials to take values directly
jhl-aa Dec 23, 2024
13e983a
refactor: move open telemetry endpoint config next to log level config
jhl-aa Dec 23, 2024
226ab4c
feat!: support each namespace config fields to be provided as value o…
jhl-aa Dec 23, 2024
1bced36
refactor: consolidate impl blocks for OciRegistry
jhl-aa Dec 23, 2024
9fb70a0
refactor: rename from_sources method
jhl-aa Dec 23, 2024
1bb1332
feat!: rename registry name field as `name`
jhl-aa Dec 23, 2024
576f41b
test: convert map keys to kebab-case
jhl-aa Dec 23, 2024
235ae45
feat: support kebab-case and snake_case for fields in namespace config
jhl-aa Dec 23, 2024
35c9ee9
ci: update environment variables for namespace config
jhl-aa Dec 24, 2024
4c080a9
docs: environment config source
jhl-aa Dec 24, 2024
f350af7
docs: remove outdated comment
jhl-aa Dec 24, 2024
07ed30b
feat: handle base repository with leading/trailing slashes or empty c…
jhl-aa Jan 2, 2025
b965498
docs: update to new namespace config definition
jhl-aa Jan 2, 2025
2bb5c9e
feat!: expect operator config variables in kebab-case
moldhouse Jan 2, 2025
995317f
feat: use untagged enum for registry
moldhouse Jan 2, 2025
2e30377
feat!: flatten repository in operator config
moldhouse Jan 2, 2025
d475a3d
feat: prioritize oci registry over file registry
moldhouse Jan 2, 2025
969dc04
feat: convert namespace name to kebab-case
jhl-aa Jan 2, 2025
0317159
feat: update "assistant" namespace definition to use latest env var
jhl-aa Jan 2, 2025
0812b28
feat: remove fallback to "dev" namespace for operator-config.toml
jhl-aa Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ PHARIA_KERNEL_METRICS_ADDRESS=127.0.0.1:9000
# You can retrieve a Pharia AI Token from Pharia Studio
PHARIA_AI_TOKEN=
# User name may be anything, in case you are using a token as password
SKILL_REGISTRY_USER=
# Skill registry token needs to have read and write access. Some tests push stuff to teh registry
SKILL_REGISTRY_PASSWORD=
SKILL_REGISTRY=registry.gitlab.aleph-alpha.de
SKILL_REPOSITORY=engineering/pharia-skills/skills
NAMESPACES__PHARIA_KERNEL_TEAM__REGISTRY_USER=
# Skill registry token needs to have read and write access. Some tests push stuff to the registry
NAMESPACES__PHARIA_KERNEL_TEAM__REGISTRY_PASSWORD=
NAMESPACES__PHARIA_KERNEL_TEAM__REGISTRY=registry.gitlab.aleph-alpha.de
NAMESPACES__PHARIA_KERNEL_TEAM__BASE_REPOSITORY=engineering/pharia-skills/skills
LOG_LEVEL=info
# Best use your personal Gitlab token
GITLAB_CONFIG_ACCESS_TOKEN=
NAMESPACES__PHARIA_KERNEL_TEAM__CONFIG_ACCESS_TOKEN=
OPEN_TELEMETRY_ENDPOINT=http://127.0.0.1:4317
AA_INFERENCE_ADDRESS=https://inference-api.product.pharia.com
DOCUMENT_INDEX_ADDRESS=https://document-index.product.pharia.com
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
- name: Run cargo test
run: cargo test --workspace --all-features
env:
SKILL_REGISTRY: ghcr.io
SKILL_REPOSITORY: aleph-alpha/pharia-kernel
SKILL_REGISTRY_USER: ${{ github.actor }}
SKILL_REGISTRY_PASSWORD: ${{ secrets.SKILL_REGISTRY_PASSWORD }}
NAMESPACES__PHARIA_KERNEL_TEAM__REGISTRY: ghcr.io
NAMESPACES__PHARIA_KERNEL_TEAM__BASE_REPOSITORY: aleph-alpha/pharia-kernel
NAMESPACES__PHARIA_KERNEL_TEAM__REGISTRY_USER: ${{ github.actor }}
NAMESPACES__PHARIA_KERNEL_TEAM__REGISTRY_PASSWORD: ${{ secrets.SKILL_REGISTRY_PASSWORD }}
PHARIA_AI_TOKEN: ${{ secrets.PHARIA_AI_TOKEN }}
AA_INFERENCE_ADDRESS: https://inference-api.product.pharia.com
AUTHORIZATION_ADDRESS: https://pharia-iam.product.pharia.com
Expand Down Expand Up @@ -101,9 +101,9 @@ jobs:
- name: Integration test
run: |
(podman run -p 8081:8081 -v ./operator-config.toml:/app/operator-config.toml \
-e SKILL_REGISTRY_USER=dummy \
-e SKILL_REGISTRY_PASSWORD=dummy \
-e GITLAB_CONFIG_ACCESS_TOKEN=dummy \
-e NAMESPACES__PHARIA_KERNEL_TEAM__REGISTRY_USER=dummy \
-e NAMESPACES__PHARIA_KERNEL_TEAM__REGISTRY_PASSWORD=dummy \
-e NAMESPACES__PHARIA_KERNEL_TEAM__CONFIG_ACCESS_TOKEN=dummy \
-e PHARIA_AI_TOKEN=dummy \
pharia-kernel:$IMAGE_ID | cat) &
bash -x ./tests/test-image.sh 8081 127.0.0.1
Expand Down
175 changes: 175 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ metrics-exporter-prometheus = { version = "0.16.0", default-features = false, fe
] }
itertools = "0.14.0"
urlencoding = "2.1.3"
config = "0.15.4"
heck = "0.5.0"

[dev-dependencies]
test-skills = { path = "./test-skills" }
Expand Down
3 changes: 2 additions & 1 deletion doc/src/local-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ In order to run Pharia Kernel, you need to provide a namespace configuration:
mkdir skills
```

All skills in this folder are exposed in the namespace "dev".
All skills in this folder are exposed in the namespace "dev" with the environment variable `NAMESPACES__DEV__DIRECTORY`.
Any changes in this folder will be picked up by the Pharia Kernel automatically. The `operator-config.toml` and `namespace.toml` should not be provided.

2. Start the container:

```shell
podman run \
-v ./skills:/app/skills \
-e NAMESPACES__DEV__DIRECTORY = "/app/skills"
-e PHARIA_AI_TOKEN=$PHARIA_AI_TOKEN \
-e NAMESPACE_UPDATE_INTERVAL=1s \
-e LOG_LEVEL="pharia_kernel=debug" \
Expand Down
Loading
Loading