Explorar o código

update azure provisioning version and instance types (#3429)

Co-authored-by: David Townley <davidtownley@Davids-MacBook-Air.local>
d-g-town %!s(int64=2) %!d(string=hai) anos
pai
achega
20c5b89edc

+ 10 - 10
dashboard/src/components/AzureCostConsent.tsx

@@ -53,7 +53,7 @@ const AzureCostConsent: React.FC<Props> = ({
           noWrapper
           expandText="[+] Show details"
           collapseText="[-] Hide details"
-          Header={<Cost>$411.72 / mo</Cost>}
+          Header={<Cost>$314.92 / mo</Cost>}
           ExpandedSection={
             <>
               <Spacer height="15px" />
@@ -62,21 +62,21 @@ const AzureCostConsent: React.FC<Props> = ({
                 <Spacer height="15px" />
                 • Amazon EC2:
                 <Spacer height="15px" />
-                <Tab />+ System workloads: Standard_A2_v2 instance (2) =
-                $132.86/mo
+                <Tab />+ System workloads: Standard_D2ps_v5 instance (2) =
+                $110.88/mo
                 <Spacer height="15px" />
-                <Tab />+ Monitoring workloads: Standard_A4_v2 instance (1) =
-                $139.43/mo
+                <Tab />+ Monitoring workloads: Standard_A2_v2 instance (1) =
+                $65.52/mo
                 <Spacer height="15px" />
                 <Tab />+ Application workloads: Standard_A2_v2 instance (1) =
-                $66.43/mo
+                $65.52/mo
               </Fieldset>
             </>
           }
         />
         <Spacer y={1} />
         <Text color="helper">
-          The base Azure infrastructure covers up to 2 vCPU and 4GB of RAM.
+          The base Azure infrastructure covers up to 2 vCPU and 4GB of RAM for application workloads.
           Separate from the Azure cost, Porter charges based on your resource
           usage.
         </Text>
@@ -103,12 +103,12 @@ const AzureCostConsent: React.FC<Props> = ({
         <Spacer y={0.5} />
         <Text color="helper">
           All Azure resources will be automatically deleted when you delete your
-          Porter project. Please enter the Azure base cost ("411.72") below to
+          Porter project. Please enter the Azure base cost ("314.92") below to
           proceed:
         </Text>
         <Spacer y={1} />
         <Input
-          placeholder="411.72"
+          placeholder="314.92"
           value={confirmCost}
           setValue={setConfirmCost}
           width="100%"
@@ -116,7 +116,7 @@ const AzureCostConsent: React.FC<Props> = ({
         />
         <Spacer y={1} />
         <Button
-          disabled={confirmCost !== "411.72"}
+          disabled={confirmCost !== "314.92"}
           onClick={() => {
             setShowCostConfirmModal(false);
             setConfirmCost("");

+ 9 - 6
dashboard/src/components/AzureProvisionerSettings.tsx

@@ -40,7 +40,7 @@ const machineTypeOptions = [
   { value: "Standard_A4_v2", label: "Standard_A4_v2" },
 ];
 
-const clusterVersionOptions = [{ value: "v1.24.9", label: "v1.24.9" }];
+const clusterVersionOptions = [{ value: "v1.26.6", label: "v1.26.6" },{ value: "v1.24.9", label: "v1.24.9" }];
 
 type Props = RouteComponentProps & {
   selectedClusterVersion?: Contract;
@@ -68,7 +68,7 @@ const AzureProvisionerSettings: React.FC<Props> = (props) => {
   const [minInstances, setMinInstances] = useState(1);
   const [maxInstances, setMaxInstances] = useState(10);
   const [cidrRange, setCidrRange] = useState("10.78.0.0/16");
-  const [clusterVersion, setClusterVersion] = useState("v1.24.9");
+  const [clusterVersion, setClusterVersion] = useState("v1.26.6");
   const [isReadOnly, setIsReadOnly] = useState(false);
   const [errorMessage, setErrorMessage] = useState<string>("");
   const [errorDetails, setErrorDetails] = useState<string>("");
@@ -130,6 +130,9 @@ const AzureProvisionerSettings: React.FC<Props> = (props) => {
     if (!VALID_CIDR_RANGE_PATTERN.test(cidrRange)) {
       return "VPC CIDR range must be in the format of [0-255].[0-255].0.0/16";
     }
+    if (clusterVersion == "v1.24.9") {
+        return "Cluster version v1.24.9 is no longer supported";
+    }
 
     return "";
   }
@@ -152,19 +155,19 @@ const AzureProvisionerSettings: React.FC<Props> = (props) => {
           case: "aksKind",
           value: new AKS({
             clusterName: clusterName,
-            clusterVersion: clusterVersion || "v1.24.9",
+            clusterVersion: clusterVersion || "v1.26.6",
             cidrRange: cidrRange || "10.78.0.0/16",
             location: azureLocation,
             nodePools: [
               new AKSNodePool({
-                instanceType: "Standard_A2_v2",
+                instanceType: "Standard_D2ps_v5",
                 minInstances: 1,
                 maxInstances: 3,
                 nodePoolType: NodePoolType.SYSTEM,
                 mode: "User",
               }),
               new AKSNodePool({
-                instanceType: "Standard_A4_v2",
+                instanceType: "Standard_A2_v2",
                 minInstances: 1,
                 maxInstances: 3,
                 nodePoolType: NodePoolType.MONITORING,
@@ -372,7 +375,7 @@ const AzureProvisionerSettings: React.FC<Props> = (props) => {
               disabled={isReadOnly}
               value={maxInstances}
               setValue={(x: number) => setMaxInstances(x)}
-              label="Maximum number of application EC2 instances"
+              label="Maximum number of application nodes"
               placeholder="ex: 1"
             />
             <InputRow