dcp-worker 3.3.9-0 → 3.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/dcp-worker +6 -4
- package/etc/dcp-worker-config.js +57 -30
- package/etc/dcp-worker-config.js.md5 +1 -1
- package/package.json +10 -10
package/bin/dcp-worker
CHANGED
|
@@ -31,13 +31,15 @@ const EXIT_UNHANDLED = 5;
|
|
|
31
31
|
const replHelpers = {
|
|
32
32
|
help: {
|
|
33
33
|
report: 'Print a worker status & slice report',
|
|
34
|
-
kill:
|
|
35
|
-
die:
|
|
34
|
+
kill: 'Try to kill the worker',
|
|
35
|
+
die: 'Kill the worker',
|
|
36
|
+
debug: 'Set DCP_DEBUG value and re-initialize debugging scopes',
|
|
36
37
|
},
|
|
37
38
|
commands: {
|
|
38
39
|
report: printReport,
|
|
39
40
|
kill: processExit,
|
|
40
|
-
die: () => worker && worker.stop()
|
|
41
|
+
die: () => worker && worker.stop(),
|
|
42
|
+
debug: (value) => require('dcp/internal/debugging').reinit(value),
|
|
41
43
|
},
|
|
42
44
|
};
|
|
43
45
|
telnetd.init(replHelpers);
|
|
@@ -500,7 +502,7 @@ async function main()
|
|
|
500
502
|
introBanner += ` -\t${wt.name}@${wt.versions.join(';')}\n`;
|
|
501
503
|
}
|
|
502
504
|
|
|
503
|
-
introBanner += ' . Supervisor version: ' + worker.supervisorVersion;
|
|
505
|
+
introBanner += ' . Supervisor version: ' + worker.supervisorVersion + '\n';
|
|
504
506
|
introBanner += ' . Output mode: ' + cliArgs.outputMode + '\n';
|
|
505
507
|
introBanner += ' * Ready' + '\n';
|
|
506
508
|
|
package/etc/dcp-worker-config.js
CHANGED
|
@@ -1,35 +1,60 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file dcp-worker-config.js
|
|
3
|
-
* Default configuration for the standalone DCP Worker package.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* - /
|
|
3
|
+
* Default configuration for the standalone DCP Worker package. Copy this file before
|
|
4
|
+
* modifying so that changes are preserved during the upgrade cycle. If this file is in the
|
|
5
|
+
* "/opt/dcp/.dcp" directory as the result of an application install, do:
|
|
6
|
+
* - sudo --user dcp cp /opt/dcp/.dcp/dcp-worker-config.js /opt/dcp/.dcp/dcp-config.js
|
|
7
|
+
* Otherwise, suggested locations include:
|
|
8
|
+
* - /etc/dcp/dcp-worker/dcp-config.js, or
|
|
7
9
|
* - ~/.dcp/dcp-worker/dcp-config.js.
|
|
8
10
|
*
|
|
9
|
-
* Those files have a higher precedence than the configuration
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* defaults specified here.
|
|
11
|
+
* Those files have a higher precedence than the configuration that ships with the npm
|
|
12
|
+
* package; changes made in those files will be merged into the running configuration,
|
|
13
|
+
* overriding the defaults specified here.
|
|
13
14
|
*
|
|
14
|
-
* Windows users can also affect these changes by adding entries
|
|
15
|
-
*
|
|
16
|
-
* deployment.
|
|
15
|
+
* Windows users can also affect these changes by adding entries to the registry. This is
|
|
16
|
+
* the preferred method for enterprise deployment.
|
|
17
17
|
*
|
|
18
18
|
* @author Wes Garland
|
|
19
19
|
* @date Feb 2021
|
|
20
20
|
*/
|
|
21
21
|
{
|
|
22
|
+
/* The DCP Worker Supervisor spawns evaluator sandboxes that execute job slices. */
|
|
22
23
|
worker: {
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
/* The DCP Bank account where earned funds are deposited by default, of the form:
|
|
25
|
+
* '0x718cABAabA0d3E85292FD8bCFb78B9f0368d612c'.
|
|
26
|
+
*/
|
|
27
|
+
paymentAddress: undefined,
|
|
28
|
+
|
|
29
|
+
/* The number of CPU/GPU cores that the worker can use. */
|
|
30
|
+
/*
|
|
31
|
+
cores: {
|
|
32
|
+
cpu: 7,
|
|
33
|
+
gpu: 1,
|
|
34
|
+
}
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/* The proportion of this machine's cores to use by default. */
|
|
38
|
+
defaultCoreDensity: {
|
|
39
|
+
cpu: 0.9,
|
|
40
|
+
gpu: 0.75,
|
|
41
|
+
},
|
|
25
42
|
|
|
26
|
-
/*
|
|
43
|
+
/* Maximum number of sandboxes that can run at the same time. */
|
|
44
|
+
/*
|
|
45
|
+
maxSandboxes: 10,
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/* Trust the scheduler to modify allowOrigins via Compute Group configuration. */
|
|
49
|
+
trustComputeGroupOrigins: true,
|
|
50
|
+
|
|
51
|
+
/* Allow lists permitting supervisor network access beyond DCP messages to services. */
|
|
27
52
|
allowOrigins: {
|
|
28
|
-
fetchWorkFunctions: [ dcpConfig.scheduler.location.origin ],
|
|
29
|
-
fetchArguments: [ dcpConfig.scheduler.location.origin ],
|
|
30
|
-
fetchData: [ dcpConfig.scheduler.location.origin ],
|
|
31
|
-
sendResults: [ dcpConfig.scheduler.location.origin ],
|
|
32
|
-
any: [],
|
|
53
|
+
fetchWorkFunctions: [ dcpConfig.scheduler.location.origin ], // Can fetch work functions only from these sources
|
|
54
|
+
fetchArguments: [ dcpConfig.scheduler.location.origin ], // Can fetch job arguments only from these sources
|
|
55
|
+
fetchData: [ dcpConfig.scheduler.location.origin ], // Can fetch input set data only from these sources
|
|
56
|
+
sendResults: [ dcpConfig.scheduler.location.origin ], // Can submit results only to these sources
|
|
57
|
+
any: [], // Can fetch anything from these sources
|
|
33
58
|
},
|
|
34
59
|
|
|
35
60
|
/* Vector describing the lowest-value work this worker will accept. */
|
|
@@ -44,23 +69,25 @@
|
|
|
44
69
|
* Distributive and/or local IT staff at site-licensed locations.
|
|
45
70
|
*/
|
|
46
71
|
computeGroups: [
|
|
47
|
-
// { joinKey: '
|
|
48
|
-
// { joinKey: '
|
|
49
|
-
// keystore('~/.dcp/
|
|
72
|
+
// { joinKey: 'demo', joinSecret: 'secret' },
|
|
73
|
+
// { joinKey: 'demo', joinHash: 'eh1-...' },
|
|
74
|
+
// keystore('~/.dcp/demo'),
|
|
50
75
|
],
|
|
51
76
|
|
|
52
|
-
|
|
53
|
-
|
|
77
|
+
/* Can be false to work on any job, or an array of job ID strings (eg.
|
|
78
|
+
* ['0xF9D2...F537']) to restrict work to only these jobs.
|
|
79
|
+
*/
|
|
80
|
+
jobAddresses: false,
|
|
54
81
|
},
|
|
55
82
|
|
|
56
|
-
/* The evaluator is a secure environment
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* will run in the background waiting for it to re-launch when this happens.
|
|
83
|
+
/* The evaluator is a secure environment used by DCP Worker sandboxes. This configuration specifies
|
|
84
|
+
* where this worker's evaluator is listening. Killing the evaluator stops all work from happening on
|
|
85
|
+
* this worker; the worker will run in the background waiting for it to re-launch when this happens.
|
|
60
86
|
*/
|
|
61
87
|
evaluator: {
|
|
62
|
-
listen:
|
|
88
|
+
listen: new URL('dcpsaw://localhost:9000/'),
|
|
63
89
|
},
|
|
64
90
|
|
|
65
|
-
|
|
91
|
+
/* Used to verify that the configuration file was loaded. */
|
|
92
|
+
cookie: require('process').env.DCP_CONFIG_COOKIE,
|
|
66
93
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
8215b6848d83b26af503ed81b87c493c
|
|
2
2
|
### DO NOT MODIFY THIS FILE!!! ###
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dcp-worker",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.10",
|
|
4
4
|
"description": "JavaScript portion of DCP Workers for Node.js",
|
|
5
5
|
"main": "bin/dcp-worker",
|
|
6
6
|
"keywords": [
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "git
|
|
15
|
+
"url": "git@github.com:Distributed-Compute-Labs/dcp-worker.git"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"author": "Kings Distributed Systems",
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
"prepublishOnly": "npm-hooks/prepublish"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"blessed": "
|
|
40
|
+
"blessed": "0.1.81",
|
|
41
41
|
"blessed-contrib": "4.11.0",
|
|
42
|
-
"chalk": "
|
|
43
|
-
"dcp-client": "4.4.9
|
|
44
|
-
"kvin": "
|
|
45
|
-
"posix-getopt": "
|
|
46
|
-
"semver": "
|
|
42
|
+
"chalk": "4.1.0",
|
|
43
|
+
"dcp-client": "4.4.9",
|
|
44
|
+
"kvin": "1.2.7",
|
|
45
|
+
"posix-getopt": "1.2.1",
|
|
46
|
+
"semver": "7.3.8",
|
|
47
47
|
"syslog-client": "1.1.1"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"dbus-next": "
|
|
51
|
-
"telnet-console": "
|
|
50
|
+
"dbus-next": "0.10.2",
|
|
51
|
+
"telnet-console": "1.0.5"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@distributive/eslint-config": "2.1.4",
|