@joergmittaglawo/dmvconfig
Version:
DMV Configuration scripts for Lawo V__matrix Distributed Multiviewers.
84 lines • 2.44 kB
JavaScript
"use strict";
/**
* Runs the DMV Configuration
* @packageDocumentation
*
* @version 0.0.0-alpha.0
* @date 2020-10-13
* @author Mittag, Jörg (Lawo) <joerg.mittag@lawo.com>
* @license SPDX-License-Identifier: MIT
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.runConfig = void 0;
const vapi_1 = require("vapi");
const vscript_1 = require("vscript");
/**
* The Cluster configuration run function
*/
const cluster_1 = __importDefault(require("./run/cluster"));
/**
* The Heads configuration run function
*/
const heads_1 = __importDefault(require("./run/heads"));
/**
* The Monitoring Objects configuration run function
*/
const mos_1 = __importDefault(require("./run/mos"));
/**
* The Nodes configuration run function
*/
const nodes_1 = __importDefault(require("./run/nodes"));
/**
* The PIP configuration run function
*/
const pip_1 = __importDefault(require("./run/pip"));
/**
* The PTP configuration run function
*/
const ptp_1 = __importDefault(require("./run/ptp"));
/**
* The Sources configuration run function
*/
const sources_1 = __importDefault(require("./run/sources"));
/**
* The towel cleanup function
*/
const towels_1 = __importDefault(require("./run/towels"));
/**
* The DMV configuration run function
*
* @param config The DMV Configuration
*/
async function runConfig(config) {
await nodes_1.default(config);
await ptp_1.default(config);
/**
* Endpoint for the cluster master
*/
const master = await vapi_1.VMatrix.open({ ip: config.masterScriptIp, towel: 'DMV Configuration' });
try {
await master.cluster.global.configuration.lock.write(true);
await cluster_1.default(config, master);
await sources_1.default(config, master);
await mos_1.default(config, master);
await heads_1.default(config, master);
await pip_1.default(config, master);
}
catch (error) {
console.error(error);
}
finally {
await vscript_1.pause(2);
await master.cluster.global.configuration.lock.write(false);
await vscript_1.pause(2);
await master.close();
await vscript_1.pause(2);
await towels_1.default(config);
}
}
exports.runConfig = runConfig;
exports.default = runConfig;
//# sourceMappingURL=run.js.map