openvibers/openvibe.host Commits
Add Computer host service inventory (#335)
Changes
@@@ -9,7 +9,7 @@ Type=oneshot# Root reads the state and writes the textfile metrics; Chrome runs as the unprivileged ovcheck account# (runuser), never as root. --sites names the watched services (inventory origin or manifest publicOrigin).User=root--ExecStart=/usr/local/bin/ovhost browser-watch --sites live,network,tools,media,community,chat,games,blog,wiki,codes,host,ai,billing,search,sources,news,reviews,deals,coupons,trade,openre,space,bot,events,services,actor,watch,run,food,help,work,quest,rent,media-hub,inventory,play,zone,tips,vip,design,exchange,report,vision,fun,shoes,bench,cam,domains,meme,surf,today,tours,mail++ExecStart=/usr/local/bin/ovhost browser-watch --sites live,network,tools,media,community,chat,games,blog,wiki,codes,host,ai,billing,search,sources,news,reviews,deals,coupons,trade,openre,space,bot,events,services,actor,watch,run,food,help,work,quest,rent,media-hub,inventory,play,zone,tips,vip,design,exchange,report,vision,fun,shoes,bench,cam,domains,meme,surf,today,tours,mail,computerEnvironment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binEnvironment=OVHOST_INVENTORY=/etc/openvibe/host.jsonNice=10@@@ -3050,6 +3050,36 @@]}},++ "computer": {++ "_note": "Added 2026-11-08: OpenVibe.Computer is the thin front door over Run; it keeps no session state of its own.",++ "repo": "/opt/openvibe.computer",++ "units": [++ "openvibe-computer.service"++ ],++ "unitSources": {++ "openvibe-computer.service": "deploy/systemd/openvibe-computer.service"++ },++ "envFile": "/etc/openvibe/computer.env",++ "env": {++ "required": "from-example"++ },++ "port": 5135,++ "ready": {++ "url": "http://127.0.0.1:5135/api/health",++ "timeoutSeconds": 15++ },++ "noRestartPaths": [++ "docs/",++ "test/",++ "**/*.md"++ ],++ "origin": "https://openvibe.computer",++ "nginx": {++ "vhost": "openvibe.computer.conf",++ "repoVhost": "deploy/nginx/openvibe.computer.conf",++ "variant": "http"++ }++ },"services": {"_note": "Added 2026-10-07 (plan T13): OpenVibe.Services on loopback :4930.","repo": "/opt/openvibe.services",@@@ -19,7 +19,7 @@ runTests([const inv = normalise(raw);// Every service on the host (2026-10-15): Sites retired, and the fourteen added since the first copy of this file.assert.deepStrictEqual(Object.keys(inv.services), ['network', 'live', 'media', 'tools', 'community', 'events', 'games', 'host', 'billing', 'chat', 'search', 'sources', 'wiki', 'blog', 'tips', 'vip', 'news', 'reviews', 'deals', 'coupons', 'trade', 'codes', 'ai', 'bot', 'openre',-- 'actor', 'food', 'help', 'work', 'quest', 'rent', 'media-hub', 'inventory', 'play', 'zone', 'watch', 'run', 'services', 'space',++ 'actor', 'food', 'help', 'work', 'quest', 'rent', 'media-hub', 'inventory', 'play', 'zone', 'watch', 'run', 'computer', 'services', 'space','design', 'exchange', 'report', 'vision', 'fun', 'shoes', 'bench', 'cam', 'domains', 'meme', 'surf', 'today', 'tours', 'mail']);assert.ok(Object.values(inv.services).filter((s) => s.databases.length).every((s) => s.drill), 'every service with a database has a restore drill');assert.strictEqual(inv.services.live.socketUnit, 'openvibe-live.socket');nnew file mode 100644@@@ -0,0 +1,24 @@++'use strict';++const assert = require('node:assert/strict');++const fs = require('node:fs');++const path = require('node:path');++const { normalise } = require('../lib/inventory');++const { test, runTests } = require('./helpers');++++const inventory = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'host.example.json'), 'utf8'));++const service = normalise(inventory).services.computer;++++runTests([++ test('Computer can be initialized by ovhost service add on its allocated ports', () => {++ assert.equal(service.repo, '/opt/openvibe.computer');++ assert.deepEqual(service.units, ['openvibe-computer.service']);++ assert.equal(service.envFile, '/etc/openvibe/computer.env');++ assert.equal(service.port, 5135);++ assert.equal(service.origin, 'https://openvibe.computer');++ assert.equal(service.nginx.repoVhost, 'deploy/nginx/openvibe.computer.conf');++ assert.equal(service.ready.url, 'http://127.0.0.1:5135/api/health');++ const servicePorts = Object.values(inventory.services).map((s) => s.port).filter(Boolean);++ assert.equal(servicePorts.filter((p) => p === service.port).length, 1, 'service port is unique');++ assert.equal(service.databases.length, 0, 'Computer stores no data to restore or drill');++ }),++]);
@@ -9,7 +9,7 @@ Type=oneshot
@@ -9,7 +9,7 @@ Type=oneshot
# Root reads the state and writes the textfile metrics; Chrome runs as the unprivileged ovcheck account
# Root reads the state and writes the textfile metrics; Chrome runs as the unprivileged ovcheck account
# (runuser), never as root. --sites names the watched services (inventory origin or manifest publicOrigin).
# (runuser), never as root. --sites names the watched services (inventory origin or manifest publicOrigin).
User=root
User=root
-ExecStart=/usr/local/bin/ovhost browser-watch --sites live,network,tools,media,community,chat,games,blog,wiki,codes,host,ai,billing,search,sources,news,reviews,deals,coupons,trade,openre,space,bot,events,services,actor,watch,run,food,help,work,quest,rent,media-hub,inventory,play,zone,tips,vip,design,exchange,report,vision,fun,shoes,bench,cam,domains,meme,surf,today,tours,mail
+ExecStart=/usr/local/bin/ovhost browser-watch --sites live,network,tools,media,community,chat,games,blog,wiki,codes,host,ai,billing,search,sources,news,reviews,deals,coupons,trade,openre,space,bot,events,services,actor,watch,run,food,help,work,quest,rent,media-hub,inventory,play,zone,tips,vip,design,exchange,report,vision,fun,shoes,bench,cam,domains,meme,surf,today,tours,mail,computer
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Environment=OVHOST_INVENTORY=/etc/openvibe/host.json
Environment=OVHOST_INVENTORY=/etc/openvibe/host.json
Nice=10
Nice=10
@@ -3050,6 +3050,36 @@
@@ -3050,6 +3050,36 @@
]
]
}
}
},
},
+ "computer": {
+ "_note": "Added 2026-11-08: OpenVibe.Computer is the thin front door over Run; it keeps no session state of its own.",
+ "repo": "/opt/openvibe.computer",
+ "units": [
+ "openvibe-computer.service"
+ ],
+ "unitSources": {
+ "openvibe-computer.service": "deploy/systemd/openvibe-computer.service"
+ },
+ "envFile": "/etc/openvibe/computer.env",
+ "env": {
+ "required": "from-example"
+ },
+ "port": 5135,
+ "ready": {
+ "url": "http://127.0.0.1:5135/api/health",
+ "timeoutSeconds": 15
+ },
+ "noRestartPaths": [
+ "docs/",
+ "test/",
+ "**/*.md"
+ ],
+ "origin": "https://openvibe.computer",
+ "nginx": {
+ "vhost": "openvibe.computer.conf",
+ "repoVhost": "deploy/nginx/openvibe.computer.conf",
+ "variant": "http"
+ }
+ },
"services": {
"services": {
"_note": "Added 2026-10-07 (plan T13): OpenVibe.Services on loopback :4930.",
"_note": "Added 2026-10-07 (plan T13): OpenVibe.Services on loopback :4930.",
"repo": "/opt/openvibe.services",
"repo": "/opt/openvibe.services",
@@ -19,7 +19,7 @@ runTests([
@@ -19,7 +19,7 @@ runTests([
const inv = normalise(raw);
const inv = normalise(raw);
// Every service on the host (2026-10-15): Sites retired, and the fourteen added since the first copy of this file.
// Every service on the host (2026-10-15): Sites retired, and the fourteen added since the first copy of this file.
assert.deepStrictEqual(Object.keys(inv.services), ['network', 'live', 'media', 'tools', 'community', 'events', 'games', 'host', 'billing', 'chat', 'search', 'sources', 'wiki', 'blog', 'tips', 'vip', 'news', 'reviews', 'deals', 'coupons', 'trade', 'codes', 'ai', 'bot', 'openre',
assert.deepStrictEqual(Object.keys(inv.services), ['network', 'live', 'media', 'tools', 'community', 'events', 'games', 'host', 'billing', 'chat', 'search', 'sources', 'wiki', 'blog', 'tips', 'vip', 'news', 'reviews', 'deals', 'coupons', 'trade', 'codes', 'ai', 'bot', 'openre',
- 'actor', 'food', 'help', 'work', 'quest', 'rent', 'media-hub', 'inventory', 'play', 'zone', 'watch', 'run', 'services', 'space',
+ 'actor', 'food', 'help', 'work', 'quest', 'rent', 'media-hub', 'inventory', 'play', 'zone', 'watch', 'run', 'computer', 'services', 'space',
'design', 'exchange', 'report', 'vision', 'fun', 'shoes', 'bench', 'cam', 'domains', 'meme', 'surf', 'today', 'tours', 'mail']);
'design', 'exchange', 'report', 'vision', 'fun', 'shoes', 'bench', 'cam', 'domains', 'meme', 'surf', 'today', 'tours', 'mail']);
assert.ok(Object.values(inv.services).filter((s) => s.databases.length).every((s) => s.drill), 'every service with a database has a restore drill');
assert.ok(Object.values(inv.services).filter((s) => s.databases.length).every((s) => s.drill), 'every service with a database has a restore drill');
assert.strictEqual(inv.services.live.socketUnit, 'openvibe-live.socket');
assert.strictEqual(inv.services.live.socketUnit, 'openvibe-live.socket');
new file mode 100644
new file mode 100644
@@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
+'use strict';
+const assert = require('node:assert/strict');
+const fs = require('node:fs');
+const path = require('node:path');
+const { normalise } = require('../lib/inventory');
+const { test, runTests } = require('./helpers');
+
+const inventory = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'host.example.json'), 'utf8'));
+const service = normalise(inventory).services.computer;
+
+runTests([
+ test('Computer can be initialized by ovhost service add on its allocated ports', () => {
+ assert.equal(service.repo, '/opt/openvibe.computer');
+ assert.deepEqual(service.units, ['openvibe-computer.service']);
+ assert.equal(service.envFile, '/etc/openvibe/computer.env');
+ assert.equal(service.port, 5135);
+ assert.equal(service.origin, 'https://openvibe.computer');
+ assert.equal(service.nginx.repoVhost, 'deploy/nginx/openvibe.computer.conf');
+ assert.equal(service.ready.url, 'http://127.0.0.1:5135/api/health');
+ const servicePorts = Object.values(inventory.services).map((s) => s.port).filter(Boolean);
+ assert.equal(servicePorts.filter((p) => p === service.port).length, 1, 'service port is unique');
+ assert.equal(service.databases.length, 0, 'Computer stores no data to restore or drill');
+ }),
+]);