Skip to content

Commit

Permalink
APPS-8385 Add/remove instance size fields as per new pricing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
greeshmapill committed May 6, 2024
1 parent 20b5ea6 commit b9dd276
Show file tree
Hide file tree
Showing 12 changed files with 152 additions and 96 deletions.
2 changes: 1 addition & 1 deletion specification/resources/apps/apps_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ requestBody:
run_command: bin/api
environment_slug: node-js
instance_count: 2
instance_size_slug: basic-xxs
instance_size_slug: apps-s-1vcpu-0.5gb
routes:
- path: /api
required: true
Expand Down
2 changes: 1 addition & 1 deletion specification/resources/apps/apps_validate_appSpec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ requestBody:
run_command: bin/api
environment_slug: node-js
instance_count: 2
instance_size_slug: basic-xxs
instance_size_slug: apps-s-1vcpu-0.5gb
routes:
- path: /api
app_id: b6bdf840-2854-4f87-a36c-5f231c617c84
Expand Down
2 changes: 1 addition & 1 deletion specification/resources/apps/examples/curl/apps_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ source: |-
"services":[{"name":"api","github":{"branch":"main",\
"deploy_on_push":true,"repo":"digitalocean/sample-golang"}, \
"run_command":"bin/api","environment_slug":"node-js", \
"instance_count":2,"instance_size_slug":"basic-xxs", \
"instance_count":2,"instance_size_slug":"apps-s-1vcpu-0.5gb", \
"routes":[{"path":"/api"}]}]}}'
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ source: |-
"run_command": "bin/api",
"environment_slug": "node-js",
"instance_count": 2,
"instance_size_slug": "basic-xxs",
"instance_size_slug": "apps-s-1vcpu-0.5gb",
"routes": [],
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ source: |-
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
get_resp = client.apps.get_instance_size(slug="basic-xxs")
get_resp = client.apps.get_instance_size(slug="apps-s-1vcpu-0.5gb")
4 changes: 2 additions & 2 deletions specification/resources/apps/examples/python/apps_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ source: |-
},
},
"instance_count": 2,
"instance_size_slug": "basic-xxs",
"instance_size_slug": "apps-s-1vcpu-0.5gb",
"kind": "PRE_DEPLOY",
}
],
Expand Down Expand Up @@ -127,7 +127,7 @@ source: |-
},
},
"instance_count": 2,
"instance_size_slug": "basic-xxs",
"instance_size_slug": "apps-s-1vcpu-0.5gb",
}
],
"functions": [
Expand Down
30 changes: 17 additions & 13 deletions specification/resources/apps/models/app_component_instance_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,25 @@ properties:
example: 2

instance_size_slug:
description: 'The instance size to use for this component. Default: `basic-xxs`'
description: 'The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb`'
type: string
enum:
- basic-xxs
- basic-xs
- basic-s
- basic-m
- professional-xs
- professional-s
- professional-m
- professional-1l
- professional-l
- professional-xl
default: basic-xxs
example: basic-xxs
- apps-s-1vcpu-0.5gb
- apps-s-1vcpu-1gb-fixed
- apps-s-1vcpu-1gb
- apps-s-1vcpu-2gb
- apps-s-2vcpu-4gb
- apps-d-1vcpu-0.5gb
- apps-d-1vcpu-1gb
- apps-d-1vcpu-2gb
- apps-d-1vcpu-4gb
- apps-d-2vcpu-4gb
- apps-d-2vcpu-8gb
- apps-d-4vcpu-8gb
- apps-d-4vcpu-16gb
- apps-d-8vcpu-32gb
default: apps-s-1vcpu-0.5gb
example: apps-s-1vcpu-0.5gb

autoscaling:
description: Configuration for automatically scaling this component based on metrics.
Expand Down
6 changes: 1 addition & 5 deletions specification/resources/apps/models/app_propose_response.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ properties:
app_cost:
type: integer
format: int32
description: The monthly cost of the proposed app in USD using the next
pricing plan tier. For example, if you propose an app that uses the Basic
tier, the `app_tier_upgrade_cost` field displays the monthly cost of the
app if it were to use the Professional tier. If the proposed app already
uses the most expensive tier, the field is empty.
description: The monthly cost of the proposed app in USD.
example: 5

app_tier_downgrade_cost:
Expand Down
19 changes: 18 additions & 1 deletion specification/resources/apps/models/apps_instance_size.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
properties:
bandwidth_allowance_gib:
format: int64
title: The bandwidth allowance in GiB for the instance size
type: string
example: "1"
cpu_type:
$ref: instance_size_cpu_type.yml
cpus:
format: int64
title: The number of allotted vCPU cores
type: string
example: "3"
deprecation_intent:
title: Indicates if the instance size is intended for deprecation
type: boolean
example: true
memory_bytes:
format: int64
title: The allotted memory in bytes
Expand All @@ -15,10 +24,18 @@ properties:
title: A human-readable name of the instance size
type: string
example: name
scalable:
title: Indicates if the instance size can enable autoscaling
type: boolean
example: false
single_instance_only:
title: Indicates if the instance size allows more than one instance
type: boolean
example: true
slug:
title: The slug of the instance size
type: string
example: basic
example: apps-s-1vcpu-1gb
tier_downgrade_to:
title: The slug of the corresponding downgradable instance size on the lower tier
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ properties:
app_name_suggestion:
type: string
example: app name
app_tier_downgrade_cost:
format: float
type: number
example: 12.21
app_tier_upgrade_cost:
format: float
type: number
example: 23.32
existing_static_apps:
format: int64
type: string
Expand Down
2 changes: 1 addition & 1 deletion specification/resources/apps/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ slug_size:
required: true
schema:
type: string
example: basic-xxs
example: apps-s-1vcpu-0.5gb

component:
description: An optional component name. If set, logs will be limited to this component
Expand Down
Loading

0 comments on commit b9dd276

Please sign in to comment.