diff --git a/api/services/elastigroup/aws/responses/elastigroup-deployment-status.yaml b/api/services/elastigroup/aws/responses/elastigroup-deployment-status.yaml index da8cb5eee..da9b460e3 100644 --- a/api/services/elastigroup/aws/responses/elastigroup-deployment-status.yaml +++ b/api/services/elastigroup/aws/responses/elastigroup-deployment-status.yaml @@ -75,6 +75,11 @@ content: progress: unit: percent value: 0 + currentBatch: 1, + numOfBatches: 4 + gracePeriod: 900 + blueInstances: 4 + greenInstances: 1 createdAt: 2018-03-27T19:50:12.000+0000 updatedAt: 2018-03-27T19:50:16.000+0000 - id: sbgd-3ee19606 @@ -82,6 +87,11 @@ content: progress: unit: percent value: 0 + currentBatch: 1, + numOfBatches: 4 + gracePeriod: 900 + blueInstances: 4 + greenInstances: 1 createdAt: 2018-03-27T19:35:41.000+0000 updatedAt: 2018-03-27T19:39:18.000+0000 - id: sbgd-cc4c44e2 @@ -89,6 +99,11 @@ content: progress: unit: percent value: 100 + currentBatch: 1, + numOfBatches: 4 + gracePeriod: 900 + blueInstances: 4 + greenInstances: 1 createdAt: 2018-03-26T19:22:45.000+0000 updatedAt: 2018-03-26T19:26:17.000+0000 - id: sbgd-3f127ed0 @@ -96,6 +111,11 @@ content: progress: unit: percent value: 0 + currentBatch: 1, + numOfBatches: 4 + gracePeriod: 900 + blueInstances: 4 + greenInstances: 1 createdAt: 2018-03-27T19:46:22.000+0000 updatedAt: 2018-03-27T19:46:35.000+0000 count: diff --git a/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example2.yaml b/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example2.yaml index adabe5093..2580db91c 100644 --- a/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example2.yaml +++ b/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example2.yaml @@ -20,6 +20,26 @@ properties: type: integer title: Value example: 0 + currentBatch: + type: integer + title: Current Batch + example: 1 + numOfBatches: + type: integer + title: Number of Batches + example: 4 + gracePeriod: + type: integer + title: Grace Period + example: 900 + blueInstances: + type: integer + title: Blue Instances + example: 4 + greenInstances: + type: integer + title: Green Instances + example: 1 createdAt: type: string title: Created At diff --git a/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example3.yaml b/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example3.yaml index b62fdb9ba..0789a20c3 100644 --- a/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example3.yaml +++ b/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example3.yaml @@ -19,6 +19,26 @@ properties: type: integer title: Value example: 0 + currentBatch: + type: integer + title: Current Batch + example: 1 + numOfBatches: + type: integer + title: Number of Batches + example: 4 + gracePeriod: + type: integer + title: Grace Period + example: 900 + blueInstances: + type: integer + title: Blue Instances + example: 4 + greenInstances: + type: integer + title: Green Instances + example: 1 createdAt: type: string title: Created At diff --git a/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example4.yaml b/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example4.yaml index f80055eac..92ed8f756 100644 --- a/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example4.yaml +++ b/api/services/elastigroup/aws/schemas/elastigroup-deployment-status-example4.yaml @@ -19,6 +19,26 @@ properties: type: integer title: Value example: 100 + currentBatch: + type: integer + title: Current Batch + example: 1 + numOfBatches: + type: integer + title: Number of Batches + example: 4 + gracePeriod: + type: integer + title: Grace Period + example: 900 + blueInstances: + type: integer + title: Blue Instances + example: 4 + greenInstances: + type: integer + title: Green Instances + example: 1 createdAt: type: string title: Created At diff --git a/api/services/elastigroup/aws/schemas/elastigroup-deployment-status.yaml b/api/services/elastigroup/aws/schemas/elastigroup-deployment-status.yaml index a255b0c55..cf77155bb 100644 --- a/api/services/elastigroup/aws/schemas/elastigroup-deployment-status.yaml +++ b/api/services/elastigroup/aws/schemas/elastigroup-deployment-status.yaml @@ -19,6 +19,26 @@ properties: type: integer title: Value example: 0 + currentBatch: + type: integer + title: Current Batch + example: 1 + numOfBatches: + type: integer + title: Number of Batches + example: 4 + gracePeriod: + type: integer + title: Grace Period + example: 900 + blueInstances: + type: integer + title: Blue Instances + example: 4 + greenInstances: + type: integer + title: Green Instances + example: 1 createdAt: type: string title: Created At diff --git a/api/services/ocean/aksV2/schemas/ocean-vmSizes.yaml b/api/services/ocean/aksV2/schemas/ocean-vmSizes.yaml index 17bebb367..9189d5f22 100644 --- a/api/services/ocean/aksV2/schemas/ocean-vmSizes.yaml +++ b/api/services/ocean/aksV2/schemas/ocean-vmSizes.yaml @@ -106,4 +106,12 @@ properties: items: type: string enum: [ "generalPurpose", "memoryOptimized", "computeOptimized", "highPerformanceCompute", "storageOptimized", "GPU" ] - example: [ "memoryOptimized" ] \ No newline at end of file + example: [ "memoryOptimized" ] + gpuTypes: + type: array + description: | + The filtered gpu types will belong to one of the gpu types from this list. + items: + type: string + enum: [ "nvidia-tesla-v100", "amd-radeon-instinct-mi25", "nvidia-a10", "nvidia-tesla-a100", "nvidia-tesla-k80", "nvidia-tesla-m60", "nvidia-tesla-p100", "nvidia-tesla-p40", "nvidia-tesla-t4", "nvidia-tesla-h100"] + example: [ "nvidia-tesla-t4" ] \ No newline at end of file diff --git a/api/services/ocean/cd/schemas/oceanCDArgoRolloutsInfo.yaml b/api/services/ocean/cd/schemas/oceanCDArgoRolloutsInfo.yaml new file mode 100644 index 000000000..773cbd243 --- /dev/null +++ b/api/services/ocean/cd/schemas/oceanCDArgoRolloutsInfo.yaml @@ -0,0 +1,12 @@ +type: object +title: Argo Rollouts Metadata +description: > + Contains Argo Rollouts metadata information. +properties: + argoRolloutVersion: + type: string + lastHeartbeatTime: + type: string + example: "2018-11-05T12:55:50.000Z" + description: > + Time stamp of latest time the operator controller sent heartbeat. \ No newline at end of file diff --git a/api/services/ocean/cd/schemas/oceanCDCluster.yaml b/api/services/ocean/cd/schemas/oceanCDCluster.yaml index 9cf53d843..c643b2c96 100644 --- a/api/services/ocean/cd/schemas/oceanCDCluster.yaml +++ b/api/services/ocean/cd/schemas/oceanCDCluster.yaml @@ -7,9 +7,21 @@ properties: example: "2018-11-05T12:55:50.000Z" description: > Time stamp of latest time the controller sent heartbeat. - controllerInfo: - type: object - $ref: "../schemas/oceanCDControllerInfo.yaml" clusterInfo: type: object - $ref: "../schemas/oceanCDClusterInfo.yaml" \ No newline at end of file + $ref: "../schemas/oceanCDClusterInfo.yaml" + operatorInfo: + type: object + $ref: "../schemas/oceanCDOperatorInfo.yaml" + operatorMetadata: + type: object + $ref: "../schemas/oceanCDOperatorMetadata.yaml" + omInfo: + type: object + $ref: "../schemas/oceanCDOMInfo.yaml" + omMetadata: + type: object + $ref: "../schemas/oceanCDOMMetadata.yaml" + argoRolloutInfo: + type: object + $ref: "../schemas/oceanCDArgoRolloutsInfo.yaml" \ No newline at end of file diff --git a/api/services/ocean/cd/schemas/oceanCDClusterInfo.yaml b/api/services/ocean/cd/schemas/oceanCDClusterInfo.yaml index 87d7ae1ef..61d1a299a 100644 --- a/api/services/ocean/cd/schemas/oceanCDClusterInfo.yaml +++ b/api/services/ocean/cd/schemas/oceanCDClusterInfo.yaml @@ -1,7 +1,7 @@ type: object title: Ocean CD Cluster Info description: > - Contains cluster detailed information. + Contains OceanCD cluster detailed information. properties: kubernetesVersion: type: string diff --git a/api/services/ocean/cd/schemas/oceanCDOMInfo.yaml b/api/services/ocean/cd/schemas/oceanCDOMInfo.yaml new file mode 100644 index 000000000..4c330e11d --- /dev/null +++ b/api/services/ocean/cd/schemas/oceanCDOMInfo.yaml @@ -0,0 +1,13 @@ +type: object +title: Ocean CD Operator Manager Info +description: > + Contains OceanCD operator manager detailed information. +properties: + kubernetesVersion: + type: string + nodeName: + type: string + operatorVersion: + type: string + podName: + type: string \ No newline at end of file diff --git a/api/services/ocean/cd/schemas/oceanCDOMMetadata.yaml b/api/services/ocean/cd/schemas/oceanCDOMMetadata.yaml new file mode 100644 index 000000000..19cfdc5ea --- /dev/null +++ b/api/services/ocean/cd/schemas/oceanCDOMMetadata.yaml @@ -0,0 +1,10 @@ +type: object +title: Ocean CD Operator Maanager Metadata +description: > + Contains OceanCD operator manager metadata information. +properties: + lastHeartbeatTime: + type: string + example: "2018-11-05T12:55:50.000Z" + description: > + Time stamp of latest time the operator manager controller sent heartbeat. \ No newline at end of file diff --git a/api/services/ocean/cd/schemas/oceanCDControllerInfo.yaml b/api/services/ocean/cd/schemas/oceanCDOperatorInfo.yaml similarity index 52% rename from api/services/ocean/cd/schemas/oceanCDControllerInfo.yaml rename to api/services/ocean/cd/schemas/oceanCDOperatorInfo.yaml index 3a41c511b..09997ebb4 100644 --- a/api/services/ocean/cd/schemas/oceanCDControllerInfo.yaml +++ b/api/services/ocean/cd/schemas/oceanCDOperatorInfo.yaml @@ -1,8 +1,10 @@ type: object -title: Ocean CD Controller Info +title: Ocean CD Operator Info description: > - Contains controller detailed information. + Contains OceanCD operator detailed information. properties: + kubernetesVersion: + type: string nodeName: type: string operatorVersion: diff --git a/api/services/ocean/cd/schemas/oceanCDOperatorMetadata.yaml b/api/services/ocean/cd/schemas/oceanCDOperatorMetadata.yaml new file mode 100644 index 000000000..92c2be2b5 --- /dev/null +++ b/api/services/ocean/cd/schemas/oceanCDOperatorMetadata.yaml @@ -0,0 +1,10 @@ +type: object +title: Ocean CD Operator Metadata +description: > + Contains OceanCD operator metadata information. +properties: + lastHeartbeatTime: + type: string + example: "2018-11-05T12:55:50.000Z" + description: > + Time stamp of latest time the operator controller sent heartbeat. \ No newline at end of file diff --git a/api/services/ocean/cd/schemas/oceanCDRolloutStatus.yaml b/api/services/ocean/cd/schemas/oceanCDRolloutStatus.yaml index 4475ebc73..edcc5f060 100644 --- a/api/services/ocean/cd/schemas/oceanCDRolloutStatus.yaml +++ b/api/services/ocean/cd/schemas/oceanCDRolloutStatus.yaml @@ -17,4 +17,5 @@ enum: - aborting - aborted - failurePolicyPausing - - failurePolicyPaused \ No newline at end of file + - failurePolicyPaused + - rolloutInterrupted \ No newline at end of file diff --git a/api/services/ocean/ecs/paths/cluster-launchSpecs.yaml b/api/services/ocean/ecs/paths/cluster-launchSpecs.yaml index cdc8c9441..f678dc92d 100644 --- a/api/services/ocean/ecs/paths/cluster-launchSpecs.yaml +++ b/api/services/ocean/ecs/paths/cluster-launchSpecs.yaml @@ -29,6 +29,13 @@ get: - "Ocean ECS" parameters: - $ref: "../../../../commons/parameters/accountId.yaml" + - in: query + name: oceanId + schema: + type: string + example: o-12345abc + description: > + Identifier of the Ocean cluster. responses: 200: $ref: "../responses/oceanLaunchSpecList.yaml" diff --git a/api/services/ocean/ecs/paths/cluster.yaml b/api/services/ocean/ecs/paths/cluster.yaml index 3ff177d60..0849ab866 100644 --- a/api/services/ocean/ecs/paths/cluster.yaml +++ b/api/services/ocean/ecs/paths/cluster.yaml @@ -32,7 +32,7 @@ put: application/json: schema: allOf: - - $ref: "../schemas/ocean.yaml" + - $ref: "../schemas/ocean-update.yaml" responses: 200: $ref: "../responses/ocean.yaml" diff --git a/api/services/ocean/ecs/paths/clusters.yaml b/api/services/ocean/ecs/paths/clusters.yaml index db22bb92c..cd5c88604 100644 --- a/api/services/ocean/ecs/paths/clusters.yaml +++ b/api/services/ocean/ecs/paths/clusters.yaml @@ -28,7 +28,7 @@ post: application/json: schema: allOf: - - $ref: "../schemas/ocean.yaml" + - $ref: "../schemas/ocean-create.yaml" responses: 200: $ref: "../responses/ocean.yaml" diff --git a/api/services/ocean/ecs/paths/detachInstances.yaml b/api/services/ocean/ecs/paths/detachInstances.yaml new file mode 100644 index 000000000..648e02ff8 --- /dev/null +++ b/api/services/ocean/ecs/paths/detachInstances.yaml @@ -0,0 +1,23 @@ +put: + summary: "Detach Instances" + description: > + Detach instances from your Ocean cluster. + operationId: "oceanEcsDetachInstance" + tags: + - "Ocean ECS" + parameters: + - $ref: "../../../../commons/parameters/accountId.yaml" + - $ref: "../../commons/parameters/oceanId.yaml" + requestBody: + required: true + content: + application/json: + schema: + allOf: + - $ref: "../../aws/schemas/detachInstancesRequest.yaml" + responses: + 200: + $ref: "../responses/detachInstancesResponse.yaml" + 400: + description: "Bad Request" + diff --git a/api/services/ocean/ecs/responses/detachInstancesResponse.yaml b/api/services/ocean/ecs/responses/detachInstancesResponse.yaml new file mode 100644 index 000000000..c471fff46 --- /dev/null +++ b/api/services/ocean/ecs/responses/detachInstancesResponse.yaml @@ -0,0 +1,15 @@ +description: Detach Instances Response +content: + application/json: + schema: + allOf: + - $ref: "../../../../commons/schemas/responseWrapper.yaml" + - type: object + properties: + request: + type: object + properties: + url: + example: "/ocean/aws/ecs/cluster/o-abcd1234/detachInstances" + method: + example: "PUT" diff --git a/api/services/ocean/ecs/responses/ocean.yaml b/api/services/ocean/ecs/responses/ocean.yaml index 705f44533..c3cbe8645 100644 --- a/api/services/ocean/ecs/responses/ocean.yaml +++ b/api/services/ocean/ecs/responses/ocean.yaml @@ -12,6 +12,6 @@ content: items: type: array items: - $ref: "../schemas/ocean.yaml" + $ref: "../schemas/ocean-update.yaml" kind: example: "spotinst:ocean:aws:ecs" diff --git a/api/services/ocean/ecs/schemas/OceanLaunchSpecLaunchContainerInstancesRequest.yaml b/api/services/ocean/ecs/schemas/OceanLaunchSpecLaunchContainerInstancesRequest.yaml index 6bad0bb1d..0c2315720 100644 --- a/api/services/ocean/ecs/schemas/OceanLaunchSpecLaunchContainerInstancesRequest.yaml +++ b/api/services/ocean/ecs/schemas/OceanLaunchSpecLaunchContainerInstancesRequest.yaml @@ -1,4 +1,6 @@ type: object +required: + - launchRequest properties: launchRequest: type: object diff --git a/api/services/ocean/ecs/schemas/launchSpec-blockDeviceMappings.yaml b/api/services/ocean/ecs/schemas/launchSpec-blockDeviceMappings.yaml index 1f32a4454..629a7e4cd 100644 --- a/api/services/ocean/ecs/schemas/launchSpec-blockDeviceMappings.yaml +++ b/api/services/ocean/ecs/schemas/launchSpec-blockDeviceMappings.yaml @@ -56,6 +56,7 @@ items: required: - baseSize - resource + - sizePerResourceUnit description: > Set dynamic volume size properties. When using this object, you cannot use volumeSize. You must use one or the other. properties: diff --git a/api/services/ocean/ecs/schemas/ocean-autoscaler.yaml b/api/services/ocean/ecs/schemas/ocean-autoscaler.yaml index 4915016d3..bf1ee68c0 100644 --- a/api/services/ocean/ecs/schemas/ocean-autoscaler.yaml +++ b/api/services/ocean/ecs/schemas/ocean-autoscaler.yaml @@ -2,8 +2,6 @@ type: object title: Ocean Autoscaler description: > The Ocean ECS Autoscaler. -required: - - isEnabled properties: isEnabled: type: boolean @@ -15,15 +13,6 @@ properties: description: > Cooldown period between scaling actions. Value should be cooldown period in seconds, greater than 180. example: 300 - attributes: - type: object - properties: - key: - type: string - example: the_key - value: - type: string - example: the_value resourceLimits: type: object description: > diff --git a/api/services/ocean/ecs/schemas/ocean-blockDeviceMappings.yaml b/api/services/ocean/ecs/schemas/ocean-blockDeviceMappings.yaml index 410611efb..85f0cbf12 100644 --- a/api/services/ocean/ecs/schemas/ocean-blockDeviceMappings.yaml +++ b/api/services/ocean/ecs/schemas/ocean-blockDeviceMappings.yaml @@ -56,6 +56,7 @@ items: required: - baseSize - resource + - sizePerResourceUnit description: > Set dynamic volume size properties. When using this object, you cannot use volumeSize. You must use one or the other. properties: diff --git a/api/services/ocean/ecs/schemas/ocean-compute.yaml b/api/services/ocean/ecs/schemas/ocean-compute.yaml index 4e7f0fb84..84a806ac4 100644 --- a/api/services/ocean/ecs/schemas/ocean-compute.yaml +++ b/api/services/ocean/ecs/schemas/ocean-compute.yaml @@ -40,7 +40,6 @@ properties: required: - imageId - securityGroupIds - - iamInstanceProfile properties: associatePublicIpAddress: type: boolean @@ -86,7 +85,32 @@ properties: description: | The configuration specified on the Ocean object will function only as a template for virtual node groups. default: false - optimizeImage: + monitoring: + type: boolean + description: Enable detailed monitoring for cluster. + example: false + ebsOptimized: + type: boolean + description: Enable EBS optimization for the cluster. A flag will enable optimized capacity for high bandwidth connectivity to the EB service for non EBS optimized instance types. For instances that are EBS optimized, this flag will be ignored. + example: false + tags: + type: array + description: | + List of kay-value pairs of tags. + items: + type: object + properties: + tagKey: + type: string + description: | + Set the tag key. + example: "Creator" + tagValue: + type: string + description: | + Set the tag value. + example: "John Doe" + optimizeImages: type: object properties: shouldOptimizeEcsAmi: diff --git a/api/services/ocean/ecs/schemas/ocean-create.yaml b/api/services/ocean/ecs/schemas/ocean-create.yaml new file mode 100644 index 000000000..90fd36c40 --- /dev/null +++ b/api/services/ocean/ecs/schemas/ocean-create.yaml @@ -0,0 +1,59 @@ +type: object +required: + - cluster +properties: + cluster: + type: object + title: ECS Ocean + required: + - name + - clusterName + - region + properties: + id: + type: "string" + example: "o-12345abc" + readOnly: true + description: > + Ocean cluster identifier. + name: + type: string + example: "Ocean::my-elastigroup-name" + description: > + Add a name for the Ocean cluster. + clusterName: + type: string + example: "my-ECS-cluster-name" + description: > + ECS cluster name. + autoScaler: + $ref: "../schemas/ocean-autoscaler.yaml" + region: + type: string + example: "us-east-1" + description: > + Select the region for the Ocean cluster to run in. + capacity: + $ref: "../schemas/ocean-capacity.yaml" + strategy: + $ref: "../schemas/ocean-strategy.yaml" + compute: + $ref: "../schemas/ocean-compute.yaml" + scheduling: + $ref: "../schemas/ocean-scheduling.yaml" + logging: + $ref: "../../commons/schemas/logging.yaml" + createdAt: + type: string + readOnly: true + format: date-time + example: "2019-06-03T08:13:08.000Z" + description: > + A timestamp of the Ocean creation. + updatedAt: + type: string + readOnly: true + format: date-time + example: "2019-06-10T15:06:13.000Z" + description: > + A timestamp of the latest Ocean update. diff --git a/api/services/ocean/ecs/schemas/ocean-strategy.yaml b/api/services/ocean/ecs/schemas/ocean-strategy.yaml index f314b3e45..b65c5582d 100644 --- a/api/services/ocean/ecs/schemas/ocean-strategy.yaml +++ b/api/services/ocean/ecs/schemas/ocean-strategy.yaml @@ -2,11 +2,6 @@ type: object title: Ocean Strategy description: > Strategy Configuration of the Ocean cluster. -required: - - utilizeReservedInstances - - fallbackToOd - - spotPercentage - - drainingTimeout properties: utilizeReservedInstances: type: boolean diff --git a/api/services/ocean/ecs/schemas/ocean.yaml b/api/services/ocean/ecs/schemas/ocean-update.yaml similarity index 100% rename from api/services/ocean/ecs/schemas/ocean.yaml rename to api/services/ocean/ecs/schemas/ocean-update.yaml diff --git a/api/services/ocean/ecs/schemas/oceanClusterLaunchSpec.yaml b/api/services/ocean/ecs/schemas/oceanClusterLaunchSpec.yaml index b85ff103c..69bcd19b1 100644 --- a/api/services/ocean/ecs/schemas/oceanClusterLaunchSpec.yaml +++ b/api/services/ocean/ecs/schemas/oceanClusterLaunchSpec.yaml @@ -113,6 +113,8 @@ properties: type: array items: type: object + required: + - numOfUnits properties: cpuPerUnit: description: > diff --git a/api/services/ocean/ecs/schemas/update-roll-status.yaml b/api/services/ocean/ecs/schemas/update-roll-status.yaml index 0543206f5..ca5d74aed 100644 --- a/api/services/ocean/ecs/schemas/update-roll-status.yaml +++ b/api/services/ocean/ecs/schemas/update-roll-status.yaml @@ -1,8 +1,15 @@ type: object properties: - status: - type: string + roll: + type: object + required: + - status description: > Sets the status of the roll. - example: "STOPPED" - enum: [ STOPPED ] + properties: + status: + type: string + enum: [STOPPED] + description: > + Set status of a roll. Valid values: "STOPPED" + example: STOPPED \ No newline at end of file diff --git a/api/spot.yaml b/api/spot.yaml index 8b9c3fcdb..96b67bc6d 100644 --- a/api/spot.yaml +++ b/api/spot.yaml @@ -443,6 +443,8 @@ paths: $ref: services/ocean/ecs/paths/cluster-roll.yaml /ocean/aws/ecs/cluster/{oceanClusterId}/containerInstances: $ref: services/ocean/ecs/paths/cluster-container-instances.yaml + /ocean/aws/ecs/cluster/{oceanClusterId}/detachInstances: + $ref: services/ocean/ecs/paths/detachInstances.yaml /ocean/aws/ecs/launchSpec: $ref: services/ocean/ecs/paths/cluster-launchSpecs.yaml /ocean/aws/ecs/launchSpec/{oceanLaunchSpecId}: