Skip to content

Commit

Permalink
Ocean ECS Specification Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anuragsharma-123 committed Dec 4, 2023
1 parent 404b174 commit 0fb218c
Show file tree
Hide file tree
Showing 14 changed files with 112 additions and 25 deletions.
7 changes: 7 additions & 0 deletions api/services/ocean/ecs/paths/cluster-launchSpecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion api/services/ocean/ecs/paths/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ put:
application/json:
schema:
allOf:
- $ref: "../schemas/ocean.yaml"
- $ref: "../schemas/ocean-update.yaml"
responses:
200:
$ref: "../responses/ocean.yaml"
Expand Down
2 changes: 1 addition & 1 deletion api/services/ocean/ecs/paths/clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ post:
application/json:
schema:
allOf:
- $ref: "../schemas/ocean.yaml"
- $ref: "../schemas/ocean-create.yaml"
responses:
200:
$ref: "../responses/ocean.yaml"
Expand Down
2 changes: 1 addition & 1 deletion api/services/ocean/ecs/responses/ocean.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ content:
items:
type: array
items:
$ref: "../schemas/ocean.yaml"
$ref: "../schemas/ocean-update.yaml"
kind:
example: "spotinst:ocean:aws:ecs"
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
type: object
required:
- launchRequest
properties:
launchRequest:
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 0 additions & 11 deletions api/services/ocean/ecs/schemas/ocean-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ type: object
title: Ocean Autoscaler
description: >
The Ocean ECS Autoscaler.
required:
- isEnabled
properties:
isEnabled:
type: boolean
Expand All @@ -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: >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
28 changes: 26 additions & 2 deletions api/services/ocean/ecs/schemas/ocean-compute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ properties:
required:
- imageId
- securityGroupIds
- iamInstanceProfile
properties:
associatePublicIpAddress:
type: boolean
Expand Down Expand Up @@ -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:
Expand Down
59 changes: 59 additions & 0 deletions api/services/ocean/ecs/schemas/ocean-create.yaml
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 0 additions & 5 deletions api/services/ocean/ecs/schemas/ocean-strategy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions api/services/ocean/ecs/schemas/oceanClusterLaunchSpec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ properties:
type: array
items:
type: object
required:
- numOfUnits
properties:
cpuPerUnit:
description: >
Expand Down
15 changes: 11 additions & 4 deletions api/services/ocean/ecs/schemas/update-roll-status.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0fb218c

Please sign in to comment.