Skip to content

Commit aacd325

Browse files
authored
Add support for interactive compute. Closes #1691 (#1693)
* Add event emitter utility * WIP Add basic interactive compute support * WIP interactive compute. Add dependencies and router * misc code cleanup * Combine COMPLETE/CLOSE messages * Refactor tasks in interactive compute * WIP refactor compute backend, client, local compute * Add deepforge serialization files and addArtifact support * Add session.close to interactive sessions * WIP IC Add member method for encoding msgs * WIP IC Throw error on exec w/ non-zero exitCode * WIP IC add session w/ auto queueing support * WIP IC Rename action name in ensureIdle * WIP code cleanup * WIP create server in "before" * Refactor interactive client code (improve testability) * addFile support for interactive sessions * Use Session.new for creation (throws on failure) * Detect compute creation errors * rm old debug logs * Rename start-session.js to start.js * Fixed bugs with start.js code on interactive compute * Send ERROR message on job failure * Combine wss ports. Add DEEPFORGE_INTERACTIVE_COMPUTE_HOST * ensure client ws open before sending * async fn -> fn * use router lifecycle hooks * Update package-lock * Fix tests * Add integration tests and auth for blob client * Add InteractiveComputeHost info to gmeConfig.extensions * Fixed default server URL detection * Update the router to use the interactive compute from the gme config * Remove old debug comments * add start/stop interactive compute logs * Stop the server after the interactive compute integration tests * Remove debug logs
1 parent 776ceae commit aacd325

File tree

26 files changed

+1169
-973
lines changed

26 files changed

+1169
-973
lines changed

config/config.extensions.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
module.exports = config => {
3+
config.extensions = {};
4+
config.extensions.InteractiveComputeHost = process.env.DEEPFORGE_INTERACTIVE_COMPUTE_HOST;
5+
return config;
6+
};

config/config.webgme.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ config.rest.components['SciServerAuth'] = {
5151
mount: 'routers/SciServerAuth',
5252
options: {}
5353
};
54+
config.rest.components['InteractiveCompute'] = {
55+
src: __dirname + '/../src/routers/InteractiveCompute/InteractiveCompute.js',
56+
mount: 'routers/InteractiveCompute',
57+
options: {}
58+
};
5459

5560
// Visualizer descriptors
5661
config.visualization.visualizerDescriptors.push(__dirname + '/../src/visualizers/Visualizers.json');

config/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ var env = process.env.NODE_ENV || 'default',
1111
config = require(configFilename),
1212
validateConfig = require('webgme/config/validator');
1313

14-
validateConfig(configFilename);
14+
validateConfig(config);
15+
config = require(__dirname + '/config.extensions.js')(config);
1516
module.exports = config;

docker/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ services:
99
environment:
1010
- "MONGO_URI=mongodb://mongo:27017/deepforge"
1111
- "DEEPFORGE_HOST=https://dev.deepforge.org"
12+
- "DEEPFORGE_INTERACTIVE_COMPUTE_HOST=https://dev-compute.deepforge.org"
1213
- "DEEPFORGE_PUBLIC_KEY=/token_keys/public_key"
1314
- "DEEPFORGE_PRIVATE_KEY=/token_keys/private_key"
1415
image: deepforge/kitchen-sink:latest
1516
ports:
1617
- "8888:8888"
18+
- "8889:8889"
1719
volumes:
1820
- "$HOME/.deepforge/blob:/data/blob"
1921
- "${TOKEN_KEYS_DIR}:/token_keys"

0 commit comments

Comments
 (0)