-
Notifications
You must be signed in to change notification settings - Fork 232
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
Support deploying Arroyo to a nomad cluster #50
Conversation
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.
Looks great!
let query = CompileQueryReq::decode(&*query).expect("Failed to decode query request"); | ||
|
||
let resp = service.compile(query).await.unwrap(); | ||
println!( |
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.
should this be an info!()?
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.
It's writing json to std out so that it can be consumed by whatever is calling it. If it were an info!, that would send it to the logging system instead.
@@ -447,6 +448,18 @@ impl ControllerServer { | |||
.create_pool(Some(deadpool_postgres::Runtime::Tokio1), NoTls) | |||
.unwrap(); | |||
|
|||
// test that the DB connection is valid | |||
let _ = pool.get().await.unwrap_or_else(|e| { | |||
panic!( |
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.
Is it standard to panic in these cases, rather than either returning an error or exiting?
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.
Panicing will produce an error and exit. Eventually we'll probably want clearer error handling for users, but while most of our users are going to be developers working on the system I think it's more helpful to have the context that a panic gives you (like the line).
This PR adds a number of improvements that allow an arroyo cluster to be deployed to Nomad. There is a complementary docs PR (ArroyoSystems/arroyo-docs#7) and a new repo (https://github.com/ArroyoSystems/arroyo-nomad-pack) that contains the Nomad orchestration code.
The changes in this PR include:
S3_REGION
andS3_BUCKET
now control all usages of S3ADMIN_PORT
andGRPC_PORT
configurations, and this can be overridden for each services with{SERVICE}_{ADMIN, GRPC}_PORT
, for exampleAPI_ADMIN_PORT
There is also a breaking change. In order to more seamlessly support using a single bucket for artifacts and checkpoints, checkpoint are now stored in
{BUCKET}/{job_id}/checkpoints
. This will break existing jobs that expect checkpoints to be in the former location.