-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the skeleton of the workload-demand algorithm. Currently, we are able to define jobs in a matrix, apply the ensemble.yaml, and then our ensemble member (a minicluster) is created. The sidecar boots up and starts the gRPC server, and the operator connects to it first to get a status (the queue/jobs). At first hit there will be no jobs or anything running. We then check the CRD status and see there are jobs in the matrix. Since this algorithm is retroactive (meaning it just submits a ton of work and then responds to it with scaling and then termination) we submit all the jobs from the matrix, and in the order they are supplied (or extended out). Arguably this could be modified with an option for randomization, by label, etc. The jobs are then submit on the MiniCluster, and we check for subsequent queue status. This is up to where I have implemented for this commit. Next I need to act on the MakeDecision that the algorithm returns after receiving the queue, which will typically be a request to scale up, down, or terminate. More on this tomorrow. Signed-off-by: vsoch <[email protected]>
- Loading branch information
Showing
40 changed files
with
890 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package demand | ||
|
||
// A SubmitRequest includes jobs and counts to submit. | ||
// It will be serialized into the json payload to the gRPC sidecar | ||
type SubmitRequest struct { | ||
Jobs []Job `json:"jobs,omitempty"` | ||
} | ||
|
||
type Job struct { | ||
Name string `json:"name,omitempty"` | ||
Command string `json:"command,omitempty"` | ||
Count int32 `json:"count,omitempty"` | ||
Nodes int32 `json:"nodes,omitempty"` | ||
} | ||
|
||
func (r *SubmitRequest) AddJob(name, command string, count, nodes int32) { | ||
r.Jobs = append(r.Jobs, Job{Name: name, Command: command, Count: count, Nodes: nodes}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.