Created
June 11, 2019 14:12
-
-
Save darkdarkdragon/a7ae22246a3399aa6c6971a23fa41ec7 to your computer and use it in GitHub Desktop.
Single Broadcaster testing config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const { exec, spawn } = require('child_process') | |
const Swarm = require('../src/swarm') | |
const { series, eachLimit, parallel } = require('async') | |
const Api = require('../src/api') | |
const TestHarness = require('../src/index') | |
let th = new TestHarness() | |
th.run({ | |
name: 'darkbroad1', | |
// name: 'dark', | |
// local: true, | |
// local: false, | |
email: null, // email to send alerts (from GCE) to | |
// discordUserId: '394997415003815936', // id of Discord user to send alert from Prometheus to (use `Copy ID` on profile to get) | |
discordUserId: null, | |
localBuild: true, | |
// publicImage: 'livepeer/go-livepeer:loki', | |
// publicImage: false, // if true will be used 'livepeer/go-livepeer:edge' or can be set | |
// to any other publicly available image | |
// livepeerBinaryPath: null, // this will use the livepeer binary in the GCP bucket. | |
// livepeerBinaryPath: '/Users/dark/go/src/github.com/livepeer/go-livepeer/linux/livepeer', // this will use the livepeer binary in the GCP bucket. | |
standardSetup: true, // request token, register orchestartors, etc... | |
updateMachines: false, | |
installNodeExporter: true, | |
installGoogleMonitoring: false, | |
metrics: true, | |
noGCPLogging: true, | |
// constrainResources: true, | |
blockchain: { | |
name: 'lpTestNet', | |
networkId: 54321, | |
controllerAddress: '0xA1fe753Fe65002C22dDc7eab29A308f73C7B6982', | |
}, | |
machines: { | |
zone: 'europe-west1-b', | |
// machineType: 'n1-highcpu-2', | |
// machineType: 'n1-highcpu-4', | |
orchestratorMachineType: 'n1-highcpu-2', | |
// machineType: 'n1-highmem-4', | |
// managerMachineType: 'n1-standard-2', | |
managerMachineType: 'n1-highmem-2', | |
broadcasterMachineType: 'n1-highcpu-16', | |
transcoderMachineType: 'n1-highcpu-8', | |
streamerMachineType: 'n1-standard-2', | |
// machineType: 'n1-standard-2' | |
}, | |
nodes: { | |
s_a: { | |
instances: 6, | |
type: 'streamer', | |
// flags: '-v 6 ' | |
}, | |
t_a: { | |
// how many containers to run as transcoders. | |
instances: 0, | |
type: 'transcoder', | |
// these are the livepeer binary flags, add them as you wish. | |
// the test-harness overrides flags that has to do with directories or | |
// ip/port bindings, these are automated. | |
flags: '-v 6 -maxSessions 3 ' | |
}, | |
o_a: { | |
instances: 6, | |
orchSecret: 'o2', | |
type: 'orchestrator', | |
flags: `-v 6 -initializeRound=true -gasPrice 200 -gasLimit 20000000 -maxSessions 40000 -transcoder -fake ` | |
}, | |
broadcasters: { | |
type: 'broadcaster', | |
// googleStorage: { | |
// bucket: 'lptest-fran', | |
// key: 'examples/test-harness-226018-e3a05729b733.json' | |
// }, | |
instances: 1, | |
flags: `-v 6 -gasPrice 200 -gasLimit 2000000 -currentManifest=true -maxSessions 400000 -transcodingOptions P240p30fps16x9,P360p30fps16x9,P720p30fps16x9 ` | |
} | |
} | |
}, (err, experiment) => { | |
if (err) throw err | |
// console.log('experiment:', experiment) | |
console.log('so far so good, manager IP: ', experiment.baseUrl) | |
// return | |
// let api = new Api(experiment.parsedCompose, experiment.baseUrl) | |
// const swarm = new Swarm(experiment.config.name) | |
console.log('done!') | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment