diff --git a/api/server/handlers/project_integration/preflight_check.go b/api/server/handlers/project_integration/preflight_check.go index 986f895750..47d8b9d168 100644 --- a/api/server/handlers/project_integration/preflight_check.go +++ b/api/server/handlers/project_integration/preflight_check.go @@ -58,6 +58,7 @@ var recognizedPreflightCheckKeys = []string{ "cidrAvailability", "iamPermissions", "resourceProviders", + "gpu", } func (p *CreatePreflightCheckHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { diff --git a/dashboard/src/lib/clusters/constants.ts b/dashboard/src/lib/clusters/constants.ts index 7675d11f9e..f7d7eda428 100644 --- a/dashboard/src/lib/clusters/constants.ts +++ b/dashboard/src/lib/clusters/constants.ts @@ -947,6 +947,33 @@ const AWS_VCPUS_QUOTA_RESOLUTION: PreflightCheckResolution = { ], }; +const AWS_GPU_QUOTA_RESOLUTION: PreflightCheckResolution = { + title: "Requesting more GPU-type vCPUs", + subtitle: + "You will need to either request more GPU-type vCPUs or delete existing instances in order to provision in the region specified. You can request more GPU-type vCPUs by following these steps:", + steps: [ + { + text: "Log into your AWS Account", + externalLink: + "https://console.aws.amazon.com/billing/home?region=us-east-1#/account", + }, + { + text: "Navigate to the Amazon Elastic Compute Cloud (Amazon EC2) Service Quotas portal", + externalLink: + "https://us-east-1.console.aws.amazon.com/servicequotas/home/services/ec2/quotas", + }, + { + text: 'Search for "Running On-Demand G and VT instances" in the search box and click on the search result.', + }, + { + text: 'Click on "Request quota increase". In order to provision with Porter, you will need to request the specified number of vCPUs above your current quota limit.', + }, + { + text: "Once that request is approved, return to Porter and retry the provision.", + }, + ], +}; + const SUPPORTED_AWS_PREFLIGHT_CHECKS: PreflightCheck[] = [ { name: "eip", @@ -968,6 +995,11 @@ const SUPPORTED_AWS_PREFLIGHT_CHECKS: PreflightCheck[] = [ displayName: "vCPU availability", resolution: AWS_VCPUS_QUOTA_RESOLUTION, }, + { + name: "gpu", + displayName: "GPU availability", + resolution: AWS_GPU_QUOTA_RESOLUTION, + }, ]; const SUPPORTED_GCP_PREFLIGHT_CHECKS: PreflightCheck[] = [ diff --git a/dashboard/src/lib/clusters/types.ts b/dashboard/src/lib/clusters/types.ts index 03949a195b..752765cbb2 100644 --- a/dashboard/src/lib/clusters/types.ts +++ b/dashboard/src/lib/clusters/types.ts @@ -505,6 +505,7 @@ const preflightCheckKeyValidator = z.enum([ "apiEnabled", "cidrAvailability", "iamPermissions", + "gpu", ]); type PreflightCheckKey = z.infer; export const preflightCheckValidator = z.object({