Repository navigation
Expand file tree
/
Copy pathstack.yaml
More file actions
107 lines (101 loc) · 5.48 KB
/
Copy pathstack.yaml
File metadata and controls
107 lines (101 loc) · 5.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# The tenish stack from published images, on a project of yours.
#
# Nothing in this file is edited. It carries four tokens — {org} (your GitHub
# organization), {project} (your GCP project), {region} and {cluster} — and the
# profile in `stack ui` fills them (the command line: --set org=… and so on).
# Read docs/install.md: it goes from an empty project to the room in order.
# Nothing here is built. Every app is a release image on ghcr, pinned by digest;
# each gets a small deploy repo of yours (gojira.yaml + the upstream's k8s/base)
# that the installer creates and Gojira connects. Nothing secret is in this file:
# the keys are generated into .generated/ (mode 600, gitignored) and the one file
# you bring is your GitHub App's private key.
#
# Order is the dependency order: litellm (the model proxy), cabal (the switchboard,
# needs litellm's key), liminal (the tool gateway, holds a token minted on that
# cabal), then kobo (the room, another token on that cabal).
gojira:
namespace: gojira
# The Gojira release Install Gojira installs (a tag of tenishai/gojira). The page
# fetches it once into ~/.cache/stack/gojira/<version>; nothing to clone by hand.
version: v1.4.0
# Pin the context: your current kubectl context can be any cluster. This is the
# name `gcloud container clusters get-credentials` writes for the cluster below.
kube_context: gke_{project}_{region}_{cluster}
cluster:
name: "{cluster}" # also the name the cluster is registered under in Gojira (install.md step 1)
gcp_project: "{project}"
location: "{region}"
apps:
- name: litellm
repo: tenishai/litellm-deploy # the upstream: its k8s/base travels into the deploy repo
# Each image: line is a release, pinned by the digest on its release page
# (github.com/tenishai/<repo>/releases); a tag moves, a digest does not.
image: ghcr.io/tenishai/litellm-deploy:v0.1.0@sha256:797150bba8bd7aa00676cf5dcf14cfaa9dd56ecedcf46a9721d5b0f35d477ee4
source_image: ghcr.io/tenishai/litellm-deploy # where releases are published; the UI's release picker reads it
deploy_repo: "{org}/infra-litellm-deploy" # created if missing; gojira.yaml + k8s/base, nothing else
workload_class: web
contract:
identity: { gcp_roles: [roles/aiplatform.user] } # the proxy calls Vertex as its own account
env: { VERTEX_PROJECT: "{project}", VERTEX_LOCATION: "{region}" }
secrets:
litellm-secrets:
LITELLM_MASTER_KEY: generate:32:litellm-master-key # one value, shared with cabal below
- name: cabal
repo: tenishai/cabal
image: ghcr.io/tenishai/cabal:v0.5.2@sha256:2e5baea1d11ff7ab61802b1f0b636d10d7ebcf01d724575046ac010c4cec78eb # 0.5.2 carries liminal's client; the [liminal] block in cabal-identity.toml needs it
source_image: ghcr.io/tenishai/cabal
deploy_repo: "{org}/infra-cabal-deploy"
bootstrap: cabal # catch the bootstrap code from its log, log in, mint the tokens below
configmaps:
cabal-config:
identity.toml: file:stack/cabal-identity.toml
secrets:
cabal-secrets:
CABAL_MASTER_KEY: generate:32
LITELLM_MASTER_KEY: generate:32:litellm-master-key
- name: liminal
repo: tenishai/liminal
image: ghcr.io/tenishai/liminal:v0.12.0@sha256:0ddd7a925e66522ad2837e030e5e3aa61f7f300830c0decbc1985ea906c8b917
source_image: ghcr.io/tenishai/liminal
deploy_repo: "{org}/infra-liminal-deploy"
secrets:
liminal-secrets:
LIMINAL_CABAL_TOKEN: cabal-token:service:liminal:secrets-fetch # the gateway fetches vendor credentials from cabal with it
- name: kobo
repo: tenishai/kobo
image: ghcr.io/tenishai/kobo:v0.3.86@sha256:e8068497ae55cb816beb4aa8ab6f350f45c72454c8ca3043462ba90f43de6908
source_image: ghcr.io/tenishai/kobo
deploy_repo: "{org}/infra-kobo-deploy"
cluster_objects: [k8s/cluster/rbac.yaml] # the ClusterRole kobo-room, which Gojira binds via cluster_roles
contract:
# The room makes agents: it creates their service accounts and grants them
# roles, pushes their images, deploys through Gojira and keeps catalogs in
# buckets. Each role must be on the install's GOJIRA_GRANTABLE_ROLES
# (install.md step 1); Gojira creates the account kobo@{project} with them.
identity:
gcp_roles:
- roles/aiplatform.user
- roles/artifactregistry.reader
- roles/container.developer
- roles/iam.serviceAccountAdmin
- roles/resourcemanager.projectIamAdmin
- roles/storage.admin
secrets:
kobo-github:
private-key.pem: file:{app_pem} # the App's key, wherever the App card stored it (GOJIRA_GITHUB_APP_PEM)
kobo-config:
config.yaml: template:stack/kobo-config.template.yaml
kobo-cabal:
CABAL_OPERATOR_TOKEN: cabal-token:service:kobo:operator
# Once its pods are ready, inside the pod: the room's bootstrap makes your
# org's config repo ({org}/kobo-config), the two buckets, the skills repo with
# its publish workflow, and seeds the default personas; idempotent. The room
# reads the org config at start, so it restarts after. Runs on a fresh install
# and whenever kobo is installed by name.
setup:
run: python -m kobo_api.bootstrap
restart: true
# What you open when the install is done: the room, through a port-forward on
# your machine (the page's Open button, or the printed command). No sign-in
# proxy in this shape; see Gojira's install guide for a front door with IAP.
door: 8090:80