openvibers/openvibe.host Commits
Host: service add lists the monitoring, browser check and restore drill steps a new service needs (#103)
Changes
@@@ -53,6 +53,10 @@ function remainingSetup(id, envFile, envText, provisioned, overridden, netRepo,remaining.push(`service principal (Network's production env; create, or rotate if Network already has ${id}): if ${run} list | grep -Eq '^${id}[[:space:]]'; then verb=rotate; else verb=create; fi; ${run} "$verb" ${id} --env-file ${envFile} # secret never printed`);}remaining.push(`then: ovhost validate ${id}; ovhost deploy ${id} --restart`);++ // Found 2026-10-15: fifteen services added this way were never scraped, watched or drilled.++ remaining.push(`monitoring: regenerate the scrape config from the inventory (scripts/prometheus-config.js > a temp file; promtool check config; install as /etc/prometheus/prometheus.yml; systemctl reload prometheus)`);++ remaining.push(`browser check: add ${id} to --sites in openvibe-browsercheck.service (deploy/systemd) when it has a public site`);++ remaining.push(`restore drill: add a drill block for ${id} (docs/restore-drills.md), then after its first backup: ovhost backup ${id} --logical; ovhost drill ${id}`);return { unset, remaining };}async function add(ctx, id, { selfPath, dryRun = false } = {}) {@@@ -79,6 +79,10 @@ runTests([assert.ok(step.includes('then verb=rotate; else verb=create; fi'), step);assert.ok(step.includes('"$verb" bot --env-file /etc/openvibe/bot.env'), step);assert.match(r.remaining.join('\n'), /ovhost validate bot; ovhost deploy bot --restart/);++ // The steps that were missed for fifteen services: scraping, the browser check and a restore drill.++ assert.match(r.remaining.join('\n'), /prometheus-config\.js/);++ assert.match(r.remaining.join('\n'), /add bot to --sites in openvibe-browsercheck\.service/);++ assert.match(r.remaining.join('\n'), /ovhost backup bot --logical; ovhost drill bot/);const repeat = await cli('service', 'add', 'bot');assert.strictEqual(repeat.code, 1);assert.match(repeat.out, /already exists/);
@@ -53,6 +53,10 @@ function remainingSetup(id, envFile, envText, provisioned, overridden, netRepo,
@@ -53,6 +53,10 @@ function remainingSetup(id, envFile, envText, provisioned, overridden, netRepo,
remaining.push(`service principal (Network's production env; create, or rotate if Network already has ${id}): if ${run} list | grep -Eq '^${id}[[:space:]]'; then verb=rotate; else verb=create; fi; ${run} "$verb" ${id} --env-file ${envFile} # secret never printed`);
remaining.push(`service principal (Network's production env; create, or rotate if Network already has ${id}): if ${run} list | grep -Eq '^${id}[[:space:]]'; then verb=rotate; else verb=create; fi; ${run} "$verb" ${id} --env-file ${envFile} # secret never printed`);
}
}
remaining.push(`then: ovhost validate ${id}; ovhost deploy ${id} --restart`);
remaining.push(`then: ovhost validate ${id}; ovhost deploy ${id} --restart`);
+ // Found 2026-10-15: fifteen services added this way were never scraped, watched or drilled.
+ remaining.push(`monitoring: regenerate the scrape config from the inventory (scripts/prometheus-config.js > a temp file; promtool check config; install as /etc/prometheus/prometheus.yml; systemctl reload prometheus)`);
+ remaining.push(`browser check: add ${id} to --sites in openvibe-browsercheck.service (deploy/systemd) when it has a public site`);
+ remaining.push(`restore drill: add a drill block for ${id} (docs/restore-drills.md), then after its first backup: ovhost backup ${id} --logical; ovhost drill ${id}`);
return { unset, remaining };
return { unset, remaining };
}
}
async function add(ctx, id, { selfPath, dryRun = false } = {}) {
async function add(ctx, id, { selfPath, dryRun = false } = {}) {
@@ -79,6 +79,10 @@ runTests([
@@ -79,6 +79,10 @@ runTests([
assert.ok(step.includes('then verb=rotate; else verb=create; fi'), step);
assert.ok(step.includes('then verb=rotate; else verb=create; fi'), step);
assert.ok(step.includes('"$verb" bot --env-file /etc/openvibe/bot.env'), step);
assert.ok(step.includes('"$verb" bot --env-file /etc/openvibe/bot.env'), step);
assert.match(r.remaining.join('\n'), /ovhost validate bot; ovhost deploy bot --restart/);
assert.match(r.remaining.join('\n'), /ovhost validate bot; ovhost deploy bot --restart/);
+ // The steps that were missed for fifteen services: scraping, the browser check and a restore drill.
+ assert.match(r.remaining.join('\n'), /prometheus-config\.js/);
+ assert.match(r.remaining.join('\n'), /add bot to --sites in openvibe-browsercheck\.service/);
+ assert.match(r.remaining.join('\n'), /ovhost backup bot --logical; ovhost drill bot/);
const repeat = await cli('service', 'add', 'bot');
const repeat = await cli('service', 'add', 'bot');
assert.strictEqual(repeat.code, 1);
assert.strictEqual(repeat.code, 1);
assert.match(repeat.out, /already exists/);
assert.match(repeat.out, /already exists/);