| // Copyright 2019 Google LLC |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| // Schema for config. |
| syntax = "proto2"; |
| |
| package tradefed_cluster.configs; |
| |
| enum OperationMode { |
| UNKNOWN = 0; |
| CLOUD = 1; |
| ON_PREMISE = 2; |
| STANDALONE = 3; |
| } |
| |
| // Config for a lab. |
| message LabConfig { |
| // Lab's name |
| optional string lab_name = 1; |
| // Default username to use when login hosts in the lab. |
| optional string host_login_name = 2; |
| // Owners of the lab. |
| repeated string owners = 3; |
| // Master server the Tradefed connects to. |
| // TODO: Deprecated, use control_server_url instead. |
| optional string master_url = 4; |
| // Docker image to use for the hosts. |
| optional string docker_image = 5; |
| // Enable stackdriver monitor. |
| optional bool enable_stackdriver = 6; |
| // Cluster's configs under the cluster. |
| repeated ClusterConfig cluster_configs = 7; |
| // Enable auto-update daemon. |
| optional bool enable_autoupdate = 8; |
| // The file path of the service account json key. |
| optional string service_account_json_key_path = 9; |
| // Control server the Tradefed connects to. |
| optional string control_server_url = 10; |
| // The docker server from which to download the image. |
| optional string docker_server = 11; |
| // Google Cloud Project for storing secret. |
| optional string secret_project_id = 12; |
| // Secret id for service account key. |
| optional string service_account_key_secret_id = 13; |
| // Service account for the lab. |
| optional string service_account = 14; |
| // Enable host update from UI. |
| optional bool enable_ui_update = 15; |
| // API Key for Android Engprod API discovery. |
| optional string engprod_api_key = 16; |
| // SSH arg when use native ssh. |
| optional string ssh_arg = 17; |
| // Operation mode for all hosts in lab. |
| optional OperationMode operation_mode = 18; |
| } |
| |
| // Config for a cluster. |
| message ClusterConfig { |
| // Cluster's name |
| optional string cluster_name = 1; |
| // Default username to use when login hosts in the cluster. |
| optional string host_login_name = 2; |
| // Owners of the cluster. |
| repeated string owners = 3; |
| // Default tradefed global config path for hosts under the cluster. |
| optional string tf_global_config_path = 4; |
| // Host's configs under the cluster. |
| repeated HostConfig host_configs = 5; |
| // Tmpfs to mount into the container. |
| repeated TmpfsConfig tmpfs_configs = 6; |
| // Master server the Tradefed connects to. |
| // TODO: Deprecated, use control_server_url instead. |
| optional string master_url = 7; |
| // Docker image to use for the host. |
| optional string docker_image = 8; |
| // Wait all tests finish or not. |
| optional bool graceful_shutdown = 9; |
| // Enable stackdriver monitor. |
| optional bool enable_stackdriver = 10; |
| // Enable auto-update daemon. |
| optional bool enable_autoupdate = 11; |
| // Extra docker args |
| repeated string extra_docker_args = 12; |
| // Control server the Tradefed connects to. |
| optional string control_server_url = 13; |
| // The docker server that hosts the image. |
| optional string docker_server = 14; |
| // The max wait timeout to shutdown dockerized TradeFed. |
| optional uint64 shutdown_timeout_sec = 15 [default = 3600]; |
| // Enable host update from UI. |
| optional bool enable_ui_update = 16; |
| // The percentage of hosts being updated concurrently in the cluster. |
| // The actual number of hosts is rounded up to the closest positive integer. |
| // And it will be ignored if not falling into the range of [1, 100]. |
| optional uint32 max_concurrent_update_percentage = 17; |
| } |
| |
| // Config for a host. |
| message HostConfig { |
| // Host's name. |
| optional string hostname = 1; |
| // Host's specific tradefed global config path, override the cluster one. |
| optional string tf_global_config_path = 2; |
| // Username to use to login the host. |
| optional string host_login_name = 3; |
| // Tmpfs to mount into the container. |
| repeated TmpfsConfig tmpfs_configs = 4; |
| // Enable auto-update daemon. |
| optional bool enable_autoupdate = 5; |
| // Docker image to use for the host. |
| optional string docker_image = 6; |
| // The docker server that hosts the image. |
| optional string docker_server = 7; |
| // Enable host update from UI. |
| optional bool enable_ui_update = 8; |
| // Extra docker args |
| repeated string extra_docker_args = 9; |
| // The inventory groups the host belong to. |
| repeated string inventory_groups = 10; |
| // The maximum number of virtual devices that ATS can simultaneously allocate. |
| optional uint32 max_local_virtual_devices = 11; |
| // Wait all tests finish or not. |
| optional bool graceful_shutdown = 12; |
| // The max wait timeout to shutdown dockerized TradeFed. |
| optional uint64 shutdown_timeout_sec = 13; |
| } |
| |
| // Tmpfs to mount in the dockerized tradefed container. |
| message TmpfsConfig { |
| // The mount path inside the container to mount the tmpfs. |
| optional string path = 1; |
| // The size of the tmpfs in bytes. |
| optional int64 size = 2; |
| // Linux file/directory mode for the mounted tmpfs. |
| optional string mode = 3; |
| } |