-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add autoscaler plugin to Hyperflow docker image, add possibility to specify port and host when runnng as server #63
base: master
Are you sure you want to change the base?
Conversation
…pecify port and host when running as server
All changes are fine except the replacement of the base image for the Hyperflow Dockerfile. This is a rather big change, can we add the autoscale plugin as a package? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See remarks inline
|
||
async function k8sCommand(ins, outs, context, cb) { | ||
/** Buffer Manager configuration. */ | ||
const wfId = context.appConfig.wfId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wfId
is available as context.appId
(a different name is used due to historical reasons :-)). So, no need to pass it via appConfig
.
@@ -15,7 +15,8 @@ | |||
var fs = require('fs'), | |||
fsm = require('./automata.js'), | |||
async = require('async'), | |||
eventServerFactory = require('../eventlog'); | |||
eventServerFactory = require('../eventlog'), | |||
removeBufferManager = require('../functions/kubernetes/k8sCommand').removeBufferManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
engine2
is a core module, it would be best not to change it unless absolutely necessary. Creating dependency to a workflow function (which can easily be refactored out to a separate package) is not good.
@@ -151,6 +154,12 @@ Engine.prototype.taskFinished = function(taskId) { | |||
|
|||
Engine.prototype.workflowFinished = function() { | |||
console.log("Workflow ["+this.wfId+"] finished. Exec trace:", this.trace+"." ); | |||
removeBufferManager(this.wfId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new part should be done outside engine2
. The Engine can use eventServer
to publish an event which can be received in another module. Something like eventServer.emit("trace.workflow.finished")
should be okay. See various examples of usage.
|
||
COPY . /hyperflow | ||
RUN npm install -g /hyperflow | ||
|
||
RUN mkdir -p /tmp/kubectl && cd /tmp/kubectl && apk add curl && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this?
@@ -166,6 +167,22 @@ function hflowRun(opts, runCb) { | |||
} | |||
}); | |||
|
|||
if (wfConfig.containerSpec) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering where these containerSpec
files should be published? Perhaps in workflow repositories, e.g. montage2-workflow?
|
||
async function k8sCommand(ins, outs, context, cb) { | ||
/** Buffer Manager configuration. */ | ||
const wfId = context.appConfig.wfId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const wfId = context.appId
!!! Already available!
No description provided.