Repository navigation
Expand file tree
/
Copy pathconfiguration.json
More file actions
379 lines (379 loc) · 13.4 KB
/
Copy pathconfiguration.json
File metadata and controls
379 lines (379 loc) · 13.4 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
{
"$schemaComment": "Single source of truth for Grid env-var docs. Edit this file, then run: npm run sync:config",
"sources": {
"installEnv": "https://github.com/gridplatform/grid-core/blob/main/install/.env.example",
"coreEnv": "https://github.com/gridplatform/grid-core/blob/main/.env.example",
"uiEnv": "https://github.com/gridplatform/grid-ui/blob/main/.env.example",
"monitoring": "https://github.com/gridplatform/grid-core/tree/main/install/monitoring"
},
"sections": [
{
"id": "paths",
"title": "Paths & process",
"intro": "Core process paths. Install Compose uses defaults inside the container; override only when you know the layout.",
"vars": [
{
"name": "PORT",
"purpose": "API listen port (inside the process / container)",
"typical": "`3000`"
},
{
"name": "GRID_HTTP_PORT",
"purpose": "Host port published by Compose for the UI/proxy",
"typical": "`80`"
},
{
"name": "GRID_DATA_DIR",
"purpose": "JSON store (users, sessions, audit, releases)",
"typical": "`./data` or `/var/lib/grid/data`"
},
{
"name": "GRID_WORK_DIR",
"purpose": "Terraform workspaces fallback root",
"typical": "`./workspaces` or `/var/lib/grid/workspaces`"
},
{
"name": "GRID_CLI_ROOT",
"purpose": "Path to the `grid-cli` package",
"typical": "`../grid-cli` or `/opt/grid/grid-cli`"
},
{
"name": "GRID_CONFIG_ROOT",
"purpose": "Desired-state working tree (GitOps checkout target)",
"typical": "`./data/desired-state`"
},
{
"name": "GRID_TERRAFORM_BIN",
"purpose": "Terraform binary name or path",
"typical": "`terraform`"
},
{
"name": "GRID_CORS_ORIGIN",
"purpose": "Optional CORS allow-list (comma-separated origins). Empty = library default",
"typical": "`https://grid.example.com`"
}
]
},
{
"id": "auth",
"title": "Auth",
"intro": "Bootstrap creates one superadmin. Change the password before any shared host.",
"vars": [
{
"name": "GRID_AUTH_ADMIN_EMAIL",
"purpose": "Bootstrap superadmin email",
"typical": "`admin@example.com`",
"required": true
},
{
"name": "GRID_AUTH_ADMIN_PASSWORD",
"purpose": "Bootstrap superadmin password (no placeholders). Keep in sync after `grid admin superadmin` rotates it",
"typical": "(strong secret)",
"required": true
},
{
"name": "GRID_AUTH_ADMIN_NAME",
"purpose": "Optional display name for the bootstrap user",
"typical": "`Grid Admin`"
},
{
"name": "GRID_AUTH_SESSION_TTL_HOURS",
"purpose": "API session length in hours",
"typical": "`168`"
},
{
"name": "GRID_AUTH_ALLOW_REGISTER",
"purpose": "Public self-register (`true`/`1`). Keep off for self-host",
"typical": "`false`"
},
{
"name": "GRID_AUTH_DISABLED",
"purpose": "Bypass auth — **dev only**, never on a public VM",
"typical": "`false`"
}
]
},
{
"id": "gitops",
"title": "GitOps (intent sync)",
"intro": "When `GRID_GITOPS_REPO_URL` is set, Core clones/pulls into `GRID_CONFIG_ROOT`. Works with any Git host. Prefer a clean URL. **Production (`npm run prod`) hard-fails HTTPS remotes without username + host token + expiry** (env or Admin → Sources). SSH remotes use host deploy keys instead.",
"vars": [
{
"name": "GRID_GITOPS_REPO_URL",
"required": true,
"purpose": "Intent repo URL (HTTPS or SSH) — any Git provider",
"typical": "`https://git.example.com/org/intent.git`"
},
{
"name": "GRID_GITOPS_BRANCH",
"purpose": "Branch to pull",
"typical": "`main`"
},
{
"name": "GRID_GITOPS_PATH",
"purpose": "Optional subdirectory under the clone (relative, no `..`)",
"typical": "(empty = repo root)"
},
{
"name": "GRID_GITOPS_SYNC_INTERVAL_SEC",
"purpose": "Auto pull + reconcile interval. Default `600` when a repo URL is set; `0` = manual only",
"typical": "`600`"
},
{
"name": "GRID_GITOPS_USERNAME",
"required": true,
"purpose": "Required for HTTPS intent remotes in production (`git`, GitLab `oauth2`, Bitbucket `x-token-auth`, …). Also stored in `gitops-secrets.json` via Admin → Sources. Not required for SSH remotes.",
"typical": "`git`"
},
{
"name": "GRID_GITOPS_TOKEN",
"required": true,
"purpose": "Required for HTTPS intent remotes in production (host-issued PAT/deploy token; Grid does not generate it). Also accepted from `GRID_DATA_DIR/gitops-secrets.json` after Admin → Sources. Not required for SSH remotes.",
"typical": "`ghp_…` / deploy token (or unset once secrets file is populated)"
},
{
"name": "GRID_GITOPS_TOKEN_EXPIRES_AT",
"required": true,
"purpose": "Required with HTTPS auth in production (`YYYY-MM-DD` from your Git host). Also stored via Sources as authExpiresAt / secrets `tokenExpiresAt`.",
"typical": "`2027-01-15`"
},
{
"name": "GRID_USE_DEMO",
"purpose": "Force demo-infra fixture path (local labs). Do not use in production",
"typical": "`false`"
}
]
},
{
"id": "modules",
"title": "Module bank",
"intro": "Terraform modules consumed by generate. Prefer a **release tag**, not `main`.",
"vars": [
{
"name": "GRID_MODULE_BANK",
"purpose": "Module bank git URL or local path",
"typical": "`https://github.com/gridplatform/grid-terraform.git`"
},
{
"name": "GRID_MODULE_BANK_REF",
"purpose": "Branch or tag for the module bank",
"typical": "`v0.1.0`"
},
{
"name": "GRID_MODULE_BANK_SYNC_INTERVAL_SEC",
"purpose": "Auto-refresh local module-bank checkout (seconds). `0` = manual. Default `20` when unset",
"typical": "`20`"
},
{
"name": "GRID_MODULE_SOURCE",
"purpose": "Optional: force `remote` module sources in generated HCL",
"typical": "`remote`"
}
]
},
{
"id": "tfstate",
"title": "Remote Terraform state",
"intro": "Required for production / install. Create the store before the first apply — see [Remote state](./Remote_State.md). The same bucket also stores the generated archive mirror.",
"vars": [
{
"name": "GRID_TF_BACKEND",
"purpose": "Backend kind",
"typical": "`s3` \\| `gcs` \\| `azurerm` \\| `oci` \\| `oss` \\| `cos` \\| `s3compat`",
"required": true
},
{
"name": "GRID_TF_STATE_BUCKET",
"purpose": "Bucket / container name (s3, gcs, oci, oss, cos, s3compat)",
"typical": "`mycompany-grid-tfstate`"
},
{
"name": "GRID_TF_LOCK_TABLE",
"purpose": "DynamoDB lock table (AWS S3 backend)",
"typical": "`mycompany-grid-tflock`"
},
{
"name": "GRID_TF_STATE_REGION",
"purpose": "Region for S3 / OSS / COS / s3compat",
"typical": "`us-east-1`"
},
{
"name": "GRID_TF_S3_ENDPOINT",
"purpose": "S3-compatible endpoint (OCI, Huawei OBS, Aliyun OSS, MinIO, …)",
"typical": "`https://obs.cn-north-1.myhuaweicloud.com`"
},
{
"name": "GRID_TF_S3_FORCE_PATH_STYLE",
"purpose": "Force path-style S3 addressing when the vendor requires it",
"typical": "`true`"
},
{
"name": "GRID_TF_AZURE_RESOURCE_GROUP",
"purpose": "Azure resource group (`azurerm`)",
"typical": "`grid-tfstate-rg`"
},
{
"name": "GRID_TF_AZURE_STORAGE_ACCOUNT",
"purpose": "Azure storage account (`azurerm`)",
"typical": "`gridtfstate`"
},
{
"name": "GRID_TF_AZURE_CONTAINER",
"purpose": "Azure blob container (`azurerm`)",
"typical": "`grid-tfstate`"
},
{
"name": "GRID_TF_OCI_NAMESPACE",
"purpose": "OCI Object Storage namespace",
"typical": "`<tenancy-namespace>`"
}
]
},
{
"id": "monitoring",
"title": "Monitoring",
"intro": "Prometheus + Alertmanager run on the **host** (systemd or local binaries), not inside Grid Compose. Required for production boot. See [Monitoring](./Monitoring.md).",
"vars": [
{
"name": "GRID_PROMETHEUS_URL",
"purpose": "Prometheus query API base URL",
"typical": "`http://127.0.0.1:9090` or `http://host.docker.internal:9090`",
"required": true
},
{
"name": "GRID_ALERTMANAGER_URL",
"purpose": "Alertmanager API base URL",
"typical": "`http://127.0.0.1:9093` or `http://host.docker.internal:9093`",
"required": true
},
{
"name": "GRID_MONITORING_CONFIG_DIR",
"purpose": "Dir for alert `rules/` + `alertmanager.yml` written by the API",
"typical": "`./install/monitoring` or `/etc/prometheus`"
},
{
"name": "GRID_MONITORING_HOST_DIR",
"purpose": "Host path bind-mounted for Compose → systemd Prometheus config",
"typical": "`/etc/prometheus`"
},
{
"name": "GRID_PROMETHEUS_BEARER_TOKEN",
"purpose": "Optional bearer token for Prometheus",
"typical": "(secret)"
},
{
"name": "GRID_PROMETHEUS_BASIC_USER",
"purpose": "Optional basic-auth user for Prometheus",
"typical": ""
},
{
"name": "GRID_PROMETHEUS_BASIC_PASSWORD",
"purpose": "Optional basic-auth password for Prometheus",
"typical": "(secret)"
},
{
"name": "GRID_PROMETHEUS_TIMEOUT_MS",
"purpose": "Prometheus HTTP timeout",
"typical": "`8000`"
},
{
"name": "GRID_PROMETHEUS_CACHE_TTL_MS",
"purpose": "In-process metrics cache TTL",
"typical": "`20000`"
},
{
"name": "GRID_ALERTMANAGER_TIMEOUT_MS",
"purpose": "Alertmanager HTTP timeout",
"typical": "`8000`"
}
]
},
{
"id": "argo",
"title": "Argo CD / OpenShift GitOps",
"intro": "Optional Kubernetes workload reconciler (Application CRD). Off by default.",
"vars": [
{
"name": "GRID_ARGO_ENABLED",
"purpose": "Enable Argo / OpenShift GitOps integration (`true`/`1`)",
"typical": "`false`"
},
{
"name": "GRID_ARGO_KUBECONFIG",
"purpose": "kubeconfig for the cluster where Argo runs (falls back to `KUBECONFIG`)",
"typical": "`/path/to/kubeconfig`"
},
{
"name": "GRID_ARGO_CONTEXT",
"purpose": "Optional kubectl context name",
"typical": ""
},
{
"name": "GRID_ARGO_NAMESPACE",
"purpose": "Namespace for Application CRs",
"typical": "`argocd`"
},
{
"name": "GRID_KUBECTL_BIN",
"purpose": "kubectl binary",
"typical": "`kubectl`"
}
]
},
{
"id": "install",
"title": "Install / Compose pins",
"intro": "Used by `install/.env` and Compose. Not all apply to a bare `npm run prod` on a local machine.",
"vars": [
{
"name": "GRID_RELEASE_CHANNEL",
"purpose": "GHCR channel when using release Compose (`current` or `lts`)",
"typical": "`current`"
},
{
"name": "GRID_VERSION",
"purpose": "Exact image tag (overrides channel), e.g. `0.1.0`",
"typical": "`0.1.0`"
},
{
"name": "GRID_CORE_IMAGE",
"purpose": "Override core image reference",
"typical": "`ghcr.io/gridplatform/grid-core:0.1.0`"
},
{
"name": "GRID_UI_IMAGE",
"purpose": "Override UI image reference",
"typical": "`ghcr.io/gridplatform/grid-ui:0.1.0`"
},
{
"name": "GRID_CLI_REF",
"purpose": "Git ref when building CLI into the core image from source",
"typical": "`main` or `v0.1.0`"
},
{
"name": "GRID_UI_REF",
"purpose": "Git ref when building the UI image from source",
"typical": "`main` or `v0.1.0`"
},
{
"name": "TERRAFORM_VERSION",
"purpose": "Terraform version baked into the core image",
"typical": "`1.9.8`"
}
]
},
{
"id": "ui",
"title": "Console (grid-ui)",
"intro": "Build-time Vite env. Production builds refuse to proceed without `VITE_GRID_API_URL`.",
"vars": [
{
"name": "VITE_GRID_API_URL",
"purpose": "Browser → API base path or absolute URL",
"typical": "`/api/v1` (Compose) or `http://localhost:3000/api/v1` (dev)",
"required": true
}
]
}
]
}