@meshxdata/fops 0.1.58 → 0.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +183 -0
- package/package.json +1 -1
- package/src/commands/k3s-cmd.js +2 -2
- package/src/commands/lifecycle.js +12 -0
- package/src/plugins/bundled/fops-plugin-azure/lib/azure-helpers.js +1 -1
- package/src/plugins/bundled/fops-plugin-azure/lib/azure-provision-health.js +12 -10
- package/src/plugins/bundled/fops-plugin-cloud/api.js +7 -7
- package/src/project.js +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,186 @@
|
|
|
1
|
+
## [0.1.59] - 2026-03-26
|
|
2
|
+
|
|
3
|
+
- fix(k3s): remove minio123 fallback from sync-secrets (e185cb9)
|
|
4
|
+
- fix: add frontend-prod profile to fopsUpCmd, FOUNDATION_ROOT always wins in rootDir (a412709)
|
|
5
|
+
- bump storage (a1a5761)
|
|
6
|
+
- restore all missing services (pgpool, exporters, grafana, etc), add loki to k3s profile, always activate loki profile in fops up (4e2744a)
|
|
7
|
+
- fix: grafana alert-rules provisioning, ENVIRONMENT_NAME from --url, k3s secret sync, vm-sizes endpoint, project root resolution (9839052)
|
|
8
|
+
- feat(azure): add 'fops azure reconcile <name>' command for VM drift fix (79ba6e2)
|
|
9
|
+
- fix(otel,loki): remove duplicate spanmetrics dimensions, use .env for loki S3 creds (e3d1def)
|
|
10
|
+
- fix(loki): pass S3 credentials from .env so loki works without vault-init (c57906d)
|
|
11
|
+
- fix(azure): improve VM provisioning reliability (2ddd669)
|
|
12
|
+
- cluster discovery (009257d)
|
|
13
|
+
- feat(storage): add loki container to provisioning (898c544)
|
|
14
|
+
- feat(azure): add ping command to check backend health (8336825)
|
|
15
|
+
- operator cli bump 0.1.52 (f052cb5)
|
|
16
|
+
- fix(doctor): set KUBECONFIG for k3s kubectl commands (db9359b)
|
|
17
|
+
- fix(azure): move --landscape to test run command, not separate subcommand (4b9b089)
|
|
18
|
+
- feat(azure): add test integration command with landscape support (b2990a0)
|
|
19
|
+
- fix(fleet): skip VMs without public IPs in fleet exec (39acbaa)
|
|
20
|
+
- feat(azure): detect and fix External Secrets identity issues (f907d11)
|
|
21
|
+
- operator cli bump 0.1.51 (db55bdc)
|
|
22
|
+
- feat: add postgres-exporter and Azure tray menu improvements (2a337ac)
|
|
23
|
+
- operator cli plugin fix (4dae908)
|
|
24
|
+
- operator cli plugin fix (25620cc)
|
|
25
|
+
- operator cli test fixes (1d1c18f)
|
|
26
|
+
- feat(test): add setup-users command for QA test user creation (b929507)
|
|
27
|
+
- feat(aks): show HA standby clusters with visual grouping (8fb640c)
|
|
28
|
+
- refactor(provision): extract VM provisioning to dedicated module (af321a7)
|
|
29
|
+
- refactor(provision): extract post-start health checks to dedicated module (6ed5f2d)
|
|
30
|
+
- fix: ping timeout 15s, fix prometheus sed escaping (d11ac14)
|
|
31
|
+
- refactor(vm): extract terraform HCL generation to dedicated module (896a64b)
|
|
32
|
+
- refactor(keyvault): extract key operations to dedicated module (716bbe4)
|
|
33
|
+
- refactor(azure): extract swarm functions to azure-fleet-swarm.js (4690e34)
|
|
34
|
+
- refactor(azure): extract SSH/remote functions to azure-ops-ssh.js (e62b8f0)
|
|
35
|
+
- refactor(azure): split azure-ops.js into smaller modules (4515425)
|
|
36
|
+
- feat(aks): add --ha flag for full cross-region HA setup (ece68c5)
|
|
37
|
+
- feat(fops): inject ENVIRONMENT_NAME on VM provisioning (6ef2a27)
|
|
38
|
+
- fix(postgres): disable SSL mode to fix connection issues (c789ae9)
|
|
39
|
+
- feat(trino): add caching configuration for docker-compose (3668224)
|
|
40
|
+
- fix(fops-azure): run pytest directly instead of missing scripts (29f8410)
|
|
41
|
+
- add -d detach option for local frontend dev, remove hive cpu limits (3306667)
|
|
42
|
+
- release 0.1.49 (dcca32b)
|
|
43
|
+
- release 0.1.48 (9b195e5)
|
|
44
|
+
- stash on updates (2916c01)
|
|
45
|
+
- stash on updates (b5c14df)
|
|
46
|
+
- stash on updates (d0453d1)
|
|
47
|
+
- frontend dev fixes (0ca7b00)
|
|
48
|
+
- fix: update azure test commands (77c81da)
|
|
49
|
+
- default locust to CLI mode, add --web for UI (ca35bff)
|
|
50
|
+
- add locust command for load testing AKS clusters (1278722)
|
|
51
|
+
- update spot node pool default autoscaling to 1-20 (617c182)
|
|
52
|
+
- module for aks (3dd1a61)
|
|
53
|
+
- add hive to PG_SERVICE_DBS for fops pg-setup (afccb16)
|
|
54
|
+
- feat(azure): enhance aks doctor with ExternalSecrets and PGSSLMODE checks (8b14861)
|
|
55
|
+
- add foundation-postgres ExternalName service to reconciler (ea88e11)
|
|
56
|
+
- new flux templates (0e2e372)
|
|
57
|
+
- feat(azure): add storage-engine secrets to Key Vault (a4f488e)
|
|
58
|
+
- feat(azure-aks): add AUTH0_DOMAIN to template rendering variables (216c37e)
|
|
59
|
+
- feat(azure): add storage account creation per cluster (aa1b138)
|
|
60
|
+
- bump watcher (ab24473)
|
|
61
|
+
- fix: concurrent compute calls (#66) (03e2edf)
|
|
62
|
+
- bump backend version (5058ff5)
|
|
63
|
+
- bump fops to 0.1.44 (8c0ef5d)
|
|
64
|
+
- Mlflow and azure plugin fix (176881f)
|
|
65
|
+
- fix lifecycle (a2cb9e7)
|
|
66
|
+
- callback url for localhost (821fb94)
|
|
67
|
+
- disable 4 scaffolding plugin by default. (bfb2b76)
|
|
68
|
+
- jaccard improvements (b7494a0)
|
|
69
|
+
- refactor azure plugin (68dfef4)
|
|
70
|
+
- refactor azure plugin (b24a008)
|
|
71
|
+
- fix trino catalog missing (4928a55)
|
|
72
|
+
- v36 bump and changelog generation on openai (37a0440)
|
|
73
|
+
- v36 bump and changelog generation on openai (a3b02d9)
|
|
74
|
+
- bump (a990058)
|
|
75
|
+
- status bar fix and new plugin for ttyd (27dde1e)
|
|
76
|
+
- file demo and tray (1a3e704)
|
|
77
|
+
- electron app (59ad0bb)
|
|
78
|
+
- compose and fops file plugin (1cf0e81)
|
|
79
|
+
- bump (346ffc1)
|
|
80
|
+
- localhost replaced by 127.0.0.1 (82b9f30)
|
|
81
|
+
- .29 (587b0e1)
|
|
82
|
+
- improve up down and bootstrap script (b79ebaf)
|
|
83
|
+
- checksum (22c8086)
|
|
84
|
+
- checksum (96b434f)
|
|
85
|
+
- checksum (15ed3c0)
|
|
86
|
+
- checksum (8a6543a)
|
|
87
|
+
- bump embed trino linksg (8440504)
|
|
88
|
+
- bump data (765ffd9)
|
|
89
|
+
- bump (cb8b232)
|
|
90
|
+
- broken tests (c532229)
|
|
91
|
+
- release 0.1.18, preflight checks (d902249)
|
|
92
|
+
- fix compute display bug (d10f5d9)
|
|
93
|
+
- cleanup packer files (6330f18)
|
|
94
|
+
- plan mode (cb36a8a)
|
|
95
|
+
- bump to 0.1.16 - agent ui (41ac1a2)
|
|
96
|
+
- bump to 0.1.15 - agent ui (4ebe2e1)
|
|
97
|
+
- bump to 0.1.14 (6c3a7fa)
|
|
98
|
+
- bump to 0.1.13 (8db570f)
|
|
99
|
+
- release 0.1.12 (c1c79e5)
|
|
100
|
+
- bump (11aa3b0)
|
|
101
|
+
- git keep and bump tui (be1678e)
|
|
102
|
+
- skills, index, rrf, compacted context (100k > 10k) (7b2fffd)
|
|
103
|
+
- cloudflare and token consumption, graphs indexing (0ad9eec)
|
|
104
|
+
- bump storage default (22c83ba)
|
|
105
|
+
- storage fix (68a22a0)
|
|
106
|
+
- skills update (7f56500)
|
|
107
|
+
- v9 bump (3864446)
|
|
108
|
+
- bump (c95eedc)
|
|
109
|
+
- rrf (dbf8c95)
|
|
110
|
+
- feat: warning when running predictions (95e8c52)
|
|
111
|
+
- feat: support for local predictions (45cf26b)
|
|
112
|
+
- feat: wip support for predictions + mlflow (3457052)
|
|
113
|
+
- add Reciprocal Rank Fusion (RRF) to knowledge and skill retrieval (61549bc)
|
|
114
|
+
- validate CSV headers in compute_run readiness check (a8c7a43)
|
|
115
|
+
- fix corrupted Iceberg metadata: probe tables + force cleanup on re-apply (50578af)
|
|
116
|
+
- enforce: never use foundation_apply to fix broken products (2e049bf)
|
|
117
|
+
- update SKILL.md with complete tool reference for knowledge retrieval (30b1924)
|
|
118
|
+
- add storage read, input DP table probe, and compute_run improvements (34e6c4c)
|
|
119
|
+
- skills update (1220385)
|
|
120
|
+
- skills update (bb66958)
|
|
121
|
+
- some tui improvement andd tools apply overwrite (e90c35c)
|
|
122
|
+
- skills update (e9227a1)
|
|
123
|
+
- skills update (669c4b3)
|
|
124
|
+
- fix plugin pre-flight checks (f741743)
|
|
125
|
+
- increase agent context (6479aaa)
|
|
126
|
+
- skills and init sql fixes (5fce35e)
|
|
127
|
+
- checksum (3518b56)
|
|
128
|
+
- penging job limit (a139861)
|
|
129
|
+
- checksum (575d28c)
|
|
130
|
+
- bump (92049ba)
|
|
131
|
+
- fix bug per tab status (0a33657)
|
|
132
|
+
- fix bug per tab status (50457c6)
|
|
133
|
+
- checksumming (0ad842e)
|
|
134
|
+
- shot af mardkwon overlapping (51f63b9)
|
|
135
|
+
- add spark dockerfile for multiarch builds (95abbd1)
|
|
136
|
+
- fix plugin initialization (16b9782)
|
|
137
|
+
- split index.js (50902a2)
|
|
138
|
+
- cloudflare cidr (cc4e021)
|
|
139
|
+
- cloduflare restrictions (2f6ba2d)
|
|
140
|
+
- sequential start (86b496e)
|
|
141
|
+
- sequential start (4930fe1)
|
|
142
|
+
- sequential start (353f014)
|
|
143
|
+
- qa tests (2dc6a1a)
|
|
144
|
+
- bump sha for .85 (dc2edfe)
|
|
145
|
+
- preserve env on sudo (7831227)
|
|
146
|
+
- bump sha for .84 (6c052f9)
|
|
147
|
+
- non interactive for azure vms (0aa8a2f)
|
|
148
|
+
- keep .env if present (d072450)
|
|
149
|
+
- bump (7a8e732)
|
|
150
|
+
- ensure opa is on compose if not set (f4a5228)
|
|
151
|
+
- checksum bump (a2ccc20)
|
|
152
|
+
- netrc defensive checks (a0b0ccc)
|
|
153
|
+
- netrc defensive checks (ae37403)
|
|
154
|
+
- checksum (ec45d11)
|
|
155
|
+
- update sync and fix up (7f9af72)
|
|
156
|
+
- expand test for azure and add new per app tag support (388a168)
|
|
157
|
+
- checksum on update (44005fc)
|
|
158
|
+
- cleanup for later (15e5313)
|
|
159
|
+
- cleanup for later (11c9597)
|
|
160
|
+
- switch branch feature (822fecc)
|
|
161
|
+
- add pull (d1c19ab)
|
|
162
|
+
- Bump hono from 4.11.9 to 4.12.0 in /operator-cli (ad25144)
|
|
163
|
+
- tests (f180a9a)
|
|
164
|
+
- cleanup (39c49a3)
|
|
165
|
+
- registry (7b7126a)
|
|
166
|
+
- reconcile kafka (832d0db)
|
|
167
|
+
- gh login bug (025886c)
|
|
168
|
+
- cleanup (bb96cab)
|
|
169
|
+
- strip envs from process (2421180)
|
|
170
|
+
- force use of gh creds not tokens in envs var (fff7787)
|
|
171
|
+
- resolve import between npm installs and npm link (79522e1)
|
|
172
|
+
- fix gh scope and azure states (afd846c)
|
|
173
|
+
- refactoring (da50352)
|
|
174
|
+
- split fops repo (d447638)
|
|
175
|
+
- aks (b791f8f)
|
|
176
|
+
- refactor azure (67d3bad)
|
|
177
|
+
- wildcard (391f023)
|
|
178
|
+
- azure plugin (c074074)
|
|
179
|
+
- zap (d7e6e7f)
|
|
180
|
+
- fix knock (cf89c05)
|
|
181
|
+
- azure (4adec98)
|
|
182
|
+
- Bump tar from 7.5.7 to 7.5.9 in /operator-cli (e41e98e)
|
|
183
|
+
|
|
1
184
|
# Changelog
|
|
2
185
|
|
|
3
186
|
All notable changes to @meshxdata/fops (Foundation Operator CLI) are documented here.
|
package/package.json
CHANGED
package/src/commands/k3s-cmd.js
CHANGED
|
@@ -21,7 +21,7 @@ async function kubectlApply(execa, args) {
|
|
|
21
21
|
if (apply.exitCode !== 0) throw new Error(`kubectl apply failed: ${apply.stderr}`);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
async function syncSecrets(root) {
|
|
24
|
+
export async function syncSecrets(root) {
|
|
25
25
|
const { execa } = await import("execa");
|
|
26
26
|
const { loadEnvFromFile } = await import("../utils/load-env.js");
|
|
27
27
|
|
|
@@ -38,7 +38,7 @@ async function syncSecrets(root) {
|
|
|
38
38
|
// Load credentials from .env (same resolution as setup-kubernetes.sh)
|
|
39
39
|
const env = loadEnvFromFile(path.join(root, ".env"));
|
|
40
40
|
const s3Id = env.BOOTSTRAP_STORAGE_ACCESS_KEY || env.AUTH_IDENTITY || "minio";
|
|
41
|
-
const s3Pw = env.BOOTSTRAP_STORAGE_SECRET_KEY || env.AUTH_CREDENTIAL || "
|
|
41
|
+
const s3Pw = env.BOOTSTRAP_STORAGE_SECRET_KEY || env.AUTH_CREDENTIAL || "";
|
|
42
42
|
|
|
43
43
|
console.log(DIM(` Storage credentials: ${s3Id} / ${"*".repeat(Math.min(s3Pw.length, 8))}`));
|
|
44
44
|
|
|
@@ -1473,6 +1473,18 @@ async function runUp(program, registry, opts) {
|
|
|
1473
1473
|
}
|
|
1474
1474
|
console.log(chalk.green("\n ✓ Foundation services started successfully!"));
|
|
1475
1475
|
|
|
1476
|
+
// Sync storage secrets into k3s so Spark jobs use current credentials
|
|
1477
|
+
if (hasK3s) {
|
|
1478
|
+
try {
|
|
1479
|
+
const { syncSecrets } = await import("./k3s-cmd.js");
|
|
1480
|
+
console.log(chalk.dim(" Syncing storage secrets to k3s..."));
|
|
1481
|
+
await syncSecrets(root);
|
|
1482
|
+
} catch (err) {
|
|
1483
|
+
console.log(chalk.yellow(` ⚠ k3s secret sync failed: ${err.message}`));
|
|
1484
|
+
console.log(chalk.dim(" Run manually: fops k3s sync-secrets"));
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1476
1488
|
// Start DAI services if requested
|
|
1477
1489
|
if (opts.dai) {
|
|
1478
1490
|
const daiRoot = path.join(root, "dai-compose");
|
|
@@ -830,7 +830,7 @@ export async function ensureOpenAiNetworkAccess(execa, publicIp, sub) {
|
|
|
830
830
|
// ── Remote fops up command builder ──────────────────────────────────────────
|
|
831
831
|
|
|
832
832
|
export function fopsUpCmd(publicUrl, { k3s, traefik, dai } = {}) {
|
|
833
|
-
const profiles = ["k3s", "traefik", "loki"];
|
|
833
|
+
const profiles = ["k3s", "traefik", "loki", "frontend-prod"];
|
|
834
834
|
if (dai) profiles.push("dai");
|
|
835
835
|
|
|
836
836
|
const profileEnv = `COMPOSE_PROFILES=${profiles.join(",")} `;
|
|
@@ -158,22 +158,24 @@ export async function postStartChecks(execa, ip, adminUser, { maxWait = POSTGRES
|
|
|
158
158
|
console.log(OK(" ✓ Postgres ready"));
|
|
159
159
|
|
|
160
160
|
hint("Waiting for backend migrations…");
|
|
161
|
+
const MIGRATION_MAX_WAIT_MS = 300000; // 5 min — migrations can be slow after recovery or image pulls
|
|
162
|
+
const MIGRATION_POLL_INTERVAL_MS = 10000;
|
|
163
|
+
const MIGRATION_PROGRESS_INTERVAL_MS = 60000;
|
|
161
164
|
const migStart = Date.now();
|
|
162
165
|
let migReady = false;
|
|
163
|
-
|
|
166
|
+
let lastMigProgressAt = 0;
|
|
167
|
+
while (Date.now() - migStart < MIGRATION_MAX_WAIT_MS) {
|
|
164
168
|
const { exitCode: migCheck } = await ssh(
|
|
165
169
|
`cd /opt/foundation-compose && sudo docker compose exec -T postgres psql -U foundation -d foundation -c "SELECT 1 FROM \\"user\\" LIMIT 1" >/dev/null 2>&1`
|
|
166
170
|
);
|
|
167
171
|
if (migCheck === 0) { migReady = true; break; }
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
);
|
|
176
|
-
if (retryCheck === 0) migReady = true;
|
|
172
|
+
const now = Date.now();
|
|
173
|
+
if (now - lastMigProgressAt >= MIGRATION_PROGRESS_INTERVAL_MS) {
|
|
174
|
+
const elapsed = Math.round((now - migStart) / 1000);
|
|
175
|
+
hint(`Still waiting for migrations… [${elapsed}s]`);
|
|
176
|
+
lastMigProgressAt = now;
|
|
177
|
+
}
|
|
178
|
+
await new Promise((r) => setTimeout(r, MIGRATION_POLL_INTERVAL_MS));
|
|
177
179
|
}
|
|
178
180
|
if (!migReady) {
|
|
179
181
|
console.log(WARN(" ⚠ Migrations not complete — skipping grant-admin (schema not ready)"));
|
|
@@ -337,13 +337,13 @@ export function createCloudApi(registry) {
|
|
|
337
337
|
|
|
338
338
|
app.get("/vm-sizes", (c) => {
|
|
339
339
|
return c.json([
|
|
340
|
-
"
|
|
341
|
-
"
|
|
342
|
-
"
|
|
343
|
-
"
|
|
344
|
-
"
|
|
345
|
-
"
|
|
346
|
-
"
|
|
340
|
+
"Standard_D2s_v3",
|
|
341
|
+
"Standard_D4s_v3",
|
|
342
|
+
"Standard_D8s_v3",
|
|
343
|
+
"Standard_D16s_v3",
|
|
344
|
+
"Standard_D32s_v3",
|
|
345
|
+
"Standard_D48s_v3",
|
|
346
|
+
"Standard_D64s_v3",
|
|
347
347
|
]);
|
|
348
348
|
});
|
|
349
349
|
|
package/src/project.js
CHANGED
|
@@ -41,14 +41,19 @@ function saveProjectRoot(root) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
export function rootDir(cwd = process.cwd()) {
|
|
44
|
-
|
|
45
|
-
// Check FOUNDATION_ROOT env var first (explicit override)
|
|
44
|
+
// FOUNDATION_ROOT always wins — explicit override
|
|
46
45
|
const envRoot = process.env.FOUNDATION_ROOT;
|
|
47
46
|
if (envRoot && isFoundationRoot(envRoot)) {
|
|
48
47
|
return path.resolve(envRoot);
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
const dir = path.resolve(cwd);
|
|
51
|
+
if (isFoundationRoot(dir)) {
|
|
52
|
+
saveProjectRoot(dir);
|
|
53
|
+
return dir;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Fallback: ~/.fops.json saved project root
|
|
52
57
|
try {
|
|
53
58
|
const fopsConfig = JSON.parse(fs.readFileSync(path.join(os.homedir(), ".fops.json"), "utf8"));
|
|
54
59
|
const configRoot = fopsConfig.foundationRoot || fopsConfig.projectRoot;
|
|
@@ -57,12 +62,6 @@ export function rootDir(cwd = process.cwd()) {
|
|
|
57
62
|
}
|
|
58
63
|
} catch {}
|
|
59
64
|
|
|
60
|
-
const dir = path.resolve(cwd);
|
|
61
|
-
if (isFoundationRoot(dir)) {
|
|
62
|
-
saveProjectRoot(dir);
|
|
63
|
-
return dir;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
65
|
// Look one level down — e.g. cwd is ~/code/foundation, find foundation-compose/ inside
|
|
67
66
|
try {
|
|
68
67
|
const entries = fs.readdirSync(dir, { withFileTypes: true });
|