rig major updates
This commit is contained in:
@@ -12,12 +12,18 @@ The kubectl context becomes kind-<CLUSTER>. LEAVE THIS UNSET unless you need a n
|
||||
|
||||
LEAVE UNSET — they derive from the directory name so several environments coexist without negotiating (see ctrl/ports.sh). `make check` shows this environment's block; `bash ctrl/ports.sh persist` writes it into ctrl/.env so it stops being derived and becomes fixed. Set a value only to override.
|
||||
|
||||
## ctrl/.env.example: OVERLAY
|
||||
|
||||
The folder that holds what runs — its settings (`rig.env`), manifests, addons, Tiltfile — kept outside rig's version control: `local/<name>` (gitignored), or a repo of its own anywhere. Relative to rig's folder, or absolute. Unset, rig runs its own `examples/starter`. The cluster, context and port block follow the overlay's folder name. See [overlay.md](overlay.md).
|
||||
|
||||
## ctrl/.env.example: MANIFESTS_DIR
|
||||
|
||||
Where the application manifests live. The real ones are expected to be versioned separately from this installer — they change on a different cadence, by different people. Repoint this at their repo and rig stops owning them:
|
||||
Where the manifests live. Leave it unset: the overlay's `k8s/overlays/dev` is the default. Set it only to point somewhere else, relative to rig's folder or absolute:
|
||||
|
||||
MANIFESTS_DIR=../platform-manifests/overlays/dev
|
||||
|
||||
Older copies of this file set `MANIFESTS_DIR=ctrl/k8s/overlays/dev`, rig's examples before they moved to `examples/`. That value is ignored while the folder does not exist, and `make check` says to delete the line.
|
||||
|
||||
## ctrl/.env.example: DEPS_SOURCE
|
||||
|
||||
Where the installer fetches the pinned binaries from.
|
||||
@@ -36,11 +42,13 @@ Corporate root CA, if Artifactory is fronted by an internal CA (it usually is).
|
||||
|
||||
## env.d/*.env.example: profiles in general
|
||||
|
||||
EXAMPLE PROFILES. rig needs none of these: with no profile it runs on its built-in defaults (lib/config.sh). To use one, copy it to <name>.env in ctrl/env.d/ and name it — PROFILE=<name> in ctrl/.env, or on the command line. It then overlays the defaults; anything it does not set, they still supply.
|
||||
EXAMPLE PROFILES. rig needs none of these: with no profile it runs on its built-in defaults (lib/config.sh). To use one, copy it to <name>.env in ctrl/env.d/ and name it — PROFILE=<name> in ctrl/.env, or on the command line. It then overlays the defaults; anything it does not set, they still supply. An activated `<name>.env` is gitignored: it is this machine's choice.
|
||||
|
||||
## env.d/client.env.example
|
||||
A profile says how this machine reaches the world — a registry mirror, an air-gapped install. What runs is an overlay's business ([overlay.md](overlay.md)); its `rig.env` layers above the profile.
|
||||
|
||||
client — images through a pull-through cache of the corporate registry, with TLS and metrics addons. More nodes or port mappings: edit k8s/kind-config.yaml.tpl.
|
||||
## env.d/mirror.env.example
|
||||
|
||||
mirror — images through a pull-through cache of an internal registry, with TLS and metrics addons. More nodes or port mappings: edit the kind config (rig's, or the overlay's).
|
||||
|
||||
### Real ports (80/443)
|
||||
|
||||
@@ -48,27 +56,9 @@ Ports derive from the directory name by default (see ctrl/ports.sh), so several
|
||||
|
||||
Opt in to the real ports only when this is the ONLY environment and nothing else owns :80. They fail to bind otherwise, and docker reports it as an opaque "failed to bind host port 0.0.0.0:80/tcp: address already in use" halfway through cluster creation. `make check` checks before you spend the time. Uncommenting also means only one environment can exist at a time.
|
||||
|
||||
## env.d/data.env.example
|
||||
|
||||
data — databases and a scheduler for an environment that needs them: postgres, redis and airflow, each an upstream image run unmodified.
|
||||
|
||||
Everything lands in the `data` namespace (DATA_NAMESPACE to move it), so `make cluster reset` on the app namespace leaves the databases alone.
|
||||
|
||||
Costs roughly 2-3 GB with airflow, under 1 without. Airflow's first boot runs the whole metadata migration, so expect a few minutes before it is ready.
|
||||
|
||||
### Postgres password
|
||||
|
||||
The password is not in the profile: postgres.sh generates one on first install and keeps it across re-runs, so re-running the addon never rotates the credential out from under whatever is already connected.
|
||||
|
||||
### Reaching the databases
|
||||
|
||||
Ports derive from the directory name by default — see ctrl/ports.sh. Reach the databases with port-forward rather than binding more host ports:
|
||||
|
||||
kubectl -n data port-forward svc/postgres 5432:5432
|
||||
kubectl -n data port-forward svc/airflow 8080:8080
|
||||
|
||||
## env.d/offline.env.example
|
||||
|
||||
offline — air-gapped. Everything comes from a local registry that was loaded ahead of time; nothing reaches the internet. Pair with the deps-full image (DEPS_SOURCE=baked) so the toolchain install is offline too.
|
||||
offline — air-gapped. Everything comes from a local registry that was loaded ahead of time; nothing reaches the internet. Pair with the deps-full image (DEPS_SOURCE=baked) so the toolchain install is offline too, and so the manifests metallb and the other addons apply come from the image, verified, rather than from GitHub (see Dockerfile.deps.md). Their container images still have to be preloaded.
|
||||
|
||||
The heavier addons are left out to keep first boot viable.
|
||||
|
||||
Reference in New Issue
Block a user