Skip to content
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

gRPC Assemble and flow #3

Open
mproffitt opened this issue Dec 18, 2021 · 0 comments
Open

gRPC Assemble and flow #3

mproffitt opened this issue Dec 18, 2021 · 0 comments
Labels
enhancement New feature or request structural Represents a structural change to the application

Comments

@mproffitt
Copy link
Member

Following on from #2, in order to rip out the rest api from flow, we need to define a proto interface for handling communication between flow and assemble.

This is likely to require a number of different RPC calls over time and I'm not quite seeing the full requirements but for the moment we at least require:

service Assemble {
    rpc Deploy (Pipeline) returns (stream DeploymentStatus);
    rpc Rollback (Pipeline) returns (stream DeploymentStatus);
    rpc StartQueue (PipelineName) returns (stream QueueStatus);
    rpc StopQueue (PipelineName) returns (QueueStatus);
    rpc NodeDetails returns (stream NodeStatus);
}

message PipelineName {
    string name = 1;
}

message Pipeline {
    string name = 1;

    // contents is the base64 encoded json map
    string contents = 2;
}

message DeploymentStatus {
    repeated Container containers = 1;
    NodeStatus nodestatus = 2;
}

message Container {
    string name = 1;
    int32 requested = 2;
    int32 running = 3;
    int32 failed = 4;
    repeated Pod pods = 5;
}

message Pod {
    string name = 1;
    int32 cpu = 2;
    int32 memory = 3;
    string status = 4;
    string reason = 5;
    Graph cpugraph = 6;
    Graph memorygraph = 7;
}

message Graph {
    repeated float values;
}

message NodeStatus {
    repeated Node nodes = 1;
}

message Node {
    int32 cpu = 1;
    int32 memory = 2;
    repeated Pod pods = 3;
    Graph cpugraph = 4;
    Graph memorygraph = 5;
}

message QueueStatus {
    int32 queued = 1;
    int32 active = 2;
    int32 completed = 3;
}
@mproffitt mproffitt added enhancement New feature or request structural Represents a structural change to the application labels Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request structural Represents a structural change to the application
Projects
None yet
Development

No branches or pull requests

1 participant