|
@@ -11,7 +11,15 @@ import SelectRow from "components/form-components/SelectRow";
|
|
|
import Heading from "components/form-components/Heading";
|
|
import Heading from "components/form-components/Heading";
|
|
|
import Helper from "components/form-components/Helper";
|
|
import Helper from "components/form-components/Helper";
|
|
|
import InputRow from "./form-components/InputRow";
|
|
import InputRow from "./form-components/InputRow";
|
|
|
-import { Contract, EnumKubernetesKind, EnumCloudProvider, NodeGroupType, EKSNodeGroup, EKS, Cluster } from "@porter-dev/api-contracts";
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ Contract,
|
|
|
|
|
+ EnumKubernetesKind,
|
|
|
|
|
+ EnumCloudProvider,
|
|
|
|
|
+ NodeGroupType,
|
|
|
|
|
+ EKSNodeGroup,
|
|
|
|
|
+ EKS,
|
|
|
|
|
+ Cluster,
|
|
|
|
|
+} from "@porter-dev/api-contracts";
|
|
|
import { ClusterType } from "shared/types";
|
|
import { ClusterType } from "shared/types";
|
|
|
import Button from "./porter/Button";
|
|
import Button from "./porter/Button";
|
|
|
import Error from "./porter/Error";
|
|
import Error from "./porter/Error";
|
|
@@ -57,11 +65,12 @@ const clusterVersionOptions = [
|
|
|
|
|
|
|
|
type Props = RouteComponentProps & {
|
|
type Props = RouteComponentProps & {
|
|
|
selectedClusterVersion?: Contract;
|
|
selectedClusterVersion?: Contract;
|
|
|
|
|
+ provisionerError?: string;
|
|
|
credentialId: string;
|
|
credentialId: string;
|
|
|
clusterId?: number;
|
|
clusterId?: number;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const ProvisionerSettings: React.FC<Props> = props => {
|
|
|
|
|
|
|
+const ProvisionerSettings: React.FC<Props> = (props) => {
|
|
|
const {
|
|
const {
|
|
|
user,
|
|
user,
|
|
|
currentProject,
|
|
currentProject,
|
|
@@ -92,20 +101,26 @@ const ProvisionerSettings: React.FC<Props> = props => {
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
console.log(err);
|
|
console.log(err);
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
const getStatus = () => {
|
|
const getStatus = () => {
|
|
|
if (isReadOnly) {
|
|
if (isReadOnly) {
|
|
|
- return "Provisioning is still in progress..."
|
|
|
|
|
|
|
+ return "Provisioning is still in progress...";
|
|
|
} else if (errorMessage) {
|
|
} else if (errorMessage) {
|
|
|
- return <Error
|
|
|
|
|
- message={errorMessage}
|
|
|
|
|
- ctaText={errorMessage !== DEFAULT_ERROR_MESSAGE ? "Troubleshooting steps" : null}
|
|
|
|
|
- errorModalContents={errorMessageToModal(errorMessage)}
|
|
|
|
|
- />;
|
|
|
|
|
|
|
+ return (
|
|
|
|
|
+ <Error
|
|
|
|
|
+ message={errorMessage}
|
|
|
|
|
+ ctaText={
|
|
|
|
|
+ errorMessage !== DEFAULT_ERROR_MESSAGE
|
|
|
|
|
+ ? "Troubleshooting steps"
|
|
|
|
|
+ : null
|
|
|
|
|
+ }
|
|
|
|
|
+ errorModalContents={errorMessageToModal(errorMessage)}
|
|
|
|
|
+ />
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
return undefined;
|
|
return undefined;
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
const createCluster = async () => {
|
|
const createCluster = async () => {
|
|
|
markProvisioningStarted();
|
|
markProvisioningStarted();
|
|
@@ -144,11 +159,11 @@ const ProvisionerSettings: React.FC<Props> = props => {
|
|
|
maxInstances: maxInstances || 10,
|
|
maxInstances: maxInstances || 10,
|
|
|
nodeGroupType: NodeGroupType.APPLICATION,
|
|
nodeGroupType: NodeGroupType.APPLICATION,
|
|
|
isStateful: false,
|
|
isStateful: false,
|
|
|
- })
|
|
|
|
|
- ]
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ }),
|
|
|
|
|
+ ],
|
|
|
|
|
+ }),
|
|
|
},
|
|
},
|
|
|
- })
|
|
|
|
|
|
|
+ }),
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
if (props.clusterId) {
|
|
if (props.clusterId) {
|
|
@@ -156,34 +171,28 @@ const ProvisionerSettings: React.FC<Props> = props => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
- setIsReadOnly(true)
|
|
|
|
|
- setErrorMessage(undefined)
|
|
|
|
|
- await api
|
|
|
|
|
- .preflightCheckAWSUsage(
|
|
|
|
|
- "<token>",
|
|
|
|
|
- {
|
|
|
|
|
- target_arn: props.credentialId,
|
|
|
|
|
- region: awsRegion
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- id: currentProject.id,
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
- const res = await api.createContract(
|
|
|
|
|
|
|
+ setIsReadOnly(true);
|
|
|
|
|
+ setErrorMessage(undefined);
|
|
|
|
|
+ await api.preflightCheckAWSUsage(
|
|
|
"<token>",
|
|
"<token>",
|
|
|
- data,
|
|
|
|
|
- { project_id: currentProject.id }
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ target_arn: props.credentialId,
|
|
|
|
|
+ region: awsRegion,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ id: currentProject.id,
|
|
|
|
|
+ }
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+ const res = await api.createContract("<token>", data, {
|
|
|
|
|
+ project_id: currentProject.id,
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
// Only refresh and set clusters on initial create
|
|
// Only refresh and set clusters on initial create
|
|
|
if (!props.clusterId) {
|
|
if (!props.clusterId) {
|
|
|
setShouldRefreshClusters(true);
|
|
setShouldRefreshClusters(true);
|
|
|
- api.getClusters(
|
|
|
|
|
- "<token>",
|
|
|
|
|
- {},
|
|
|
|
|
- { id: currentProject.id },
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ api
|
|
|
|
|
+ .getClusters("<token>", {}, { id: currentProject.id })
|
|
|
.then(({ data }) => {
|
|
.then(({ data }) => {
|
|
|
data.forEach((cluster: ClusterType) => {
|
|
data.forEach((cluster: ClusterType) => {
|
|
|
if (cluster.id === res.data.contract_revision?.cluster_id) {
|
|
if (cluster.id === res.data.contract_revision?.cluster_id) {
|
|
@@ -202,32 +211,31 @@ const ProvisionerSettings: React.FC<Props> = props => {
|
|
|
}
|
|
}
|
|
|
setErrorMessage(undefined);
|
|
setErrorMessage(undefined);
|
|
|
} catch (err) {
|
|
} catch (err) {
|
|
|
- const errMessage = err.response.data.error.replace('unknown: ', '');
|
|
|
|
|
|
|
+ const errMessage = err.response.data.error.replace("unknown: ", "");
|
|
|
// hacky, need to standardize error contract with backend
|
|
// hacky, need to standardize error contract with backend
|
|
|
- if (errMessage.includes('elastic IP')) {
|
|
|
|
|
- setErrorMessage(AWS_EIP_QUOTA_ERROR_MESSAGE)
|
|
|
|
|
- } else if (errMessage.includes('VPC')) {
|
|
|
|
|
- setErrorMessage(AWS_VPC_QUOTA_ERROR_MESSAGE)
|
|
|
|
|
- } else if (errMessage.includes('NAT Gateway')) {
|
|
|
|
|
- setErrorMessage(AWS_NAT_GATEWAY_QUOTA_ERROR_MESSAGE)
|
|
|
|
|
- } else if (errMessage.includes('vCPU')) {
|
|
|
|
|
- setErrorMessage(AWS_VCPU_QUOTA_ERROR_MESSAGE)
|
|
|
|
|
- } else if (errMessage.includes('AWS account')) {
|
|
|
|
|
- setErrorMessage(AWS_LOGIN_ERROR_MESSAGE)
|
|
|
|
|
|
|
+ if (errMessage.includes("elastic IP")) {
|
|
|
|
|
+ setErrorMessage(AWS_EIP_QUOTA_ERROR_MESSAGE);
|
|
|
|
|
+ } else if (errMessage.includes("VPC")) {
|
|
|
|
|
+ setErrorMessage(AWS_VPC_QUOTA_ERROR_MESSAGE);
|
|
|
|
|
+ } else if (errMessage.includes("NAT Gateway")) {
|
|
|
|
|
+ setErrorMessage(AWS_NAT_GATEWAY_QUOTA_ERROR_MESSAGE);
|
|
|
|
|
+ } else if (errMessage.includes("vCPU")) {
|
|
|
|
|
+ setErrorMessage(AWS_VCPU_QUOTA_ERROR_MESSAGE);
|
|
|
|
|
+ } else if (errMessage.includes("AWS account")) {
|
|
|
|
|
+ setErrorMessage(AWS_LOGIN_ERROR_MESSAGE);
|
|
|
} else {
|
|
} else {
|
|
|
- setErrorMessage(DEFAULT_ERROR_MESSAGE)
|
|
|
|
|
|
|
+ setErrorMessage(DEFAULT_ERROR_MESSAGE);
|
|
|
}
|
|
}
|
|
|
} finally {
|
|
} finally {
|
|
|
- setIsReadOnly(false)
|
|
|
|
|
|
|
+ setIsReadOnly(false);
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
setIsReadOnly(
|
|
setIsReadOnly(
|
|
|
- props.clusterId && (
|
|
|
|
|
- currentCluster.status === "UPDATING" ||
|
|
|
|
|
- currentCluster.status === "UPDATING_UNAVAILABLE"
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ props.clusterId &&
|
|
|
|
|
+ (currentCluster.status === "UPDATING" ||
|
|
|
|
|
+ currentCluster.status === "UPDATING_UNAVAILABLE")
|
|
|
);
|
|
);
|
|
|
setClusterName(`${currentProject.name}-cluster`);
|
|
setClusterName(`${currentProject.name}-cluster`);
|
|
|
}, []);
|
|
}, []);
|
|
@@ -251,7 +259,6 @@ const ProvisionerSettings: React.FC<Props> = props => {
|
|
|
}, [props.selectedClusterVersion]);
|
|
}, [props.selectedClusterVersion]);
|
|
|
|
|
|
|
|
const renderForm = () => {
|
|
const renderForm = () => {
|
|
|
-
|
|
|
|
|
// Render simplified form if initial create
|
|
// Render simplified form if initial create
|
|
|
if (!props.clusterId) {
|
|
if (!props.clusterId) {
|
|
|
return (
|
|
return (
|
|
@@ -259,7 +266,8 @@ const ProvisionerSettings: React.FC<Props> = props => {
|
|
|
<Text size={16}>Select an AWS region</Text>
|
|
<Text size={16}>Select an AWS region</Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Text color="helper">
|
|
<Text color="helper">
|
|
|
- Porter will automatically provision your infrastructure in the specified region.
|
|
|
|
|
|
|
+ Porter will automatically provision your infrastructure in the
|
|
|
|
|
+ specified region.
|
|
|
</Text>
|
|
</Text>
|
|
|
<Spacer height="10px" />
|
|
<Spacer height="10px" />
|
|
|
<SelectRow
|
|
<SelectRow
|
|
@@ -273,7 +281,7 @@ const ProvisionerSettings: React.FC<Props> = props => {
|
|
|
label="📍 AWS region"
|
|
label="📍 AWS region"
|
|
|
/>
|
|
/>
|
|
|
</>
|
|
</>
|
|
|
- )
|
|
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// If settings, update full form
|
|
// If settings, update full form
|
|
@@ -290,77 +298,75 @@ const ProvisionerSettings: React.FC<Props> = props => {
|
|
|
setActiveValue={setAwsRegion}
|
|
setActiveValue={setAwsRegion}
|
|
|
label="📍 AWS region"
|
|
label="📍 AWS region"
|
|
|
/>
|
|
/>
|
|
|
- {
|
|
|
|
|
- user?.isPorterUser && (
|
|
|
|
|
- <Heading>
|
|
|
|
|
- <ExpandHeader
|
|
|
|
|
- onClick={() => setIsExpanded(!isExpanded)}
|
|
|
|
|
- isExpanded={isExpanded}
|
|
|
|
|
- >
|
|
|
|
|
- <i className="material-icons">arrow_drop_down</i>
|
|
|
|
|
- Advanced settings
|
|
|
|
|
- </ExpandHeader>
|
|
|
|
|
- </Heading>
|
|
|
|
|
- )
|
|
|
|
|
- }
|
|
|
|
|
- {
|
|
|
|
|
- isExpanded && (
|
|
|
|
|
- <>
|
|
|
|
|
- <SelectRow
|
|
|
|
|
- options={clusterVersionOptions}
|
|
|
|
|
- width="350px"
|
|
|
|
|
- disabled={isReadOnly}
|
|
|
|
|
- value={clusterVersion}
|
|
|
|
|
- scrollBuffer={true}
|
|
|
|
|
- dropdownMaxHeight="240px"
|
|
|
|
|
- setActiveValue={setClusterVersion}
|
|
|
|
|
- label="Cluster version"
|
|
|
|
|
- />
|
|
|
|
|
- <SelectRow
|
|
|
|
|
- options={machineTypeOptions}
|
|
|
|
|
- width="350px"
|
|
|
|
|
- disabled={isReadOnly}
|
|
|
|
|
- value={machineType}
|
|
|
|
|
- scrollBuffer={true}
|
|
|
|
|
- dropdownMaxHeight="240px"
|
|
|
|
|
- setActiveValue={setMachineType}
|
|
|
|
|
- label="Machine type"
|
|
|
|
|
- />
|
|
|
|
|
- <InputRow
|
|
|
|
|
- width="350px"
|
|
|
|
|
- type="number"
|
|
|
|
|
- disabled={isReadOnly}
|
|
|
|
|
- value={maxInstances}
|
|
|
|
|
- setValue={(x: number) => setMaxInstances(x)}
|
|
|
|
|
- label="Maximum number of application EC2 instances"
|
|
|
|
|
- placeholder="ex: 1"
|
|
|
|
|
- />
|
|
|
|
|
- <InputRow
|
|
|
|
|
- width="350px"
|
|
|
|
|
- type="string"
|
|
|
|
|
- disabled={isReadOnly}
|
|
|
|
|
- value={cidrRange}
|
|
|
|
|
- setValue={(x: string) => setCidrRange(x)}
|
|
|
|
|
- label="VPC CIDR range"
|
|
|
|
|
- placeholder="ex: 10.78.0.0/16"
|
|
|
|
|
- />
|
|
|
|
|
- </>
|
|
|
|
|
- )
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ {user?.isPorterUser && (
|
|
|
|
|
+ <Heading>
|
|
|
|
|
+ <ExpandHeader
|
|
|
|
|
+ onClick={() => setIsExpanded(!isExpanded)}
|
|
|
|
|
+ isExpanded={isExpanded}
|
|
|
|
|
+ >
|
|
|
|
|
+ <i className="material-icons">arrow_drop_down</i>
|
|
|
|
|
+ Advanced settings
|
|
|
|
|
+ </ExpandHeader>
|
|
|
|
|
+ </Heading>
|
|
|
|
|
+ )}
|
|
|
|
|
+ {isExpanded && (
|
|
|
|
|
+ <>
|
|
|
|
|
+ <SelectRow
|
|
|
|
|
+ options={clusterVersionOptions}
|
|
|
|
|
+ width="350px"
|
|
|
|
|
+ disabled={isReadOnly}
|
|
|
|
|
+ value={clusterVersion}
|
|
|
|
|
+ scrollBuffer={true}
|
|
|
|
|
+ dropdownMaxHeight="240px"
|
|
|
|
|
+ setActiveValue={setClusterVersion}
|
|
|
|
|
+ label="Cluster version"
|
|
|
|
|
+ />
|
|
|
|
|
+ <SelectRow
|
|
|
|
|
+ options={machineTypeOptions}
|
|
|
|
|
+ width="350px"
|
|
|
|
|
+ disabled={isReadOnly}
|
|
|
|
|
+ value={machineType}
|
|
|
|
|
+ scrollBuffer={true}
|
|
|
|
|
+ dropdownMaxHeight="240px"
|
|
|
|
|
+ setActiveValue={setMachineType}
|
|
|
|
|
+ label="Machine type"
|
|
|
|
|
+ />
|
|
|
|
|
+ <InputRow
|
|
|
|
|
+ width="350px"
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ disabled={isReadOnly}
|
|
|
|
|
+ value={maxInstances}
|
|
|
|
|
+ setValue={(x: number) => setMaxInstances(x)}
|
|
|
|
|
+ label="Maximum number of application EC2 instances"
|
|
|
|
|
+ placeholder="ex: 1"
|
|
|
|
|
+ />
|
|
|
|
|
+ <InputRow
|
|
|
|
|
+ width="350px"
|
|
|
|
|
+ type="string"
|
|
|
|
|
+ disabled={isReadOnly}
|
|
|
|
|
+ value={cidrRange}
|
|
|
|
|
+ setValue={(x: string) => setCidrRange(x)}
|
|
|
|
|
+ label="VPC CIDR range"
|
|
|
|
|
+ placeholder="ex: 10.78.0.0/16"
|
|
|
|
|
+ />
|
|
|
|
|
+ </>
|
|
|
|
|
+ )}
|
|
|
</>
|
|
</>
|
|
|
- )
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ );
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
- <StyledForm>
|
|
|
|
|
- {renderForm()}
|
|
|
|
|
- </StyledForm>
|
|
|
|
|
|
|
+ <StyledForm>{renderForm()}</StyledForm>
|
|
|
<Button
|
|
<Button
|
|
|
- disabled={(!clusterName && true) || isReadOnly}
|
|
|
|
|
|
|
+ disabled={
|
|
|
|
|
+ (!clusterName && true) || isReadOnly || props.provisionerError == ""
|
|
|
|
|
+ }
|
|
|
onClick={createCluster}
|
|
onClick={createCluster}
|
|
|
status={getStatus()}
|
|
status={getStatus()}
|
|
|
- >Provision</Button>
|
|
|
|
|
|
|
+ >
|
|
|
|
|
+ Provision
|
|
|
|
|
+ </Button>
|
|
|
</>
|
|
</>
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
@@ -374,7 +380,8 @@ const ExpandHeader = styled.div<{ isExpanded: boolean }>`
|
|
|
> i {
|
|
> i {
|
|
|
margin-right: 7px;
|
|
margin-right: 7px;
|
|
|
margin-left: -7px;
|
|
margin-left: -7px;
|
|
|
- transform: ${(props) => props.isExpanded ? "rotate(0deg)" : "rotate(-90deg)"};
|
|
|
|
|
|
|
+ transform: ${(props) =>
|
|
|
|
|
+ props.isExpanded ? "rotate(0deg)" : "rotate(-90deg)"};
|
|
|
}
|
|
}
|
|
|
`;
|
|
`;
|
|
|
|
|
|
|
@@ -398,28 +405,41 @@ const ErrorContainer = styled.div`
|
|
|
font-size: 13px;
|
|
font-size: 13px;
|
|
|
margin-bottom: 30px;
|
|
margin-bottom: 30px;
|
|
|
color: red;
|
|
color: red;
|
|
|
-`
|
|
|
|
|
|
|
+`;
|
|
|
|
|
|
|
|
-const AWS_LOGIN_ERROR_MESSAGE = "Porter could not access your AWS account. Please make sure you have granted permissions and try again."
|
|
|
|
|
-const AWS_EIP_QUOTA_ERROR_MESSAGE = "Your AWS account has reached the limit of elastic IPs allowed in the region. Additional addresses must be requested in order to provision."
|
|
|
|
|
-const AWS_VPC_QUOTA_ERROR_MESSAGE = "Your AWS account has reached the limit of VPCs allowed in the region. Additional VPCs must be requested in order to provision."
|
|
|
|
|
-const AWS_NAT_GATEWAY_QUOTA_ERROR_MESSAGE = "Your AWS account has reached the limit of NAT Gateways allowed in the region. Additional NAT Gateways must be requested in order to provision."
|
|
|
|
|
-const AWS_VCPU_QUOTA_ERROR_MESSAGE = "Your AWS account has reached the limit of vCPUs allowed in the region. Additional vCPUs must be requested in order to provision."
|
|
|
|
|
-const DEFAULT_ERROR_MESSAGE = "An error occurred while provisioning your infrastructure. Please try again."
|
|
|
|
|
|
|
+const AWS_LOGIN_ERROR_MESSAGE =
|
|
|
|
|
+ "Porter could not access your AWS account. Please make sure you have granted permissions and try again.";
|
|
|
|
|
+const AWS_EIP_QUOTA_ERROR_MESSAGE =
|
|
|
|
|
+ "Your AWS account has reached the limit of elastic IPs allowed in the region. Additional addresses must be requested in order to provision.";
|
|
|
|
|
+const AWS_VPC_QUOTA_ERROR_MESSAGE =
|
|
|
|
|
+ "Your AWS account has reached the limit of VPCs allowed in the region. Additional VPCs must be requested in order to provision.";
|
|
|
|
|
+const AWS_NAT_GATEWAY_QUOTA_ERROR_MESSAGE =
|
|
|
|
|
+ "Your AWS account has reached the limit of NAT Gateways allowed in the region. Additional NAT Gateways must be requested in order to provision.";
|
|
|
|
|
+const AWS_VCPU_QUOTA_ERROR_MESSAGE =
|
|
|
|
|
+ "Your AWS account has reached the limit of vCPUs allowed in the region. Additional vCPUs must be requested in order to provision.";
|
|
|
|
|
+const DEFAULT_ERROR_MESSAGE =
|
|
|
|
|
+ "An error occurred while provisioning your infrastructure. Please try again.";
|
|
|
|
|
|
|
|
const errorMessageToModal = (errorMessage: string) => {
|
|
const errorMessageToModal = (errorMessage: string) => {
|
|
|
switch (errorMessage) {
|
|
switch (errorMessage) {
|
|
|
case AWS_LOGIN_ERROR_MESSAGE:
|
|
case AWS_LOGIN_ERROR_MESSAGE:
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
- <Text size={16} weight={500}>Granting Porter access to AWS</Text>
|
|
|
|
|
|
|
+ <Text size={16} weight={500}>
|
|
|
|
|
+ Granting Porter access to AWS
|
|
|
|
|
+ </Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Text color="helper">
|
|
<Text color="helper">
|
|
|
- Porter needs access to your AWS account in order to create infrastructure. You can grant Porter access to AWS by following these steps:
|
|
|
|
|
|
|
+ Porter needs access to your AWS account in order to create
|
|
|
|
|
+ infrastructure. You can grant Porter access to AWS by following
|
|
|
|
|
+ these steps:
|
|
|
</Text>
|
|
</Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Step number={1}>
|
|
<Step number={1}>
|
|
|
- <Link to="https://aws.amazon.com/resources/create-account/" target="_blank">
|
|
|
|
|
|
|
+ <Link
|
|
|
|
|
+ to="https://aws.amazon.com/resources/create-account/"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ >
|
|
|
Create an AWS account
|
|
Create an AWS account
|
|
|
</Link>
|
|
</Link>
|
|
|
<Spacer inline width="5px" />
|
|
<Spacer inline width="5px" />
|
|
@@ -429,139 +449,248 @@ const errorMessageToModal = (errorMessage: string) => {
|
|
|
<Step number={2}>
|
|
<Step number={2}>
|
|
|
Once you are logged in to your AWS account,
|
|
Once you are logged in to your AWS account,
|
|
|
<Spacer inline width="5px" />
|
|
<Spacer inline width="5px" />
|
|
|
- <Link to="https://console.aws.amazon.com/billing/home?region=us-east-1#/account" target="_blank">
|
|
|
|
|
|
|
+ <Link
|
|
|
|
|
+ to="https://console.aws.amazon.com/billing/home?region=us-east-1#/account"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ >
|
|
|
copy your account ID
|
|
copy your account ID
|
|
|
- </Link>.
|
|
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ .
|
|
|
</Step>
|
|
</Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={3}>Fill in your account ID on Porter and select "Grant permissions".</Step>
|
|
|
|
|
|
|
+ <Step number={3}>
|
|
|
|
|
+ Fill in your account ID on Porter and select "Grant permissions".
|
|
|
|
|
+ </Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={4}>After being redirected to AWS, select "Create stack" on the AWS console.</Step>
|
|
|
|
|
|
|
+ <Step number={4}>
|
|
|
|
|
+ After being redirected to AWS, select "Create stack" on the AWS
|
|
|
|
|
+ console.
|
|
|
|
|
+ </Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Step number={5}>Return to Porter and select "Continue".</Step>
|
|
<Step number={5}>Return to Porter and select "Continue".</Step>
|
|
|
</>
|
|
</>
|
|
|
- )
|
|
|
|
|
|
|
+ );
|
|
|
case AWS_EIP_QUOTA_ERROR_MESSAGE:
|
|
case AWS_EIP_QUOTA_ERROR_MESSAGE:
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
- <Text size={16} weight={500}>Requesting more EIP Adresses</Text>
|
|
|
|
|
|
|
+ <Text size={16} weight={500}>
|
|
|
|
|
+ Requesting more EIP Adresses
|
|
|
|
|
+ </Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Text color="helper">
|
|
<Text color="helper">
|
|
|
- You will need to either request more EIP addresses or delete existing ones in order to provision in the region specified. You can request more addresses by following these steps:
|
|
|
|
|
|
|
+ You will need to either request more EIP addresses or delete
|
|
|
|
|
+ existing ones in order to provision in the region specified. You can
|
|
|
|
|
+ request more addresses by following these steps:
|
|
|
</Text>
|
|
</Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Step number={1}>
|
|
<Step number={1}>
|
|
|
Log into
|
|
Log into
|
|
|
<Spacer inline width="5px" />
|
|
<Spacer inline width="5px" />
|
|
|
- <Link to="https://console.aws.amazon.com/billing/home?region=us-east-1#/account" target="_blank">your AWS account
|
|
|
|
|
- </Link>.
|
|
|
|
|
|
|
+ <Link
|
|
|
|
|
+ to="https://console.aws.amazon.com/billing/home?region=us-east-1#/account"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ >
|
|
|
|
|
+ your AWS account
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ .
|
|
|
</Step>
|
|
</Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Step number={2}>
|
|
<Step number={2}>
|
|
|
Navigate to
|
|
Navigate to
|
|
|
<Spacer inline width="5px" />
|
|
<Spacer inline width="5px" />
|
|
|
- <Link to="https://us-east-1.console.aws.amazon.com/servicequotas/home/services/ec2/quotas" target="_blank">the Amazon Elastic Compute Cloud (Amazon EC2) Service Quotas portal
|
|
|
|
|
- </Link>.
|
|
|
|
|
|
|
+ <Link
|
|
|
|
|
+ to="https://us-east-1.console.aws.amazon.com/servicequotas/home/services/ec2/quotas"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ >
|
|
|
|
|
+ the Amazon Elastic Compute Cloud (Amazon EC2) Service Quotas
|
|
|
|
|
+ portal
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ .
|
|
|
</Step>
|
|
</Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={3}>Search for "EC2-VPC Elastic IPs" in the search box and click on the search result.</Step>
|
|
|
|
|
|
|
+ <Step number={3}>
|
|
|
|
|
+ Search for "EC2-VPC Elastic IPs" in the search box and click on the
|
|
|
|
|
+ search result.
|
|
|
|
|
+ </Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={4}>Click on "Request quota increase". In order to provision with Porter, you will need to request at least 3 addresses above your current quota limit.</Step>
|
|
|
|
|
|
|
+ <Step number={4}>
|
|
|
|
|
+ Click on "Request quota increase". In order to provision with
|
|
|
|
|
+ Porter, you will need to request at least 3 addresses above your
|
|
|
|
|
+ current quota limit.
|
|
|
|
|
+ </Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={5}>Once that request is approved, return to Porter and retry the provision.</Step>
|
|
|
|
|
|
|
+ <Step number={5}>
|
|
|
|
|
+ Once that request is approved, return to Porter and retry the
|
|
|
|
|
+ provision.
|
|
|
|
|
+ </Step>
|
|
|
</>
|
|
</>
|
|
|
- )
|
|
|
|
|
|
|
+ );
|
|
|
case AWS_VPC_QUOTA_ERROR_MESSAGE:
|
|
case AWS_VPC_QUOTA_ERROR_MESSAGE:
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
- <Text size={16} weight={500}>Requesting more VPCs</Text>
|
|
|
|
|
|
|
+ <Text size={16} weight={500}>
|
|
|
|
|
+ Requesting more VPCs
|
|
|
|
|
+ </Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Text color="helper">
|
|
<Text color="helper">
|
|
|
- You will need to either request more VPCs or delete existing ones in order to provision in the region specified. You can request more VPCs by following these steps:
|
|
|
|
|
|
|
+ You will need to either request more VPCs or delete existing ones in
|
|
|
|
|
+ order to provision in the region specified. You can request more
|
|
|
|
|
+ VPCs by following these steps:
|
|
|
</Text>
|
|
</Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Step number={1}>
|
|
<Step number={1}>
|
|
|
Log into
|
|
Log into
|
|
|
<Spacer inline width="5px" />
|
|
<Spacer inline width="5px" />
|
|
|
- <Link to="https://console.aws.amazon.com/billing/home?region=us-east-1#/account" target="_blank">your AWS account
|
|
|
|
|
- </Link>.
|
|
|
|
|
|
|
+ <Link
|
|
|
|
|
+ to="https://console.aws.amazon.com/billing/home?region=us-east-1#/account"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ >
|
|
|
|
|
+ your AWS account
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ .
|
|
|
</Step>
|
|
</Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Step number={2}>
|
|
<Step number={2}>
|
|
|
Navigate to
|
|
Navigate to
|
|
|
<Spacer inline width="5px" />
|
|
<Spacer inline width="5px" />
|
|
|
- <Link to="https://us-east-1.console.aws.amazon.com/servicequotas/home/services/vpc/quotas" target="_blank">the Amazon Virtual Private Cloud (Amazon VPC) Service Quotas portal
|
|
|
|
|
- </Link>.
|
|
|
|
|
|
|
+ <Link
|
|
|
|
|
+ to="https://us-east-1.console.aws.amazon.com/servicequotas/home/services/vpc/quotas"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ >
|
|
|
|
|
+ the Amazon Virtual Private Cloud (Amazon VPC) Service Quotas
|
|
|
|
|
+ portal
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ .
|
|
|
</Step>
|
|
</Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={3}>Search for "VPCs per Region" in the search box and click on the search result.</Step>
|
|
|
|
|
|
|
+ <Step number={3}>
|
|
|
|
|
+ Search for "VPCs per Region" in the search box and click on the
|
|
|
|
|
+ search result.
|
|
|
|
|
+ </Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={4}>Click on "Request quota increase". In order to provision with Porter, you will need to request at least 1 VPCs above your current quota limit.</Step>
|
|
|
|
|
|
|
+ <Step number={4}>
|
|
|
|
|
+ Click on "Request quota increase". In order to provision with
|
|
|
|
|
+ Porter, you will need to request at least 1 VPCs above your current
|
|
|
|
|
+ quota limit.
|
|
|
|
|
+ </Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={5}>Once that request is approved, return to Porter and retry the provision.</Step>
|
|
|
|
|
|
|
+ <Step number={5}>
|
|
|
|
|
+ Once that request is approved, return to Porter and retry the
|
|
|
|
|
+ provision.
|
|
|
|
|
+ </Step>
|
|
|
</>
|
|
</>
|
|
|
- )
|
|
|
|
|
|
|
+ );
|
|
|
case AWS_NAT_GATEWAY_QUOTA_ERROR_MESSAGE:
|
|
case AWS_NAT_GATEWAY_QUOTA_ERROR_MESSAGE:
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
- <Text size={16} weight={500}>Requesting more NAT Gateways</Text>
|
|
|
|
|
|
|
+ <Text size={16} weight={500}>
|
|
|
|
|
+ Requesting more NAT Gateways
|
|
|
|
|
+ </Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Text color="helper">
|
|
<Text color="helper">
|
|
|
- You will need to either request more NAT Gateways or delete existing ones in order to provision in the region specified. You can request more NAT Gateways by following these steps:
|
|
|
|
|
|
|
+ You will need to either request more NAT Gateways or delete existing
|
|
|
|
|
+ ones in order to provision in the region specified. You can request
|
|
|
|
|
+ more NAT Gateways by following these steps:
|
|
|
</Text>
|
|
</Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Step number={1}>
|
|
<Step number={1}>
|
|
|
Log into
|
|
Log into
|
|
|
<Spacer inline width="5px" />
|
|
<Spacer inline width="5px" />
|
|
|
- <Link to="https://console.aws.amazon.com/billing/home?region=us-east-1#/account" target="_blank">your AWS account
|
|
|
|
|
- </Link>.
|
|
|
|
|
|
|
+ <Link
|
|
|
|
|
+ to="https://console.aws.amazon.com/billing/home?region=us-east-1#/account"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ >
|
|
|
|
|
+ your AWS account
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ .
|
|
|
</Step>
|
|
</Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Step number={2}>
|
|
<Step number={2}>
|
|
|
Navigate to
|
|
Navigate to
|
|
|
<Spacer inline width="5px" />
|
|
<Spacer inline width="5px" />
|
|
|
- <Link to="https://us-east-1.console.aws.amazon.com/servicequotas/home/services/vpc/quotas" target="_blank">the Amazon Virtual Private Cloud (Amazon VPC) Service Quotas portal
|
|
|
|
|
- </Link>.
|
|
|
|
|
|
|
+ <Link
|
|
|
|
|
+ to="https://us-east-1.console.aws.amazon.com/servicequotas/home/services/vpc/quotas"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ >
|
|
|
|
|
+ the Amazon Virtual Private Cloud (Amazon VPC) Service Quotas
|
|
|
|
|
+ portal
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ .
|
|
|
</Step>
|
|
</Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={3}>Search for "NAT gateways per Availability Zone" in the search box and click on the search result.</Step>
|
|
|
|
|
|
|
+ <Step number={3}>
|
|
|
|
|
+ Search for "NAT gateways per Availability Zone" in the search box
|
|
|
|
|
+ and click on the search result.
|
|
|
|
|
+ </Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={4}>Click on "Request quota increase". In order to provision with Porter, you will need to request at least 3 NAT Gateways above your current quota limit.</Step>
|
|
|
|
|
|
|
+ <Step number={4}>
|
|
|
|
|
+ Click on "Request quota increase". In order to provision with
|
|
|
|
|
+ Porter, you will need to request at least 3 NAT Gateways above your
|
|
|
|
|
+ current quota limit.
|
|
|
|
|
+ </Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={5}>Once that request is approved, return to Porter and retry the provision.</Step>
|
|
|
|
|
|
|
+ <Step number={5}>
|
|
|
|
|
+ Once that request is approved, return to Porter and retry the
|
|
|
|
|
+ provision.
|
|
|
|
|
+ </Step>
|
|
|
</>
|
|
</>
|
|
|
- )
|
|
|
|
|
|
|
+ );
|
|
|
case AWS_VCPU_QUOTA_ERROR_MESSAGE:
|
|
case AWS_VCPU_QUOTA_ERROR_MESSAGE:
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
- <Text size={16} weight={500}>Requesting more vCPUs</Text>
|
|
|
|
|
|
|
+ <Text size={16} weight={500}>
|
|
|
|
|
+ Requesting more vCPUs
|
|
|
|
|
+ </Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Text color="helper">
|
|
<Text color="helper">
|
|
|
- You will need to either request more vCPUs or delete existing instances in order to provision in the region specified. You can request more vCPUs by following these steps:
|
|
|
|
|
|
|
+ You will need to either request more vCPUs or delete existing
|
|
|
|
|
+ instances in order to provision in the region specified. You can
|
|
|
|
|
+ request more vCPUs by following these steps:
|
|
|
</Text>
|
|
</Text>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Step number={1}>
|
|
<Step number={1}>
|
|
|
Log into
|
|
Log into
|
|
|
<Spacer inline width="5px" />
|
|
<Spacer inline width="5px" />
|
|
|
- <Link to="https://console.aws.amazon.com/billing/home?region=us-east-1#/account" target="_blank">your AWS account
|
|
|
|
|
- </Link>.
|
|
|
|
|
|
|
+ <Link
|
|
|
|
|
+ to="https://console.aws.amazon.com/billing/home?region=us-east-1#/account"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ >
|
|
|
|
|
+ your AWS account
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ .
|
|
|
</Step>
|
|
</Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
<Step number={2}>
|
|
<Step number={2}>
|
|
|
Navigate to
|
|
Navigate to
|
|
|
<Spacer inline width="5px" />
|
|
<Spacer inline width="5px" />
|
|
|
- <Link to="https://us-east-1.console.aws.amazon.com/servicequotas/home/services/ec2/quotas" target="_blank">the Amazon Elastic Compute Cloud (Amazon EC2) Service Quotas portal
|
|
|
|
|
- </Link>.
|
|
|
|
|
|
|
+ <Link
|
|
|
|
|
+ to="https://us-east-1.console.aws.amazon.com/servicequotas/home/services/ec2/quotas"
|
|
|
|
|
+ target="_blank"
|
|
|
|
|
+ >
|
|
|
|
|
+ the Amazon Elastic Compute Cloud (Amazon EC2) Service Quotas
|
|
|
|
|
+ portal
|
|
|
|
|
+ </Link>
|
|
|
|
|
+ .
|
|
|
</Step>
|
|
</Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={3}>Search for "Running On-Demand Standard (A, C, D, H, I, M, R, T, Z) instances" in the search box and click on the search result.</Step>
|
|
|
|
|
|
|
+ <Step number={3}>
|
|
|
|
|
+ Search for "Running On-Demand Standard (A, C, D, H, I, M, R, T, Z)
|
|
|
|
|
+ instances" in the search box and click on the search result.
|
|
|
|
|
+ </Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={4}>Click on "Request quota increase". In order to provision with Porter, you will need to request at least 10 vCPUs above your current quota limit.</Step>
|
|
|
|
|
|
|
+ <Step number={4}>
|
|
|
|
|
+ Click on "Request quota increase". In order to provision with
|
|
|
|
|
+ Porter, you will need to request at least 10 vCPUs above your
|
|
|
|
|
+ current quota limit.
|
|
|
|
|
+ </Step>
|
|
|
<Spacer y={1} />
|
|
<Spacer y={1} />
|
|
|
- <Step number={5}>Once that request is approved, return to Porter and retry the provision.</Step>
|
|
|
|
|
|
|
+ <Step number={5}>
|
|
|
|
|
+ Once that request is approved, return to Porter and retry the
|
|
|
|
|
+ provision.
|
|
|
|
|
+ </Step>
|
|
|
</>
|
|
</>
|
|
|
- )
|
|
|
|
|
|
|
+ );
|
|
|
default:
|
|
default:
|
|
|
- return null
|
|
|
|
|
|
|
+ return null;
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+};
|