From 42a1be9bae3bac9b3693440eeaeba17afce29558 Mon Sep 17 00:00:00 2001 From: shauli Date: Thu, 16 Nov 2023 10:19:31 +0200 Subject: [PATCH 01/21] Revert | Remove the "provisioningModel" SPOT from the import --- .../gke/schemas/oceanGkeImportResponse.yaml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/api/services/ocean/gke/schemas/oceanGkeImportResponse.yaml b/api/services/ocean/gke/schemas/oceanGkeImportResponse.yaml index e2843b2be..3be7c5c26 100644 --- a/api/services/ocean/gke/schemas/oceanGkeImportResponse.yaml +++ b/api/services/ocean/gke/schemas/oceanGkeImportResponse.yaml @@ -38,24 +38,6 @@ properties: $ref: "../schemas/ocean-capacity.yaml" compute: $ref: "../schemas/ocean-compute.yaml" - strategy: - type: object - title: Ocean Strategy - description: | - The Ocean virtual node group strategy object. - properties: - drainingTimeout: - type: integer - default: 120 - example: 120 - description: | - The draining timeout (in seconds) before terminating the instance. - provisioningModel: - type: string - default: "SPOT" - description: | - Define the provisioning model of the launched instances - enum: [ "SPOT", "PREEMPTIBLE" ] customLaunchSpecs: type: array items: From d21c0e15ddcb0ee28030d8277c65b7aa5a993903 Mon Sep 17 00:00:00 2001 From: shauli Date: Wed, 3 Jan 2024 14:34:12 +0200 Subject: [PATCH 02/21] Revert | Remove the "provisioningModel" SPOT from the import --- .../aws/schemas/oceanIAmiAutoUpdate.yaml | 137 ++++++++++++++++++ .../schemas/oceanInstanceTypesFilters.yaml | 2 +- 2 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml diff --git a/api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml b/api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml new file mode 100644 index 000000000..e06035446 --- /dev/null +++ b/api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml @@ -0,0 +1,137 @@ +type: object +description: > + List of filters. The Instance types that match with all filters compose the Ocean's whitelist parameter. + Cannot be configured together with whitelist/blacklist. +title: InstanceTypesFilters +properties: + minVcpu: + type: integer + description: | + Minimum number of vcpus available. + minimum: 0 + example: 2 + maxVcpu: + type: integer + description: | + Maximum number of vcpus available. + minimum: 1 + example: 16 + minMemoryGiB: + type: number + format: double + description: | + Minimum amount of Memory (GiB). + minimum: 0 + example: 8 + maxMemoryGiB: + type: number + format: double + description: | + Maximum amount of Memory (GiB). + minimum: 0 + example: 16 + minGpu: + type: integer + description: | + Minimum total number of GPUs. + minimum: 0 + example: 0 + maxGpu: + type: integer + description: | + Maximum total number of GPUs. + minimum: 1 + example: 4 + includeFamilies: + type: array + description: > + Types belonging to a family from the IncludeFamilies will be available for scaling (asterisk wildcard is also supported). + For example, C* will include instance types from these families: c5, c4, c4a, etc. + items: + type: string + example: [ "c5*", "g5"] + excludeFamilies: + type: array + description: > + Types belonging to a family from the ExcludeFamilies will not be available for scaling (asterisk wildcard is also supported). + For example, C* will exclude instance types from these families: c5, c4, c4a, etc. + items: + type: string + example: [ "t2", "R4*"] + excludeMetal: + type: boolean + default: false + description: | + In case excludeMetal is set to true, metal types will not be available for scaling. + example: true + isEnaSupported: + type: boolean + description: | + Ena is supported or not. + example: true + architectures: + type: array + description: | + The filtered instance types will support at least one of the architectures from this list. + items: + type: string + enum: [ i386, x86_64, arm64 ] + example: [ "i386", "x86_64"] + virtualizationTypes: + type: array + description: | + The filtered instance types will support at least one of the virtualization types from this list. + items: + type: string + enum: [ hvm, paravirtual ] + example: [ "hvm" ] + categories: + type: array + description: | + The filtered instance types will belong to one of the categories types from this list. + items: + type: string + enum: [ Accelerated_computing, Compute_optimized, General_purpose, Memory_optimized, Storage_optimized] + example: [ "Accelerated_computing", "Compute_optimized"] + minEnis: + type: integer + description: | + Minimum number of network interfaces (ENIs). + minimum: 0 + example: 2 + diskTypes: + type: array + description: | + The filtered instance types will have one of the disk type from this list. + items: + type: string + enum: [ NVMe, EBS, SSD, HDD ] + example: [ "NVMe", "EBS"] + hypervisor: + type: array + description: | + The filtered instance types will have a hypervisor type from this list. + items: + type: string + enum: [ nitro, xen ] + example: [ "nitro"] + rootDeviceTypes: + type: array + description: | + The filtered instance types will have a root device types from this list. + items: + type: string + enum: [ ebs, instance-store ] + example: [ "ebs" ] + minNetworkPerformance: + type: integer + description: | + Minimum Bandwidth in Gib/s of network performance. + minimum: 0 + example: 2 + maxNetworkPerformance: + type: integer + description: | + Maximum Bandwidth in Gib/s of network performance. + minimum: 1 + example: 20 \ No newline at end of file diff --git a/api/services/ocean/aws/schemas/oceanInstanceTypesFilters.yaml b/api/services/ocean/aws/schemas/oceanInstanceTypesFilters.yaml index e06035446..27ced29c4 100644 --- a/api/services/ocean/aws/schemas/oceanInstanceTypesFilters.yaml +++ b/api/services/ocean/aws/schemas/oceanInstanceTypesFilters.yaml @@ -2,7 +2,7 @@ type: object description: > List of filters. The Instance types that match with all filters compose the Ocean's whitelist parameter. Cannot be configured together with whitelist/blacklist. -title: InstanceTypesFilters +title: ocean ami auto update properties: minVcpu: type: integer From 824fe0aa8a8e070a94d0846536bc01d13212f9f7 Mon Sep 17 00:00:00 2001 From: shauli Date: Thu, 4 Jan 2024 10:10:17 +0200 Subject: [PATCH 03/21] Revert | Remove the "provisioningModel" SPOT from the import --- .../ocean/aws/paths/amiAutoUpdate.yaml | 22 +++++++++++++++ .../ocean/aws/schemas/AmiAutoUpdate.yaml | 27 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 api/services/ocean/aws/paths/amiAutoUpdate.yaml create mode 100644 api/services/ocean/aws/schemas/AmiAutoUpdate.yaml diff --git a/api/services/ocean/aws/paths/amiAutoUpdate.yaml b/api/services/ocean/aws/paths/amiAutoUpdate.yaml new file mode 100644 index 000000000..01d439909 --- /dev/null +++ b/api/services/ocean/aws/paths/amiAutoUpdate.yaml @@ -0,0 +1,22 @@ +post: + summary: "Ami Auto Update" + description: > + Updates Cluster's VNG's AMI to the latest version available under to the cluster's and VNGs restrictions. + operationId: "oceanAwsAmiAutoUpdate" + tags: + - "Ocean AWS" + parameters: + - $ref: "../../commons/parameters/oceanClusterId.yaml" + - $ref: "../../../../commons/parameters/accountId.yaml" + requestBody: + required: false + content: + application/json: + schema: + allOf: + - $ref: "../schemas/AmiAutoUpdate.yaml" + responses: + 200: + $ref: "../responses/filteredInstanceTypes.yaml" + 400: + description: "Bad Request" diff --git a/api/services/ocean/aws/schemas/AmiAutoUpdate.yaml b/api/services/ocean/aws/schemas/AmiAutoUpdate.yaml new file mode 100644 index 000000000..f7473758f --- /dev/null +++ b/api/services/ocean/aws/schemas/AmiAutoUpdate.yaml @@ -0,0 +1,27 @@ +type: object +description: > + The object specifying the request to trigger an AMI auto update operation +title: AMI Auto Update +required: +properties: + patch: + type: boolean + description: > + enable updating AMI after new patch. + default: false + example: true + minorVersion: + type: boolean + description: > + enable updating AMI when a later AMI's minor version is available. + default: false + example: true + applyRoll: + type: boolean + description: > + enable cluster roll after an AMI was updated + default: false + example: true + clusterRoll: + $ref: "../schemas/ocean-strategy.yaml" + From 48a559b56ccdf47678ec0b69b3b89024c82c77cd Mon Sep 17 00:00:00 2001 From: noamelgarisi Date: Thu, 4 Jan 2024 11:00:07 +0200 Subject: [PATCH 04/21] cr --- api/services/ocean/aws/paths/amiAutoUpdate.yaml | 2 +- api/spot.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/services/ocean/aws/paths/amiAutoUpdate.yaml b/api/services/ocean/aws/paths/amiAutoUpdate.yaml index 01d439909..ad57dbd3a 100644 --- a/api/services/ocean/aws/paths/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/paths/amiAutoUpdate.yaml @@ -1,6 +1,6 @@ post: summary: "Ami Auto Update" - description: > + description: | Updates Cluster's VNG's AMI to the latest version available under to the cluster's and VNGs restrictions. operationId: "oceanAwsAmiAutoUpdate" tags: diff --git a/api/spot.yaml b/api/spot.yaml index c4616fa24..3f74bd2e4 100644 --- a/api/spot.yaml +++ b/api/spot.yaml @@ -513,6 +513,8 @@ paths: $ref: services/ocean/aws/paths/cluster-aggregated-costs.yaml /ocean/aws/k8s/cluster/{oceanClusterId}/aggregatedCosts/summary: $ref: services/ocean/aws/paths/cluster-aggregated-costs-summary.yaml + /ocean/aws/k8s/cluster/{oceanClusterId}/amiAutoUpdate: + $ref: services/ocean/aws/paths/amiAutoUpdate.yaml /ocean/aws/k8s/launchSpec: $ref: services/ocean/aws/paths/clusters-launchSpec.yaml /ocean/aws/k8s/launchSpec/{oceanLaunchSpecId}: From e2cb691d3bcec2ad44ec0f7fc57ce52f17602ed8 Mon Sep 17 00:00:00 2001 From: shauli Date: Thu, 4 Jan 2024 11:05:51 +0200 Subject: [PATCH 05/21] Revert | Remove the "provisioningModel" SPOT from the import --- api/services/ocean/aws/schemas/oceanInstanceTypesFilters.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/services/ocean/aws/schemas/oceanInstanceTypesFilters.yaml b/api/services/ocean/aws/schemas/oceanInstanceTypesFilters.yaml index 27ced29c4..e06035446 100644 --- a/api/services/ocean/aws/schemas/oceanInstanceTypesFilters.yaml +++ b/api/services/ocean/aws/schemas/oceanInstanceTypesFilters.yaml @@ -2,7 +2,7 @@ type: object description: > List of filters. The Instance types that match with all filters compose the Ocean's whitelist parameter. Cannot be configured together with whitelist/blacklist. -title: ocean ami auto update +title: InstanceTypesFilters properties: minVcpu: type: integer From 68747158e897e29d2459b8f527474c532d98c9b0 Mon Sep 17 00:00:00 2001 From: shauli Date: Thu, 4 Jan 2024 16:57:10 +0200 Subject: [PATCH 06/21] Revert | Remove the "provisioningModel" SPOT from the import --- api/services/ocean/aws/paths/amiAutoUpdate.yaml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/api/services/ocean/aws/paths/amiAutoUpdate.yaml b/api/services/ocean/aws/paths/amiAutoUpdate.yaml index ad57dbd3a..29ca81e95 100644 --- a/api/services/ocean/aws/paths/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/paths/amiAutoUpdate.yaml @@ -5,18 +5,4 @@ post: operationId: "oceanAwsAmiAutoUpdate" tags: - "Ocean AWS" - parameters: - - $ref: "../../commons/parameters/oceanClusterId.yaml" - - $ref: "../../../../commons/parameters/accountId.yaml" - requestBody: - required: false - content: - application/json: - schema: - allOf: - - $ref: "../schemas/AmiAutoUpdate.yaml" - responses: - 200: - $ref: "../responses/filteredInstanceTypes.yaml" - 400: - description: "Bad Request" + From c5968db3f663c4582f73f5cb12567bf847a39a59 Mon Sep 17 00:00:00 2001 From: shauli Date: Sun, 7 Jan 2024 17:45:25 +0200 Subject: [PATCH 07/21] ami auto update --- .../ocean/aws/paths/amiAutoUpdate.yaml | 15 ++++++- .../ocean/aws/responses/amiAutoUpdate.yaml | 24 +++++++++++ .../ocean/aws/schemas/AmiAutoUpdate.yaml | 27 ------------ .../ocean/aws/schemas/amiAutoUpdate.yaml | 41 ++++++++++++++++++ .../ocean/aws/schemas/amiAutoUpdateData.yaml | 42 +++++++++++++++++++ .../aws/schemas/amiAutoUpdateSummery.yaml | 42 +++++++++++++++++++ 6 files changed, 163 insertions(+), 28 deletions(-) create mode 100644 api/services/ocean/aws/responses/amiAutoUpdate.yaml delete mode 100644 api/services/ocean/aws/schemas/AmiAutoUpdate.yaml create mode 100644 api/services/ocean/aws/schemas/amiAutoUpdate.yaml create mode 100644 api/services/ocean/aws/schemas/amiAutoUpdateData.yaml create mode 100644 api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml diff --git a/api/services/ocean/aws/paths/amiAutoUpdate.yaml b/api/services/ocean/aws/paths/amiAutoUpdate.yaml index 29ca81e95..e94a98f03 100644 --- a/api/services/ocean/aws/paths/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/paths/amiAutoUpdate.yaml @@ -5,4 +5,17 @@ post: operationId: "oceanAwsAmiAutoUpdate" tags: - "Ocean AWS" - + parameters: + - $ref: "../../../../commons/parameters/accountId.yaml" + requestBody: + required: true + content: + application/json: + schema: + allOf: + - $ref: "../schemas/amiAutoUpdate.yaml" + responses: + 200: + $ref: "../responses/amiAutoUpdate.yaml" + 400: + description: "Bad Request" diff --git a/api/services/ocean/aws/responses/amiAutoUpdate.yaml b/api/services/ocean/aws/responses/amiAutoUpdate.yaml new file mode 100644 index 000000000..52103233d --- /dev/null +++ b/api/services/ocean/aws/responses/amiAutoUpdate.yaml @@ -0,0 +1,24 @@ +description: Ocean Cluster Aggregated Summary Costs Response +content: + application/json: + schema: + allOf: + - $ref: "../../../../commons/schemas/responseItemWrapper.yaml" + - type: object + properties: + request: + type: object + properties: + url: + example: "/ocean/aws/k8s/cluster/o-abcd1234/aggregatedCosts/summary" + method: + example: "POST" + response: + type: object + properties: + items: + type: array + items: + $ref: "../schemas/amiAutoUpdateSummery.yaml" + kind: + example: "ocean:k8s:cluster:amiAutoUpdate:summary" \ No newline at end of file diff --git a/api/services/ocean/aws/schemas/AmiAutoUpdate.yaml b/api/services/ocean/aws/schemas/AmiAutoUpdate.yaml deleted file mode 100644 index f7473758f..000000000 --- a/api/services/ocean/aws/schemas/AmiAutoUpdate.yaml +++ /dev/null @@ -1,27 +0,0 @@ -type: object -description: > - The object specifying the request to trigger an AMI auto update operation -title: AMI Auto Update -required: -properties: - patch: - type: boolean - description: > - enable updating AMI after new patch. - default: false - example: true - minorVersion: - type: boolean - description: > - enable updating AMI when a later AMI's minor version is available. - default: false - example: true - applyRoll: - type: boolean - description: > - enable cluster roll after an AMI was updated - default: false - example: true - clusterRoll: - $ref: "../schemas/ocean-strategy.yaml" - diff --git a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml new file mode 100644 index 000000000..85dabef74 --- /dev/null +++ b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml @@ -0,0 +1,41 @@ +type: object +description: > + The object specifying the request to trigger an AMI auto update operation +title: AMI Auto Update +required: + - patch / minorVersion +properties: + patch: + type: boolean + description: > + Update AMI if a newer patch version is available. + example: "true" + minorVersion: + type: boolean + example: "true" + description: > + Update AMI if a newer AMI minor version is available. + applyRoll: + type: boolean + example: "true" + description: > + Apply a cluster roll after an AMI was updated. + clusterRoll: + type: object + description: cluster roll parameters. + properties: + batchSizePercentage: + type: integer + description: Value as a percent to set the size of a batch in a roll. Valid values are 0-100.. + example: 20 + batchMinHealthyPercentage: + type: integer + description: Indicates the threshold of minimum healthy instances in single batch. If the amount of healthy instances in single batch is under the threshold, the cluster roll will fail. If exists, the parameter value will be in range of 1-100. In case of null as value, the default value in the backend will be 50%. Value of param should represent the number in percentage (%) of the batch.. + example: 100 + comment: + type: string + description: > + Add a brief description for the roll. The comment is limited to 256 chars. + example: "This is why I rolled my cluster." + + diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml new file mode 100644 index 000000000..a2c2b9323 --- /dev/null +++ b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml @@ -0,0 +1,42 @@ +type: object +description: > + Launch spec AMI auto update details +properties: + vngId: + type: string + readOnly: true + example: default + description: | + vng's id. + vngName: + type: string + readOnly: true + example: default + description: | + vng's name. + status: + type: string + readOnly: true + example: UPDATE_SUCCEEDED + description: | + vng's AMI update result. + enum: [ NO_UPDATE_REQUIRED, UPDATE_SUCCEEDED, UPDATE_REQUIRED_BUT_FAILED, FAILED ] + updateType: + type: string + readOnly: true + example: MINOR + description: | + vng's AMI update type. + enum: [ MINOR, PATCH ] + oldAmiId: + type: string + readOnly: true + example: ami-00cd348996bfd7ba8 + description: | + id of the image which were replaced + newAmiId: + type: string + readOnly: true + example: ami-019e5b81636e5a350 + description: | + id of the new image \ No newline at end of file diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml new file mode 100644 index 000000000..acbaa8254 --- /dev/null +++ b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml @@ -0,0 +1,42 @@ +type: object +description: > + Response indicating AMI updated for each cluster's VNGs +title: AMI Auto Update Response +properties: + oceanId: + type: string + readOnly: true + example: o-134abcd + description: | + Ocean cluster identifier. + status: + type: string + description: > + Ami update result. + enum: [ Success, Failed ] + data: + type: array + data: + $ref: "amiAutoUpdateData.yaml" + rollId: + type: string + readOnly: true + example: scr-752331b9 + description: | + id of the cluster roll. + createdAt: + type: string + readOnly: true + example: 2024-01-02T09:57:09.211Z + description: | + indicates the date the AMI update method was executed. + updatedAt: + type: string + readOnly: true + example: 2024-01-02T09:57:09.211Z + description: | + indicates the date the AMI update method was executed. + + + + From 97867f0fdd772f56abd61c08fa817e2d7d40652f Mon Sep 17 00:00:00 2001 From: shauli Date: Sun, 7 Jan 2024 17:53:56 +0200 Subject: [PATCH 08/21] ami auto update --- api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml index acbaa8254..c5e479fa0 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml @@ -16,7 +16,7 @@ properties: enum: [ Success, Failed ] data: type: array - data: + items: $ref: "amiAutoUpdateData.yaml" rollId: type: string From 970924130fcf0d6f12aac97a9739e5fcb7fbef16 Mon Sep 17 00:00:00 2001 From: shauli Date: Sun, 7 Jan 2024 17:57:00 +0200 Subject: [PATCH 09/21] ami auto update --- api/services/ocean/aws/schemas/amiAutoUpdateData.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml index a2c2b9323..2c454a5ad 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml @@ -7,26 +7,26 @@ properties: readOnly: true example: default description: | - vng's id. + VNG's id. vngName: type: string readOnly: true example: default description: | - vng's name. + VNG's name. status: type: string readOnly: true example: UPDATE_SUCCEEDED description: | - vng's AMI update result. + VNG's AMI update result. enum: [ NO_UPDATE_REQUIRED, UPDATE_SUCCEEDED, UPDATE_REQUIRED_BUT_FAILED, FAILED ] updateType: type: string readOnly: true example: MINOR description: | - vng's AMI update type. + VNG's AMI update type. enum: [ MINOR, PATCH ] oldAmiId: type: string From dee851912a62d1ecadc80a705dc7b385ef981a74 Mon Sep 17 00:00:00 2001 From: shauli Date: Mon, 8 Jan 2024 10:51:45 +0200 Subject: [PATCH 10/21] ami auto update --- .../ocean/aws/schemas/ocean-scheduling.yaml | 49 ++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/api/services/ocean/aws/schemas/ocean-scheduling.yaml b/api/services/ocean/aws/schemas/ocean-scheduling.yaml index 6975b848f..4b7ace2a3 100644 --- a/api/services/ocean/aws/schemas/ocean-scheduling.yaml +++ b/api/services/ocean/aws/schemas/ocean-scheduling.yaml @@ -29,7 +29,7 @@ properties: taskType: type: string example: clusterRoll - enum: ["clusterRoll"] + enum: ["clusterRoll", "amiAutoUpdate"] description: > The activity that you are scheduling. Valid values: "clusterRoll". Required for cluster.scheduling.tasks. parameters: @@ -64,6 +64,53 @@ properties: During the roll, if the parameter is set to true we honor PDB during the instance replacement. example: true default: false + amiAutoUpdate: + type: object + properties: + patch: + type: boolean + description: > + Update AMI if a newer patch version is available. + example: "true" + minorVersion: + type: boolean + example: "true" + description: > + Update AMI if a newer AMI minor version is available. + applyRoll: + type: boolean + example: "true" + description: > + Apply a cluster roll after an AMI was updated. + clusterRoll: + type: object + properties: + batchSizePercentage: + type: integer + minimum: 0 + maximum: 100 + example: 20 + description: > + Value as a percent to set the size of a batch in a roll. Valid values are 0-100. + comment: + type: string + example: This is why I deployed my cluster. + description: > + Add a comment description for the roll. The comment is limited to 256 chars + batchMinHealthyPercentage: + type: integer + minimum: 1 + maximum: 100 + default: 50 + example: 100 + description: > + Indicates the threshold of minimum healthy instances in single batch. If the amount of healthy instances in single batch is under the threshold, the cluster roll will fail. If exists, the parameter value will be in range of 1-100. In case of null as value, the default value in the backend will be 50%. Value of param should represent the number in percentage (%) of the batch. + respectPdb: + type: boolean + description: > + During the roll, if the parameter is set to true we honor PDB during the instance replacement. + example: true + default: false shutdownHours: type: object description: > From 24b5dc678eaecb2eb37bcc83cc0999622f11ea33 Mon Sep 17 00:00:00 2001 From: shauli Date: Mon, 8 Jan 2024 11:12:36 +0200 Subject: [PATCH 11/21] ami auto update --- api/services/ocean/aws/schemas/ocean-scheduling.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/services/ocean/aws/schemas/ocean-scheduling.yaml b/api/services/ocean/aws/schemas/ocean-scheduling.yaml index 4b7ace2a3..bd35ceb1d 100644 --- a/api/services/ocean/aws/schemas/ocean-scheduling.yaml +++ b/api/services/ocean/aws/schemas/ocean-scheduling.yaml @@ -28,7 +28,7 @@ properties: Only one of ‘frequency' or ‘cronExpression' can be used at a time. taskType: type: string - example: clusterRoll + example: clusterRoll / amiAutoUpdate enum: ["clusterRoll", "amiAutoUpdate"] description: > The activity that you are scheduling. Valid values: "clusterRoll". Required for cluster.scheduling.tasks. From e60aaa942d71d2520f49daa16c205910c98b6644 Mon Sep 17 00:00:00 2001 From: shauli Date: Mon, 8 Jan 2024 19:02:14 +0200 Subject: [PATCH 12/21] ami auto update --- api/services/ocean/aws/schemas/amiAutoUpdate.yaml | 15 ++++++++------- .../ocean/aws/schemas/amiAutoUpdateData.yaml | 12 ++++++------ .../ocean/aws/schemas/amiAutoUpdateSummery.yaml | 8 ++++---- .../ocean/aws/schemas/ocean-scheduling.yaml | 13 +++++++++---- 4 files changed, 27 insertions(+), 21 deletions(-) diff --git a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml index 85dabef74..778bf9857 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml @@ -2,27 +2,28 @@ type: object description: > The object specifying the request to trigger an AMI auto update operation title: AMI Auto Update -required: - - patch / minorVersion properties: patch: type: boolean - description: > - Update AMI if a newer patch version is available. + description: > + When set to 'true', the auto-update process will update the VNGs’ images with the latest security patches. either "patch" or "minorVersion" must be true example: "true" + default: false minorVersion: type: boolean example: "true" + default: false description: > - Update AMI if a newer AMI minor version is available. + When set to 'true', the auto-update process will update the VNGs’ AMI with the AMI to match the Kubernetes control plane version. either "patch" or "minorVersion" must be true. applyRoll: type: boolean example: "true" + default: false description: > - Apply a cluster roll after an AMI was updated. + This parameter is optional. When the AMI is updated according to the configuration set, a cluster roll can be triggered. clusterRoll: type: object - description: cluster roll parameters. + description: Cluster roll configuration. properties: batchSizePercentage: type: integer diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml index 2c454a5ad..50da0a88e 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml @@ -7,36 +7,36 @@ properties: readOnly: true example: default description: | - VNG's id. + The Virtual Node Group Identifier. vngName: type: string readOnly: true example: default description: | - VNG's name. + The Virtual Node Group name. status: type: string readOnly: true example: UPDATE_SUCCEEDED description: | - VNG's AMI update result. + The AMI update result. enum: [ NO_UPDATE_REQUIRED, UPDATE_SUCCEEDED, UPDATE_REQUIRED_BUT_FAILED, FAILED ] updateType: type: string readOnly: true example: MINOR description: | - VNG's AMI update type. + Virtual Node Group's AMI update type. enum: [ MINOR, PATCH ] oldAmiId: type: string readOnly: true example: ami-00cd348996bfd7ba8 description: | - id of the image which were replaced + The ID of the old AMI that was replaced. newAmiId: type: string readOnly: true example: ami-019e5b81636e5a350 description: | - id of the new image \ No newline at end of file + The ID of the new AMI that is being used for the VNG. \ No newline at end of file diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml index c5e479fa0..8bff08163 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml @@ -1,6 +1,6 @@ type: object description: > - Response indicating AMI updated for each cluster's VNGs + Response indicating AMI updated for each cluster's Virtual Node Groups title: AMI Auto Update Response properties: oceanId: @@ -23,19 +23,19 @@ properties: readOnly: true example: scr-752331b9 description: | - id of the cluster roll. + The ID of the triggered cluster roll. createdAt: type: string readOnly: true example: 2024-01-02T09:57:09.211Z description: | - indicates the date the AMI update method was executed. + The AMI update method was triggered at this time. updatedAt: type: string readOnly: true example: 2024-01-02T09:57:09.211Z description: | - indicates the date the AMI update method was executed. + The AMI update method was triggered at this time. diff --git a/api/services/ocean/aws/schemas/ocean-scheduling.yaml b/api/services/ocean/aws/schemas/ocean-scheduling.yaml index bd35ceb1d..8e2a8ed41 100644 --- a/api/services/ocean/aws/schemas/ocean-scheduling.yaml +++ b/api/services/ocean/aws/schemas/ocean-scheduling.yaml @@ -31,7 +31,7 @@ properties: example: clusterRoll / amiAutoUpdate enum: ["clusterRoll", "amiAutoUpdate"] description: > - The activity that you are scheduling. Valid values: "clusterRoll". Required for cluster.scheduling.tasks. + The activity that you are scheduling. Valid values: "clusterRoll", "amiAutoUpdate". Required for cluster.scheduling.tasks. parameters: type: object properties: @@ -70,18 +70,23 @@ properties: patch: type: boolean description: > - Update AMI if a newer patch version is available. + When set to 'true', the auto-update process will update the VNGs’ images with the latest security patches. + either "patch" or "minorVersion" must be true. example: "true" + default: false minorVersion: type: boolean example: "true" + default: false description: > - Update AMI if a newer AMI minor version is available. + When set to 'true', the auto-update process will update the VNGs’ AMI with the AMI to match the Kubernetes control plane version. + either "patch" or "minorVersion" must be true. applyRoll: type: boolean example: "true" + default: false description: > - Apply a cluster roll after an AMI was updated. + This parameter is optional. When the AMI is updated according to the configuration set, a cluster roll can be triggered. clusterRoll: type: object properties: From a1cbcea7e9e7a0bdc38c9768181b7e3474dfa214 Mon Sep 17 00:00:00 2001 From: shauli Date: Mon, 8 Jan 2024 19:13:42 +0200 Subject: [PATCH 13/21] ami auto update --- api/services/ocean/aws/paths/amiAutoUpdate.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/services/ocean/aws/paths/amiAutoUpdate.yaml b/api/services/ocean/aws/paths/amiAutoUpdate.yaml index e94a98f03..d0ce7c8da 100644 --- a/api/services/ocean/aws/paths/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/paths/amiAutoUpdate.yaml @@ -1,7 +1,7 @@ post: - summary: "Ami Auto Update" + summary: "Initiate EKS AMI Auto Update" description: | - Updates Cluster's VNG's AMI to the latest version available under to the cluster's and VNGs restrictions. + Updates Cluster's Virtual Node Group Image to the latest version available, under the cluster's and the Virtual Node Groups restrictions. operationId: "oceanAwsAmiAutoUpdate" tags: - "Ocean AWS" From eb5531b8757d3d863397ddd473df113e935a74fc Mon Sep 17 00:00:00 2001 From: shauli Date: Tue, 9 Jan 2024 14:42:59 +0200 Subject: [PATCH 14/21] ami auto update --- api/services/ocean/aws/schemas/ocean-scheduling.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/services/ocean/aws/schemas/ocean-scheduling.yaml b/api/services/ocean/aws/schemas/ocean-scheduling.yaml index 8e2a8ed41..cc94f2b8e 100644 --- a/api/services/ocean/aws/schemas/ocean-scheduling.yaml +++ b/api/services/ocean/aws/schemas/ocean-scheduling.yaml @@ -10,7 +10,6 @@ properties: title: Task Definition required: - isEnabled - - cronExpression - taskType properties: isEnabled: @@ -25,7 +24,7 @@ properties: A valid cron expression. For example : " * * * * * ". The cron job runs in UTC time and is in Unix cron format. (See the Cron Expression Validator Script.) - Only one of ‘frequency' or ‘cronExpression' can be used at a time. + Required field for taskType "clusterRoll", optional field for taskType "amiAutoUpdate". taskType: type: string example: clusterRoll / amiAutoUpdate From d361513975d99282a19ee64460d08cb6966a84ab Mon Sep 17 00:00:00 2001 From: shauli Date: Tue, 9 Jan 2024 16:22:59 +0200 Subject: [PATCH 15/21] ami auto update --- api/services/ocean/aws/paths/amiAutoUpdate.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/services/ocean/aws/paths/amiAutoUpdate.yaml b/api/services/ocean/aws/paths/amiAutoUpdate.yaml index d0ce7c8da..a884026bf 100644 --- a/api/services/ocean/aws/paths/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/paths/amiAutoUpdate.yaml @@ -1,7 +1,11 @@ post: summary: "Initiate EKS AMI Auto Update" description: | - Updates Cluster's Virtual Node Group Image to the latest version available, under the cluster's and the Virtual Node Groups restrictions. + Update the Ocean EKS cluster's VNGs with the latest image or the image matching the control plane's version after upgrading, by specifying ‘patch' or 'minorVersion’. + Performing this request will update the VNGs with new AMI if available, and run a cluster roll if set. + If the response is successful, the old and new AMIs will be included in the response along with the updated VNGs. + If a cluster roll is set in the request, the first response for a successful request will indicate the start of a roll. + In order to check the status of the roll, you can use the GET Roll API. operationId: "oceanAwsAmiAutoUpdate" tags: - "Ocean AWS" From 0ceb5a35ff3f4da15c2565e4af16db57ab994c9f Mon Sep 17 00:00:00 2001 From: Moshe Dahan Date: Tue, 9 Jan 2024 21:45:40 +0200 Subject: [PATCH 16/21] [src] cr changes --- api/services/ocean/aws/responses/amiAutoUpdate.yaml | 2 ++ api/services/ocean/aws/schemas/amiAutoUpdate.yaml | 12 +++++++----- .../ocean/aws/schemas/amiAutoUpdateData.yaml | 3 ++- .../ocean/aws/schemas/amiAutoUpdateSummery.yaml | 2 ++ api/services/ocean/aws/schemas/ocean-scheduling.yaml | 2 ++ .../ocean/aws/schemas/oceanIAmiAutoUpdate.yaml | 1 + 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/api/services/ocean/aws/responses/amiAutoUpdate.yaml b/api/services/ocean/aws/responses/amiAutoUpdate.yaml index 52103233d..5d17a7753 100644 --- a/api/services/ocean/aws/responses/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/responses/amiAutoUpdate.yaml @@ -1,4 +1,5 @@ description: Ocean Cluster Aggregated Summary Costs Response +# todo shauli - Aggregated Summary Costs? content: application/json: schema: @@ -11,6 +12,7 @@ content: properties: url: example: "/ocean/aws/k8s/cluster/o-abcd1234/aggregatedCosts/summary" + # todo shauli - aggregatedCosts? method: example: "POST" response: diff --git a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml index 778bf9857..63699bfaa 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml @@ -6,7 +6,7 @@ properties: patch: type: boolean description: > - When set to 'true', the auto-update process will update the VNGs’ images with the latest security patches. either "patch" or "minorVersion" must be true + When set to 'true', the auto-update process will update the VNGs’ images with the latest security patches. Either "patch" or "minorVersion" must be true. example: "true" default: false minorVersion: @@ -14,7 +14,7 @@ properties: example: "true" default: false description: > - When set to 'true', the auto-update process will update the VNGs’ AMI with the AMI to match the Kubernetes control plane version. either "patch" or "minorVersion" must be true. + When set to 'true', the auto-update process will update the VNGs’ AMI with the AMI to match the Kubernetes control plane version. Either "patch" or "minorVersion" must be true. applyRoll: type: boolean example: "true" @@ -27,16 +27,18 @@ properties: properties: batchSizePercentage: type: integer - description: Value as a percent to set the size of a batch in a roll. Valid values are 0-100.. + description: Value as a percent to set the size of a batch in a roll. Valid values are 0-100. example: 20 batchMinHealthyPercentage: type: integer - description: Indicates the threshold of minimum healthy instances in single batch. If the amount of healthy instances in single batch is under the threshold, the cluster roll will fail. If exists, the parameter value will be in range of 1-100. In case of null as value, the default value in the backend will be 50%. Value of param should represent the number in percentage (%) of the batch.. + description: Indicates the threshold of minimum healthy instances in single batch. If the amount of healthy instances in single batch is under the threshold, the cluster roll will fail. If exists, the parameter value will be in range of 1-100. In case of null as value, the default value in the backend will be 50%. Value of param should represent the number in percentage (%) of the batch. example: 100 + #todo shauli - if default exist, add default field. comment: type: string description: > Add a brief description for the roll. The comment is limited to 256 chars. example: "This is why I rolled my cluster." - + #todo shauli - what about respectPdb? + #todo shauli - if possible consider using reference to files under roll folder - let's discuss why that better. diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml index 50da0a88e..dee7bc1bb 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml @@ -39,4 +39,5 @@ properties: readOnly: true example: ami-019e5b81636e5a350 description: | - The ID of the new AMI that is being used for the VNG. \ No newline at end of file + The ID of the new AMI that is being used for the VNG. + #todo shauli - what will it show if it's double ami in the vng? or this is not relevant? \ No newline at end of file diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml index 8bff08163..625d3cc4d 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml @@ -14,6 +14,7 @@ properties: description: > Ami update result. enum: [ Success, Failed ] + #todo shauli - verify lower-upper casing data: type: array items: @@ -30,6 +31,7 @@ properties: example: 2024-01-02T09:57:09.211Z description: | The AMI update method was triggered at this time. + #todo shauli - not create method? updatedAt: type: string readOnly: true diff --git a/api/services/ocean/aws/schemas/ocean-scheduling.yaml b/api/services/ocean/aws/schemas/ocean-scheduling.yaml index cc94f2b8e..0d8d1f0f2 100644 --- a/api/services/ocean/aws/schemas/ocean-scheduling.yaml +++ b/api/services/ocean/aws/schemas/ocean-scheduling.yaml @@ -28,12 +28,14 @@ properties: taskType: type: string example: clusterRoll / amiAutoUpdate + #todo shauli - why both of the enum in the example? there can be only one in a request enum: ["clusterRoll", "amiAutoUpdate"] description: > The activity that you are scheduling. Valid values: "clusterRoll", "amiAutoUpdate". Required for cluster.scheduling.tasks. parameters: type: object properties: + #todo shauli - clusterRoll tree object appears twice in here - verifying this is intentional clusterRoll: type: object properties: diff --git a/api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml b/api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml index e06035446..8c647b39d 100644 --- a/api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml +++ b/api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml @@ -1,4 +1,5 @@ type: object +# todo shauli - typo in file name. who uses this file? description: > List of filters. The Instance types that match with all filters compose the Ocean's whitelist parameter. Cannot be configured together with whitelist/blacklist. From 56174b34920ff39eca5fb7742214b038005be989 Mon Sep 17 00:00:00 2001 From: shauli Date: Wed, 10 Jan 2024 12:25:45 +0200 Subject: [PATCH 17/21] ami auto update --- api/services/ocean/aws/responses/amiAutoUpdate.yaml | 8 ++++---- api/services/ocean/aws/schemas/amiAutoUpdate.yaml | 2 +- api/services/ocean/aws/schemas/amiAutoUpdateData.yaml | 2 +- api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml | 4 ++-- api/services/ocean/aws/schemas/ocean-scheduling.yaml | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/api/services/ocean/aws/responses/amiAutoUpdate.yaml b/api/services/ocean/aws/responses/amiAutoUpdate.yaml index 5d17a7753..a02835447 100644 --- a/api/services/ocean/aws/responses/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/responses/amiAutoUpdate.yaml @@ -1,5 +1,5 @@ -description: Ocean Cluster Aggregated Summary Costs Response -# todo shauli - Aggregated Summary Costs? +description: EKS AMI Auto Update Response +# todo shauli - Aggregated Summary Costs? Fixed content: application/json: schema: @@ -11,8 +11,8 @@ content: type: object properties: url: - example: "/ocean/aws/k8s/cluster/o-abcd1234/aggregatedCosts/summary" - # todo shauli - aggregatedCosts? + example: "/ocean/aws/eks/cluster/o-abcd1234/amiAutoUpdate" + # todo shauli - aggregatedCosts? Fixed method: example: "POST" response: diff --git a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml index 63699bfaa..0b15e201a 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml @@ -33,7 +33,7 @@ properties: type: integer description: Indicates the threshold of minimum healthy instances in single batch. If the amount of healthy instances in single batch is under the threshold, the cluster roll will fail. If exists, the parameter value will be in range of 1-100. In case of null as value, the default value in the backend will be 50%. Value of param should represent the number in percentage (%) of the batch. example: 100 - #todo shauli - if default exist, add default field. + #todo shauli - if default exist, add default field. fixed comment: type: string description: > diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml index dee7bc1bb..03d67509f 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml @@ -40,4 +40,4 @@ properties: example: ami-019e5b81636e5a350 description: | The ID of the new AMI that is being used for the VNG. - #todo shauli - what will it show if it's double ami in the vng? or this is not relevant? \ No newline at end of file + #todo shauli - what will it show if it's double ami in the vng? or this is not relevant? fixed \ No newline at end of file diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml index 625d3cc4d..8fff7c792 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml @@ -14,7 +14,7 @@ properties: description: > Ami update result. enum: [ Success, Failed ] - #todo shauli - verify lower-upper casing + #todo shauli - verify lower-upper casing fixed data: type: array items: @@ -31,7 +31,7 @@ properties: example: 2024-01-02T09:57:09.211Z description: | The AMI update method was triggered at this time. - #todo shauli - not create method? + #todo shauli - not create method? need to discuss updatedAt: type: string readOnly: true diff --git a/api/services/ocean/aws/schemas/ocean-scheduling.yaml b/api/services/ocean/aws/schemas/ocean-scheduling.yaml index 0d8d1f0f2..5c69fc1fe 100644 --- a/api/services/ocean/aws/schemas/ocean-scheduling.yaml +++ b/api/services/ocean/aws/schemas/ocean-scheduling.yaml @@ -28,14 +28,14 @@ properties: taskType: type: string example: clusterRoll / amiAutoUpdate - #todo shauli - why both of the enum in the example? there can be only one in a request + #todo shauli - why both of the enum in the example? there can be only one in a request need to discuss enum: ["clusterRoll", "amiAutoUpdate"] description: > The activity that you are scheduling. Valid values: "clusterRoll", "amiAutoUpdate". Required for cluster.scheduling.tasks. parameters: type: object properties: - #todo shauli - clusterRoll tree object appears twice in here - verifying this is intentional + #todo shauli - clusterRoll tree object appears twice in here - verifying this is intentional need to discuss clusterRoll: type: object properties: From 8bc4b0a640a61578581d4185f63797914af6e413 Mon Sep 17 00:00:00 2001 From: shauli Date: Wed, 10 Jan 2024 12:31:20 +0200 Subject: [PATCH 18/21] ami auto update --- .../ocean/aws/schemas/amiAutoUpdate.yaml | 2 +- .../aws/schemas/oceanIAmiAutoUpdate.yaml | 138 ------------------ 2 files changed, 1 insertion(+), 139 deletions(-) delete mode 100644 api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml diff --git a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml index 0b15e201a..b3e3b0446 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml @@ -39,6 +39,6 @@ properties: description: > Add a brief description for the roll. The comment is limited to 256 chars. example: "This is why I rolled my cluster." - #todo shauli - what about respectPdb? + #todo shauli - what about respectPdb? need to discuss #todo shauli - if possible consider using reference to files under roll folder - let's discuss why that better. diff --git a/api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml b/api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml deleted file mode 100644 index 8c647b39d..000000000 --- a/api/services/ocean/aws/schemas/oceanIAmiAutoUpdate.yaml +++ /dev/null @@ -1,138 +0,0 @@ -type: object -# todo shauli - typo in file name. who uses this file? -description: > - List of filters. The Instance types that match with all filters compose the Ocean's whitelist parameter. - Cannot be configured together with whitelist/blacklist. -title: InstanceTypesFilters -properties: - minVcpu: - type: integer - description: | - Minimum number of vcpus available. - minimum: 0 - example: 2 - maxVcpu: - type: integer - description: | - Maximum number of vcpus available. - minimum: 1 - example: 16 - minMemoryGiB: - type: number - format: double - description: | - Minimum amount of Memory (GiB). - minimum: 0 - example: 8 - maxMemoryGiB: - type: number - format: double - description: | - Maximum amount of Memory (GiB). - minimum: 0 - example: 16 - minGpu: - type: integer - description: | - Minimum total number of GPUs. - minimum: 0 - example: 0 - maxGpu: - type: integer - description: | - Maximum total number of GPUs. - minimum: 1 - example: 4 - includeFamilies: - type: array - description: > - Types belonging to a family from the IncludeFamilies will be available for scaling (asterisk wildcard is also supported). - For example, C* will include instance types from these families: c5, c4, c4a, etc. - items: - type: string - example: [ "c5*", "g5"] - excludeFamilies: - type: array - description: > - Types belonging to a family from the ExcludeFamilies will not be available for scaling (asterisk wildcard is also supported). - For example, C* will exclude instance types from these families: c5, c4, c4a, etc. - items: - type: string - example: [ "t2", "R4*"] - excludeMetal: - type: boolean - default: false - description: | - In case excludeMetal is set to true, metal types will not be available for scaling. - example: true - isEnaSupported: - type: boolean - description: | - Ena is supported or not. - example: true - architectures: - type: array - description: | - The filtered instance types will support at least one of the architectures from this list. - items: - type: string - enum: [ i386, x86_64, arm64 ] - example: [ "i386", "x86_64"] - virtualizationTypes: - type: array - description: | - The filtered instance types will support at least one of the virtualization types from this list. - items: - type: string - enum: [ hvm, paravirtual ] - example: [ "hvm" ] - categories: - type: array - description: | - The filtered instance types will belong to one of the categories types from this list. - items: - type: string - enum: [ Accelerated_computing, Compute_optimized, General_purpose, Memory_optimized, Storage_optimized] - example: [ "Accelerated_computing", "Compute_optimized"] - minEnis: - type: integer - description: | - Minimum number of network interfaces (ENIs). - minimum: 0 - example: 2 - diskTypes: - type: array - description: | - The filtered instance types will have one of the disk type from this list. - items: - type: string - enum: [ NVMe, EBS, SSD, HDD ] - example: [ "NVMe", "EBS"] - hypervisor: - type: array - description: | - The filtered instance types will have a hypervisor type from this list. - items: - type: string - enum: [ nitro, xen ] - example: [ "nitro"] - rootDeviceTypes: - type: array - description: | - The filtered instance types will have a root device types from this list. - items: - type: string - enum: [ ebs, instance-store ] - example: [ "ebs" ] - minNetworkPerformance: - type: integer - description: | - Minimum Bandwidth in Gib/s of network performance. - minimum: 0 - example: 2 - maxNetworkPerformance: - type: integer - description: | - Maximum Bandwidth in Gib/s of network performance. - minimum: 1 - example: 20 \ No newline at end of file From c5b77b841dd5868b7b30cd08b4502c88289bddbd Mon Sep 17 00:00:00 2001 From: shauli Date: Wed, 10 Jan 2024 14:15:14 +0200 Subject: [PATCH 19/21] ami auto update done --- api/services/ocean/aws/responses/amiAutoUpdate.yaml | 2 -- api/services/ocean/aws/schemas/amiAutoUpdate.yaml | 12 +++++++++--- .../ocean/aws/schemas/amiAutoUpdateData.yaml | 1 - .../ocean/aws/schemas/amiAutoUpdateSummery.yaml | 2 -- api/services/ocean/aws/schemas/ocean-scheduling.yaml | 7 ++++--- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/api/services/ocean/aws/responses/amiAutoUpdate.yaml b/api/services/ocean/aws/responses/amiAutoUpdate.yaml index a02835447..ef76541f0 100644 --- a/api/services/ocean/aws/responses/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/responses/amiAutoUpdate.yaml @@ -1,5 +1,4 @@ description: EKS AMI Auto Update Response -# todo shauli - Aggregated Summary Costs? Fixed content: application/json: schema: @@ -12,7 +11,6 @@ content: properties: url: example: "/ocean/aws/eks/cluster/o-abcd1234/amiAutoUpdate" - # todo shauli - aggregatedCosts? Fixed method: example: "POST" response: diff --git a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml index b3e3b0446..d424379d9 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdate.yaml @@ -33,12 +33,18 @@ properties: type: integer description: Indicates the threshold of minimum healthy instances in single batch. If the amount of healthy instances in single batch is under the threshold, the cluster roll will fail. If exists, the parameter value will be in range of 1-100. In case of null as value, the default value in the backend will be 50%. Value of param should represent the number in percentage (%) of the batch. example: 100 - #todo shauli - if default exist, add default field. fixed + minimum: 1 + maximum: 100 + default: 50 comment: type: string description: > Add a brief description for the roll. The comment is limited to 256 chars. example: "This is why I rolled my cluster." - #todo shauli - what about respectPdb? need to discuss - #todo shauli - if possible consider using reference to files under roll folder - let's discuss why that better. + respectPdb: + type: boolean + description: > + During the roll, if the parameter is set to true we honor PDB during the instance replacement. + example: true + default: false diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml index 03d67509f..884df358b 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdateData.yaml @@ -40,4 +40,3 @@ properties: example: ami-019e5b81636e5a350 description: | The ID of the new AMI that is being used for the VNG. - #todo shauli - what will it show if it's double ami in the vng? or this is not relevant? fixed \ No newline at end of file diff --git a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml index 8fff7c792..8bff08163 100644 --- a/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml +++ b/api/services/ocean/aws/schemas/amiAutoUpdateSummery.yaml @@ -14,7 +14,6 @@ properties: description: > Ami update result. enum: [ Success, Failed ] - #todo shauli - verify lower-upper casing fixed data: type: array items: @@ -31,7 +30,6 @@ properties: example: 2024-01-02T09:57:09.211Z description: | The AMI update method was triggered at this time. - #todo shauli - not create method? need to discuss updatedAt: type: string readOnly: true diff --git a/api/services/ocean/aws/schemas/ocean-scheduling.yaml b/api/services/ocean/aws/schemas/ocean-scheduling.yaml index 5c69fc1fe..bf33ba690 100644 --- a/api/services/ocean/aws/schemas/ocean-scheduling.yaml +++ b/api/services/ocean/aws/schemas/ocean-scheduling.yaml @@ -27,15 +27,16 @@ properties: Required field for taskType "clusterRoll", optional field for taskType "amiAutoUpdate". taskType: type: string - example: clusterRoll / amiAutoUpdate - #todo shauli - why both of the enum in the example? there can be only one in a request need to discuss + example: clusterRoll enum: ["clusterRoll", "amiAutoUpdate"] description: > The activity that you are scheduling. Valid values: "clusterRoll", "amiAutoUpdate". Required for cluster.scheduling.tasks. parameters: type: object + description: | + This field will be compatible to the task type field. + If taskType is defined as "clusterRoll", use cluster roll object in parameters. properties: - #todo shauli - clusterRoll tree object appears twice in here - verifying this is intentional need to discuss clusterRoll: type: object properties: From 0cfe73051bd06d00553c675596baa47e3a8420f9 Mon Sep 17 00:00:00 2001 From: shauli Date: Wed, 10 Jan 2024 14:40:15 +0200 Subject: [PATCH 20/21] ami auto update done --- api/services/ocean/aws/paths/amiAutoUpdate.yaml | 2 +- api/services/ocean/aws/responses/amiAutoUpdate.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/services/ocean/aws/paths/amiAutoUpdate.yaml b/api/services/ocean/aws/paths/amiAutoUpdate.yaml index a884026bf..222bd16fb 100644 --- a/api/services/ocean/aws/paths/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/paths/amiAutoUpdate.yaml @@ -1,4 +1,4 @@ -post: +put: summary: "Initiate EKS AMI Auto Update" description: | Update the Ocean EKS cluster's VNGs with the latest image or the image matching the control plane's version after upgrading, by specifying ‘patch' or 'minorVersion’. diff --git a/api/services/ocean/aws/responses/amiAutoUpdate.yaml b/api/services/ocean/aws/responses/amiAutoUpdate.yaml index ef76541f0..b8e59bdb1 100644 --- a/api/services/ocean/aws/responses/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/responses/amiAutoUpdate.yaml @@ -12,7 +12,7 @@ content: url: example: "/ocean/aws/eks/cluster/o-abcd1234/amiAutoUpdate" method: - example: "POST" + example: "PUT" response: type: object properties: From 206143552039906f6c7b943f0f861ab71e71fb5d Mon Sep 17 00:00:00 2001 From: shauli Date: Wed, 10 Jan 2024 14:50:19 +0200 Subject: [PATCH 21/21] ami auto update done --- api/services/ocean/aws/paths/amiAutoUpdate.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/api/services/ocean/aws/paths/amiAutoUpdate.yaml b/api/services/ocean/aws/paths/amiAutoUpdate.yaml index 222bd16fb..a8984c8c9 100644 --- a/api/services/ocean/aws/paths/amiAutoUpdate.yaml +++ b/api/services/ocean/aws/paths/amiAutoUpdate.yaml @@ -10,6 +10,7 @@ put: tags: - "Ocean AWS" parameters: + - $ref: "../../commons/parameters/oceanClusterId.yaml" - $ref: "../../../../commons/parameters/accountId.yaml" requestBody: required: true