-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: replace TryCP with Nomad for running scenarios #136
base: main
Are you sure you want to change the base?
Changes from 4 commits
012bd06
efbd0e7
b624276
412fb29
90d2bc2
c868a15
fa99d07
7b21dc1
f5432e0
5e2a205
31d37da
932f154
1babd16
69dc491
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
job "app_install_scenario" { | ||
type = "batch" | ||
group "app_install" { | ||
task "start_holochain" { | ||
lifecycle { | ||
hook = "prestart" | ||
sidecar = true | ||
} | ||
|
||
driver = "raw_exec" | ||
config { | ||
command = "bash" | ||
args = ["-c", "hc s clean && echo 1234 | hc s --piped create && echo 1234 | hc s --piped -f 8888 run"] | ||
} | ||
} | ||
|
||
task "run_scenario" { | ||
driver = "raw_exec" | ||
env { | ||
RUST_LOG = "info" | ||
} | ||
config { | ||
command = abspath("result/bin/app_install") | ||
args = [ | ||
"--connection-string", "ws://localhost:8888", | ||
"--agents", "2", | ||
"--behaviour", "minimal:1", | ||
"--behaviour", "large:1", | ||
"--duration", "5", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this default to a longer time when you're ready to merge this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My idea (already in the latest version) is that if no duration is provided then it is not actually set and so it will use the default provided by the scenario. This could be an issue for neverending scenarios but I think it makes the most sense and we can always kill a running scenario at set the duration if we miss it by accident. |
||
"--no-progress" | ||
] | ||
} | ||
} | ||
} | ||
} |
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.
Will there be a way to have this reference a common path locally and remotely so that we can use the same scripts in dev as on a real environment?
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 hoping to allow this but I'm not yet sure what is the best way. I think at the very least it should be possible to provide either a path or a URL and if it's a URL then the binary gets downloaded as an artefact before being run.