diff --git a/proto/cluster.proto b/proto/cluster.proto new file mode 100644 index 00000000000..3ceda954e91 --- /dev/null +++ b/proto/cluster.proto @@ -0,0 +1,78 @@ +syntax = "proto3"; + +option go_package = "github.com/ray-project/kuberay/proto/go_client"; +package proto; + +import "google/protobuf/timestamp.proto"; + + +message Cluster { + // Required input field. Unique Cluster name provided by user. + string name = 1; + + // Required input field. Cluster's namespace provided by user + string namespace = 2; + + // Required field. This field indicates the user who owns the cluster. + string user = 3; + + // Optional input field. Ray cluster version + string version = 4; + + // Optional field. + enum Environment { + DEV = 0; + TESTING = 1; + STAGING = 2; + PRODUCTION = 3; + } + Environment environment = 5; + + // Required field. This field will be used to retrieve right ray container + string image = 6; + + // Required field. This field indicates ray cluster configuration + ClusterSpec cluster_spec = 7; + + // Output. The time that the Cluster created. + google.protobuf.Timestamp created_at = 8; + + // Output. The time that the Cluster deleted. + google.protobuf.Timestamp deleted_at = 9; +} + +message ClusterSpec { + // The name of the cluster spec + string name = 1; + // The head group configuration + HeadGroupSpec head_group_spec = 2; + // The worker group configurations + repeated WorkerGroupSpec worker_group_sepc = 3; +} + +message HeadGroupSpec { + // Optional. The computeTemplate of head node group + ComputeTemplate resource = 1; + // Optional. The ray start parames of head node group + map ray_start_params = 2; + // Optional. The service type (ClusterIP, NodePort, Load balancer) of the head node + string service_type = 3; + // Output: internal/external service endpoint + string service_address = 4; +} + +message WorkerGroupSpec { + // Required. Group name of the current worker group + string group_name = 1; + // Required. Desired replicas of the worker group + int32 replicas = 2; + // Optional. Min replicas of the worker group + int32 min_replicas = 3; + // Optional. Max replicas of the worker group + int32 max_replicas = 4; + // Optional. The computeTemplate of head node group + ComputeTemplate resource = 5; + // Optional. The ray start parames of worker node group + map ray_start_params = 6; +} + diff --git a/proto/config.proto b/proto/config.proto new file mode 100644 index 00000000000..220e5732d91 --- /dev/null +++ b/proto/config.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +option go_package = "github.com/ray-project/kuberay/proto/go_client"; +package proto; + +// ComputeTemplate can be reused by any compute units like worker group, workspace, image build job, etc +message ComputeTemplate { + // The ID of the compute template + string name = 1; + // Number of cpus + uint32 cpu = 2; + // Number of memory + uint32 memory = 3; + // Number of gpus + uint32 gpu = 4; + // The detail gpu accelerator type + string gpu_accelerator = 5; +} + +// ImageTemplate can be used by worker group and workspce. +// They can be distinguish by different entrypoints +message ImageTemplate { + string id = 1; + string name = 2; + string base_image = 3; + repeated string pip_packages = 4; + repeated string conda_packages = 5; + repeated string system_packages = 6; + map environment_variables = 7; + string custom_commands = 8; + // Output + string image = 9; +} diff --git a/proto/error.proto b/proto/error.proto new file mode 100644 index 00000000000..b2159e28fcb --- /dev/null +++ b/proto/error.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +option go_package = "github.com/ray-project/kuberay/proto/go_client"; +package proto; + +import "google/protobuf/any.proto"; + +message Error { + string error_message = 1; + string error_details = 2; +} + +message Status { + string error = 1; + int32 code = 2; + repeated google.protobuf.Any details = 3; +} +