SPB Git

Repository Public

bhs128b.config.cjs 3.5 KB 64 lines javascript

1/**2 * =============================================================================3 *                  SP BOUCHER | SOFTWARE & RESEARCH4 *             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project          : SPSearch8 * File             : deploy/pm2/bhs128b.config.cjs9 * Module           : deploy10 * Repository       : https://git.spboucher.ai/spweb11 * Project Website  : https://search.spboucher.ai12 * Created          : 2026-11-3013 * Last Modified    : 2026-12-0114 *15 * Author           : Simon-Pierre Boucher16 * Position         : Professor of Finance17 * Institution      : Université du Québec en Outaouais (UQO)18 * Organization     : SP Boucher19 * Website          : https://spboucher.ai20 * Git              : https://git.spboucher.ai21 *22 * Preferred Contact: contact@spboucher.ai23 * Development      : dev@spboucher.ai24 * Support          : support@spboucher.ai25 * Security/Admin   : admin@spboucher.ai26 *27 * Copyright (c) 202628 * Simon-Pierre Boucher29 * All rights reserved where applicable. This file is governed by the30 * applicable project license, copyright notices and relevant law.31 * Existing third-party rights and notices remain unaffected.32 *33 * License          : None specified (no license file in this repository)34 *35 * Do not embed credentials, private keys, access tokens,36 * certificates or confidential personal information.37 *38 * =============================================================================39 * END OF SP BOUCHER SOURCE HEADER40 * =============================================================================41 */4243// SPWEB sur BHS128b (Linux, hors mld) : pm2 start deploy/pm2/bhs128b.config.cjs && pm2 save44const HOME = "/home/ubuntu", DIR = HOME + "/apps/spweb", CFG = DIR + "/deploy/config/bhs128b.toml";45const svc = (name, bin, mem, extra = []) => ({46  name, script: `${DIR}/bin/${bin}`, args: ["--config", CFG, ...extra], interpreter: "none", cwd: DIR,47  autorestart: true, max_memory_restart: mem, restart_delay: 5000, kill_timeout: 60000,48  // MALLOC_ARENA_MAX : sans cette borne, glibc ouvre une arène par fil (des centaines de fils bloquants) et la49  // mémoire résidente enfle par fragmentation (coordinateur mesuré à 17 Go pour quelques Go de données).50  env: { HOME, PATH: "/usr/local/bin:/usr/bin:/bin", MALLOC_ARENA_MAX: "4" },51});52module.exports = { apps: [53  svc("spweb-index", "spweb-index-node", "72G"),54  svc("spweb-coordinator", "spweb-bot-coordinator", "56G", ["--seeds", DIR + "/config/seeds.txt"]),55  svc("spweb-search", "spweb-search-api", "2G"),56  svc("spweb-control", "spweb-control-plane", "1G"),57  // Huit robots en parallèle (consigne du 2026-11-30) : chacun prend ses baux chez le coordinateur.58  ...[1, 2, 3, 4, 5, 6, 7, 8].map((i) => svc("spweb-worker-" + i, "spweb-bot-worker", "8G")),59  // Copie de l'index vers le serveur de recherche BHS128, chaque minute (et de la sauvegarde nocturne).60  { name: "spweb-replicate", script: DIR + "/deploy/scripts/replicate.py", interpreter: "python3", cwd: DIR, autorestart: true, restart_delay: 10000,61    env: { HOME, PATH: "/usr/local/bin:/usr/bin:/bin", SPWEB_DATA: HOME + "/spweb-data", SPWEB_REPLICA_RSYNC: "rsync://10.68.0.2", SPWEB_REPLICA_INDEX: "http://10.68.0.2:8912" } },62  { name: "spweb-backup", script: "/bin/bash", args: ["deploy/scripts/backup.sh"], interpreter: "none", cwd: DIR, autorestart: false, cron_restart: "25 3 * * *", env: { HOME, SPWEB_DATA: HOME + "/spweb-data", PATH: "/usr/local/bin:/usr/bin:/bin" } },63] };64
Files main
Menu

Theme