@rulebricks/cli 2.1.7 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +51 -16
  2. package/cluster-setup/aws/README.md +96 -47
  3. package/cluster-setup/aws/check-aws-access.sh +216 -52
  4. package/cluster-setup/aws/parameters.json +13 -0
  5. package/cluster-setup/aws/rulebricks-cluster.cfn.yaml +355 -0
  6. package/cluster-setup/azure/README.md +103 -55
  7. package/cluster-setup/azure/check-aks-prereqs.sh +236 -56
  8. package/cluster-setup/azure/parameters.json +30 -0
  9. package/cluster-setup/azure/rulebricks-cluster.bicep +546 -0
  10. package/cluster-setup/gcp/README.md +51 -34
  11. package/cluster-setup/gcp/check-gke-prereqs.sh +222 -60
  12. package/dist/commands/backup.d.ts +5 -0
  13. package/dist/commands/backup.js +104 -0
  14. package/dist/commands/deploy.d.ts +3 -1
  15. package/dist/commands/deploy.js +226 -326
  16. package/dist/commands/destroy.d.ts +1 -1
  17. package/dist/commands/destroy.js +73 -123
  18. package/dist/commands/init.d.ts +5 -1
  19. package/dist/commands/init.js +78 -54
  20. package/dist/commands/list.d.ts +1 -0
  21. package/dist/commands/list.js +74 -0
  22. package/dist/commands/open.d.ts +1 -1
  23. package/dist/commands/open.js +4 -12
  24. package/dist/commands/redeploy.d.ts +6 -0
  25. package/dist/commands/redeploy.js +310 -0
  26. package/dist/commands/restore.d.ts +5 -0
  27. package/dist/commands/restore.js +338 -0
  28. package/dist/commands/status.js +62 -49
  29. package/dist/commands/upgrade.js +74 -51
  30. package/dist/components/DNSWaitScreen.d.ts +5 -1
  31. package/dist/components/DNSWaitScreen.js +47 -41
  32. package/dist/components/Wizard/WizardContext.d.ts +157 -36
  33. package/dist/components/Wizard/WizardContext.js +872 -160
  34. package/dist/components/Wizard/steps/CloudProviderStep.js +192 -107
  35. package/dist/components/Wizard/steps/DomainStep.js +5 -24
  36. package/dist/components/Wizard/steps/ExternalServicesStep.d.ts +6 -0
  37. package/dist/components/Wizard/steps/ExternalServicesStep.js +645 -0
  38. package/dist/components/Wizard/steps/FeatureConfigStep.d.ts +2 -1
  39. package/dist/components/Wizard/steps/FeatureConfigStep.js +739 -425
  40. package/dist/components/Wizard/steps/FeaturesStep.js +31 -35
  41. package/dist/components/Wizard/steps/ObservabilityStep.d.ts +6 -0
  42. package/dist/components/Wizard/steps/ObservabilityStep.js +137 -0
  43. package/dist/components/Wizard/steps/ReviewStep.d.ts +2 -1
  44. package/dist/components/Wizard/steps/ReviewStep.js +56 -12
  45. package/dist/components/Wizard/steps/StorageStep.d.ts +9 -0
  46. package/dist/components/Wizard/steps/StorageStep.js +592 -0
  47. package/dist/components/Wizard/steps/SupabaseCredentialsStep.js +20 -21
  48. package/dist/components/Wizard/steps/VersionStep.js +45 -23
  49. package/dist/components/Wizard/steps/index.d.ts +3 -3
  50. package/dist/components/Wizard/steps/index.js +3 -3
  51. package/dist/components/common/CommandApproval.d.ts +12 -0
  52. package/dist/components/common/CommandApproval.js +91 -0
  53. package/dist/components/common/DeploymentPicker.d.ts +14 -0
  54. package/dist/components/common/DeploymentPicker.js +16 -0
  55. package/dist/components/common/index.d.ts +2 -0
  56. package/dist/components/common/index.js +2 -0
  57. package/dist/index.js +94 -62
  58. package/dist/lib/cloudCli.d.ts +134 -63
  59. package/dist/lib/cloudCli.js +512 -220
  60. package/dist/lib/clusterSetupDefaults.d.ts +30 -0
  61. package/dist/lib/clusterSetupDefaults.js +64 -0
  62. package/dist/lib/commandApproval.d.ts +26 -0
  63. package/dist/lib/commandApproval.js +114 -0
  64. package/dist/lib/config.d.ts +12 -10
  65. package/dist/lib/config.js +91 -33
  66. package/dist/lib/configFixtures.d.ts +5 -0
  67. package/dist/lib/configFixtures.js +513 -0
  68. package/dist/lib/deploymentHealth.d.ts +32 -0
  69. package/dist/lib/deploymentHealth.js +157 -0
  70. package/dist/lib/dns.d.ts +1 -1
  71. package/dist/lib/dns.js +19 -1
  72. package/dist/lib/dns.test.d.ts +1 -0
  73. package/dist/lib/dns.test.js +27 -0
  74. package/dist/lib/dockerHub.d.ts +12 -1
  75. package/dist/lib/dockerHub.js +18 -8
  76. package/dist/lib/helm.d.ts +4 -0
  77. package/dist/lib/helm.js +16 -0
  78. package/dist/lib/helmValues.d.ts +25 -0
  79. package/dist/lib/helmValues.js +1841 -289
  80. package/dist/lib/helmValues.test.d.ts +1 -0
  81. package/dist/lib/helmValues.test.js +1012 -0
  82. package/dist/lib/htpasswd.d.ts +1 -0
  83. package/dist/lib/htpasswd.js +15 -0
  84. package/dist/lib/kubernetes.d.ts +124 -17
  85. package/dist/lib/kubernetes.js +576 -145
  86. package/dist/lib/secrets.d.ts +23 -0
  87. package/dist/lib/secrets.js +158 -0
  88. package/dist/lib/validateValues.d.ts +31 -0
  89. package/dist/lib/validateValues.js +253 -0
  90. package/dist/lib/versions.d.ts +82 -11
  91. package/dist/lib/versions.js +131 -31
  92. package/dist/lib/versions.test.d.ts +1 -0
  93. package/dist/lib/versions.test.js +81 -0
  94. package/dist/lib/wizardSteps.d.ts +14 -0
  95. package/dist/lib/wizardSteps.js +23 -0
  96. package/dist/lib/workloadIdentity.d.ts +26 -0
  97. package/dist/lib/workloadIdentity.js +323 -0
  98. package/dist/lib/workloadIdentity.test.d.ts +1 -0
  99. package/dist/lib/workloadIdentity.test.js +57 -0
  100. package/dist/types/index.d.ts +1860 -164
  101. package/dist/types/index.js +518 -295
  102. package/package.json +9 -4
  103. package/schema/values.schema.json +1934 -0
  104. package/cluster-setup/aws/cluster.yaml +0 -33
  105. package/cluster-setup/azure/main.bicep +0 -282
  106. package/cluster-setup/azure/main.parameters.json +0 -21
  107. package/dist/components/Wizard/steps/CredentialsStep.d.ts +0 -6
  108. package/dist/components/Wizard/steps/CredentialsStep.js +0 -22
  109. package/dist/components/Wizard/steps/DeploymentModeStep.d.ts +0 -5
  110. package/dist/components/Wizard/steps/DeploymentModeStep.js +0 -26
  111. package/dist/components/Wizard/steps/TierStep.d.ts +0 -6
  112. package/dist/components/Wizard/steps/TierStep.js +0 -29
  113. package/dist/lib/terraform.d.ts +0 -66
  114. package/dist/lib/terraform.js +0 -754
  115. package/terraform/aws/main.tf +0 -355
  116. package/terraform/azure/main.tf +0 -371
  117. package/terraform/gcp/main.tf +0 -407
@@ -1,33 +0,0 @@
1
- # Minimum eksctl configuration for a Rulebricks EKS cluster.
2
- # Core knobs: name, region, Kubernetes version, instance type, node count,
3
- # disk size, and disk type.
4
- # Nodes must be ARM based. Storage is required; customize Helm storage class
5
- # values if you use a different CSI driver or StorageClass.
6
-
7
- apiVersion: eksctl.io/v1alpha5
8
- kind: ClusterConfig
9
-
10
- metadata:
11
- name: rulebricks-cluster
12
- region: us-east-1
13
- version: "1.34"
14
-
15
- managedNodeGroups:
16
- - name: standard-nodes
17
- instanceType: c8g.large
18
- desiredCapacity: 4
19
- minSize: 4
20
- maxSize: 4
21
- volumeSize: 50
22
- volumeType: gp3
23
- amiFamily: AmazonLinux2023
24
- iam:
25
- withAddonPolicies:
26
- ebs: true
27
- albIngress: true
28
-
29
- addons:
30
- - name: vpc-cni
31
- - name: coredns
32
- - name: kube-proxy
33
- - name: aws-ebs-csi-driver
@@ -1,282 +0,0 @@
1
- targetScope = 'resourceGroup'
2
-
3
- @description('Name of the AKS cluster.')
4
- param clusterName string = 'rulebricks-cluster'
5
-
6
- @description('Azure region for all resources.')
7
- param location string = resourceGroup().location
8
-
9
- @description('AKS Kubernetes version.')
10
- param kubernetesVersion string = '1.34'
11
-
12
- @description('Number of nodes in the default node pool.')
13
- param nodeCount int = 4
14
-
15
- @description('VM size for the default node pool. ARM64 (Standard_*ps_*) recommended.')
16
- param nodeVmSize string = 'Standard_D2ps_v5'
17
-
18
- @description('OS disk size in GB for the default node pool.')
19
- param osDiskSizeGB int = 20
20
-
21
- @description('OS disk type for the default node pool.')
22
- @allowed([
23
- 'Managed'
24
- 'Ephemeral'
25
- ])
26
- param osDiskType string = 'Managed'
27
-
28
- @description('Namespace where Rulebricks will be installed. CLI deployments usually use rulebricks-<deployment-name>.')
29
- param rulebricksNamespace string = 'rulebricks'
30
-
31
- @description('Kubernetes ServiceAccount name used by Vector.')
32
- param vectorServiceAccountName string = 'vector'
33
-
34
- @description('Kubernetes ServiceAccount name used by Prometheus.')
35
- param prometheusServiceAccountName string = 'prometheus'
36
-
37
- @description('Enable a user-assigned identity and federated credential for external-dns with Azure DNS.')
38
- param enableExternalDns bool = false
39
-
40
- @description('Resource group containing the Azure DNS zone. Required when enableExternalDns is true.')
41
- param dnsZoneResourceGroup string = ''
42
-
43
- @description('Enable a user-assigned identity and federated credential for Vector Azure Blob logging.')
44
- param enableBlobLogging bool = false
45
-
46
- @description('Existing Azure Storage account name for Vector logs.')
47
- param loggingStorageAccountName string = ''
48
-
49
- var networkContributorRoleId = subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
50
- var dnsZoneContributorRoleId = subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'befefa01-2a29-4197-83a8-272ff33ce314')
51
- var storageBlobDataContributorRoleId = subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ba92f5b4-2d11-453d-a403-e96b0029c9fe')
52
-
53
- resource vnet 'Microsoft.Network/virtualNetworks@2023-11-01' = {
54
- name: '${clusterName}-vnet'
55
- location: location
56
- tags: {
57
- Environment: 'rulebricks'
58
- }
59
- properties: {
60
- addressSpace: {
61
- addressPrefixes: [
62
- '10.0.0.0/8'
63
- ]
64
- }
65
- subnets: [
66
- {
67
- name: 'aks-subnet'
68
- properties: {
69
- addressPrefix: '10.240.0.0/16'
70
- }
71
- }
72
- ]
73
- }
74
- }
75
-
76
- resource nsg 'Microsoft.Network/networkSecurityGroups@2023-11-01' = {
77
- name: '${clusterName}-nsg'
78
- location: location
79
- tags: {
80
- Environment: 'rulebricks'
81
- }
82
- properties: {
83
- securityRules: [
84
- {
85
- name: 'AllowVNetInbound'
86
- properties: {
87
- priority: 100
88
- direction: 'Inbound'
89
- access: 'Allow'
90
- protocol: '*'
91
- sourcePortRange: '*'
92
- destinationPortRange: '*'
93
- sourceAddressPrefix: 'VirtualNetwork'
94
- destinationAddressPrefix: 'VirtualNetwork'
95
- }
96
- }
97
- {
98
- name: 'AllowVNetOutbound'
99
- properties: {
100
- priority: 100
101
- direction: 'Outbound'
102
- access: 'Allow'
103
- protocol: '*'
104
- sourcePortRange: '*'
105
- destinationPortRange: '*'
106
- sourceAddressPrefix: 'VirtualNetwork'
107
- destinationAddressPrefix: 'VirtualNetwork'
108
- }
109
- }
110
- ]
111
- }
112
- }
113
-
114
- resource subnet 'Microsoft.Network/virtualNetworks/subnets@2023-11-01' = {
115
- parent: vnet
116
- name: 'aks-subnet'
117
- properties: {
118
- addressPrefix: '10.240.0.0/16'
119
- networkSecurityGroup: {
120
- id: nsg.id
121
- }
122
- }
123
- }
124
-
125
- resource aksIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
126
- name: '${clusterName}-identity'
127
- location: location
128
- }
129
-
130
- resource aksNetworkRole 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
131
- name: guid(vnet.id, aksIdentity.id, 'Network Contributor')
132
- scope: vnet
133
- properties: {
134
- roleDefinitionId: networkContributorRoleId
135
- principalId: aksIdentity.properties.principalId
136
- principalType: 'ServicePrincipal'
137
- }
138
- }
139
-
140
- resource aks 'Microsoft.ContainerService/managedClusters@2024-05-01' = {
141
- name: clusterName
142
- location: location
143
- tags: {
144
- Environment: 'rulebricks'
145
- }
146
- identity: {
147
- type: 'UserAssigned'
148
- userAssignedIdentities: {
149
- '${aksIdentity.id}': {}
150
- }
151
- }
152
- properties: {
153
- dnsPrefix: clusterName
154
- kubernetesVersion: kubernetesVersion
155
- agentPoolProfiles: [
156
- {
157
- name: 'default'
158
- count: nodeCount
159
- enableAutoScaling: false
160
- vmSize: nodeVmSize
161
- osDiskSizeGB: osDiskSizeGB
162
- osDiskType: osDiskType
163
- osType: 'Linux'
164
- type: 'VirtualMachineScaleSets'
165
- mode: 'System'
166
- vnetSubnetID: subnet.id
167
- nodeLabels: {
168
- environment: 'rulebricks'
169
- }
170
- }
171
- ]
172
- networkProfile: {
173
- networkPlugin: 'azure'
174
- networkPolicy: 'calico'
175
- loadBalancerSku: 'standard'
176
- serviceCidr: '10.0.0.0/16'
177
- dnsServiceIP: '10.0.0.10'
178
- }
179
- oidcIssuerProfile: {
180
- enabled: true
181
- }
182
- securityProfile: {
183
- workloadIdentity: {
184
- enabled: true
185
- }
186
- }
187
- storageProfile: {
188
- diskCSIDriver: {
189
- enabled: true
190
- }
191
- fileCSIDriver: {
192
- enabled: true
193
- }
194
- }
195
- }
196
- dependsOn: [
197
- aksNetworkRole
198
- ]
199
- }
200
-
201
- resource externalDnsIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = if (enableExternalDns) {
202
- name: '${clusterName}-external-dns'
203
- location: location
204
- }
205
-
206
- resource externalDnsRole 'Microsoft.Authorization/roleAssignments@2022-04-01' = if (enableExternalDns && (empty(dnsZoneResourceGroup) || dnsZoneResourceGroup == resourceGroup().name)) {
207
- name: guid(resourceGroup().id, externalDnsIdentity!.id, 'DNS Zone Contributor')
208
- scope: resourceGroup()
209
- properties: {
210
- roleDefinitionId: dnsZoneContributorRoleId
211
- principalId: externalDnsIdentity!.properties.principalId
212
- principalType: 'ServicePrincipal'
213
- }
214
- }
215
-
216
- resource externalDnsFederatedCredential 'Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials@2023-01-31' = if (enableExternalDns) {
217
- parent: externalDnsIdentity
218
- name: 'external-dns'
219
- properties: {
220
- issuer: aks.properties.oidcIssuerProfile.issuerURL
221
- subject: 'system:serviceaccount:${rulebricksNamespace}:external-dns'
222
- audiences: [
223
- 'api://AzureADTokenExchange'
224
- ]
225
- }
226
- }
227
-
228
- resource vectorIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = if (enableBlobLogging) {
229
- name: '${clusterName}-vector'
230
- location: location
231
- }
232
-
233
- resource loggingStorageAccount 'Microsoft.Storage/storageAccounts@2023-01-01' existing = if (enableBlobLogging && !empty(loggingStorageAccountName)) {
234
- name: loggingStorageAccountName
235
- }
236
-
237
- resource vectorBlobRole 'Microsoft.Authorization/roleAssignments@2022-04-01' = if (enableBlobLogging && !empty(loggingStorageAccountName)) {
238
- name: guid(loggingStorageAccount.id, vectorIdentity!.id, 'Storage Blob Data Contributor')
239
- scope: loggingStorageAccount
240
- properties: {
241
- roleDefinitionId: storageBlobDataContributorRoleId
242
- principalId: vectorIdentity!.properties.principalId
243
- principalType: 'ServicePrincipal'
244
- }
245
- }
246
-
247
- resource vectorFederatedCredential 'Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials@2023-01-31' = if (enableBlobLogging) {
248
- parent: vectorIdentity
249
- name: 'vector'
250
- properties: {
251
- issuer: aks.properties.oidcIssuerProfile.issuerURL
252
- subject: 'system:serviceaccount:${rulebricksNamespace}:${vectorServiceAccountName}'
253
- audiences: [
254
- 'api://AzureADTokenExchange'
255
- ]
256
- }
257
- }
258
-
259
- resource prometheusIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
260
- name: '${clusterName}-prometheus'
261
- location: location
262
- }
263
-
264
- resource prometheusFederatedCredential 'Microsoft.ManagedIdentity/userAssignedIdentities/federatedIdentityCredentials@2023-01-31' = {
265
- parent: prometheusIdentity
266
- name: 'prometheus'
267
- properties: {
268
- issuer: aks.properties.oidcIssuerProfile.issuerURL
269
- subject: 'system:serviceaccount:${rulebricksNamespace}:${prometheusServiceAccountName}'
270
- audiences: [
271
- 'api://AzureADTokenExchange'
272
- ]
273
- }
274
- }
275
-
276
- output clusterName string = aks.name
277
- output resourceGroupName string = resourceGroup().name
278
- output location string = location
279
- output kubeconfigCommand string = 'az aks get-credentials --name ${clusterName} --resource-group ${resourceGroup().name}'
280
- output externalDnsClientId string = enableExternalDns ? externalDnsIdentity!.properties.clientId : ''
281
- output vectorClientId string = enableBlobLogging ? vectorIdentity!.properties.clientId : ''
282
- output prometheusClientId string = prometheusIdentity.properties.clientId
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
3
- "contentVersion": "1.0.0.0",
4
- "parameters": {
5
- "clusterName": { "value": "rulebricks-cluster" },
6
- "location": { "value": "eastus" },
7
- "kubernetesVersion": { "value": "1.34" },
8
- "nodeCount": { "value": 4 },
9
- "nodeVmSize": { "value": "Standard_D2ps_v5" },
10
- "osDiskSizeGB": { "value": 20 },
11
- "osDiskType": { "value": "Managed" },
12
-
13
- "rulebricksNamespace": { "value": "rulebricks" },
14
- "vectorServiceAccountName": { "value": "vector" },
15
- "prometheusServiceAccountName": { "value": "prometheus" },
16
- "enableExternalDns": { "value": false },
17
- "dnsZoneResourceGroup": { "value": "" },
18
- "enableBlobLogging": { "value": false },
19
- "loggingStorageAccountName": { "value": "" }
20
- }
21
- }
@@ -1,6 +0,0 @@
1
- interface CredentialsStepProps {
2
- onComplete: () => void;
3
- onBack: () => void;
4
- }
5
- export declare function CredentialsStep({ onComplete, onBack }: CredentialsStepProps): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,22 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from 'react';
3
- import { Box, Text, useInput } from 'ink';
4
- import TextInput from 'ink-text-input';
5
- import { useWizard } from '../WizardContext.js';
6
- import { BorderBox } from '../../common/index.js';
7
- export function CredentialsStep({ onComplete, onBack }) {
8
- const { state, dispatch } = useWizard();
9
- const [licenseKey, setLicenseKey] = useState(state.licenseKey || '');
10
- useInput((input, key) => {
11
- if (key.escape) {
12
- onBack();
13
- }
14
- });
15
- const handleSubmit = () => {
16
- if (!licenseKey)
17
- return;
18
- dispatch({ type: 'SET_LICENSE_KEY', key: licenseKey });
19
- onComplete();
20
- };
21
- return (_jsxs(BorderBox, { title: "Credentials", children: [_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsx(Text, { children: "Enter your Rulebricks license key:" }), _jsx(Text, { color: "gray", dimColor: true, children: "This is required to pull the Rulebricks Docker images" }), _jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: "cyan", children: "\u276F " }), _jsx(TextInput, { value: licenseKey, onChange: setLicenseKey, onSubmit: handleSubmit, placeholder: "Enter your license key", mask: "*" })] })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", dimColor: true, children: "Esc to go back \u2022 Enter to continue" }) })] }));
22
- }
@@ -1,5 +0,0 @@
1
- interface DeploymentModeStepProps {
2
- onComplete: () => void;
3
- }
4
- export declare function DeploymentModeStep({ onComplete }: DeploymentModeStepProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,26 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Text } from 'ink';
3
- import SelectInput from 'ink-select-input';
4
- import { useWizard } from '../WizardContext.js';
5
- import { BorderBox, useTheme } from '../../common/index.js';
6
- export function DeploymentModeStep({ onComplete }) {
7
- const { dispatch } = useWizard();
8
- const { colors } = useTheme();
9
- const items = [
10
- {
11
- label: 'Use existing Kubernetes cluster',
12
- value: 'existing',
13
- description: 'I already have a cluster configured'
14
- },
15
- {
16
- label: 'Provision new infrastructure',
17
- value: 'provision',
18
- description: 'Create a new cluster on AWS, GCP, or Azure'
19
- }
20
- ];
21
- const handleSelect = (item) => {
22
- dispatch({ type: 'SET_INFRA_MODE', mode: item.value });
23
- onComplete();
24
- };
25
- return (_jsxs(BorderBox, { title: "Deployment Mode", children: [_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsx(Text, { children: "How would you like to deploy Rulebricks?" }), _jsx(Text, { color: "gray", dimColor: true, children: "Select whether to use an existing cluster or provision new infrastructure" })] }), _jsx(Box, { marginY: 1, children: _jsx(SelectInput, { items: items, onSelect: handleSelect, itemComponent: ({ isSelected, label }) => (_jsx(Box, { children: _jsx(Text, { color: isSelected ? colors.accent : undefined, children: label }) })) }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", dimColor: true, children: "\u2191/\u2193 to navigate \u2022 Enter to select" }) })] }));
26
- }
@@ -1,6 +0,0 @@
1
- interface TierStepProps {
2
- onComplete: () => void;
3
- onBack: () => void;
4
- }
5
- export declare function TierStep({ onComplete, onBack }: TierStepProps): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Text, useInput } from 'ink';
3
- import SelectInput from 'ink-select-input';
4
- import { useWizard } from '../WizardContext.js';
5
- import { BorderBox, useTheme } from '../../common/index.js';
6
- import { TIER_CONFIGS } from '../../../types/index.js';
7
- export function TierStep({ onComplete, onBack }) {
8
- const { dispatch } = useWizard();
9
- const { colors } = useTheme();
10
- useInput((input, key) => {
11
- if (key.escape) {
12
- onBack();
13
- }
14
- });
15
- const items = Object.entries(TIER_CONFIGS).map(([tier, config]) => ({
16
- label: tier.charAt(0).toUpperCase() + tier.slice(1),
17
- value: tier,
18
- config
19
- }));
20
- const handleSelect = (item) => {
21
- dispatch({ type: 'SET_TIER', tier: item.value });
22
- onComplete();
23
- };
24
- return (_jsxs(BorderBox, { title: "Performance Tier", children: [_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsx(Text, { children: "Select your deployment size:" }), _jsx(Text, { color: "gray", dimColor: true, children: "This determines the cluster resources and scaling limits" })] }), _jsx(SelectInput, { items: items, onSelect: handleSelect, indicatorComponent: () => null, itemComponent: ({ isSelected, label }) => {
25
- const currentItem = items.find(i => i.label === label) || items[0];
26
- const config = currentItem.config;
27
- return (_jsxs(Box, { flexDirection: "column", marginY: isSelected ? 1 : 0, children: [_jsxs(Text, { color: isSelected ? colors.accent : undefined, bold: isSelected, children: [isSelected ? '❯ ' : ' ', currentItem.label, _jsxs(Text, { color: "gray", children: [" - ", config.description] })] }), isSelected && (_jsxs(Box, { flexDirection: "column", marginLeft: 4, children: [_jsxs(Text, { color: "gray", children: ["Throughput: ", config.throughput] }), _jsxs(Text, { color: "gray", children: ["Nodes: ", config.nodes.min, "-", config.nodes.max, " \u2022 ", config.resources] }), _jsxs(Text, { color: "gray", children: ["HPS Workers: ", config.hpsWorkerReplicas.min, "-", config.hpsWorkerReplicas.max] })] }))] }));
28
- } }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", dimColor: true, children: "Esc to go back \u2022 Enter to select" }) })] }));
29
- }
@@ -1,66 +0,0 @@
1
- import { CloudProvider, DeploymentConfig } from '../types/index.js';
2
- /**
3
- * Checks if Terraform is installed
4
- */
5
- export declare function isTerraformInstalled(): Promise<boolean>;
6
- /**
7
- * Gets the installed Terraform version
8
- */
9
- export declare function getTerraformVersion(): Promise<string>;
10
- /**
11
- * Copies terraform templates to the deployment directory
12
- */
13
- export declare function setupTerraformWorkspace(deploymentName: string, provider: CloudProvider): Promise<string>;
14
- /**
15
- * Initializes Terraform in the deployment directory
16
- */
17
- export declare function terraformInit(deploymentName: string): Promise<void>;
18
- /**
19
- * Plans Terraform changes
20
- */
21
- export declare function terraformPlan(deploymentName: string): Promise<void>;
22
- /**
23
- * Applies Terraform changes
24
- */
25
- export declare function terraformApply(deploymentName: string): Promise<void>;
26
- /**
27
- * Lightweight pre-deploy cleanup for the CloudWatch log group that the EKS module
28
- * no longer manages (create_cloudwatch_log_group = false). Safe to call before
29
- * terraform apply since it targets a resource outside terraform's control.
30
- */
31
- export declare function cleanupOrphanedResources(provider: CloudProvider, clusterName: string, region: string): Promise<void>;
32
- /**
33
- * Destroys Terraform infrastructure, then sweeps remaining cloud resources.
34
- *
35
- * Flow:
36
- * 1. terraform destroy (single attempt)
37
- * 2. Cloud-native cleanup ALWAYS runs (terraform can report success while
38
- * resources still exist)
39
- * 3. If terraform reported failure, try once more now that blockers are gone
40
- */
41
- export declare function terraformDestroy(deploymentName: string, cloudContext?: {
42
- provider: CloudProvider;
43
- clusterName: string;
44
- region: string;
45
- }): Promise<void>;
46
- /**
47
- * Gets Terraform outputs
48
- */
49
- export declare function getTerraformOutputs(deploymentName: string): Promise<Record<string, string>>;
50
- /**
51
- * Checks if Terraform files/state exist for a deployment.
52
- * Returns true if the terraform directory contains any terraform files,
53
- * not just the state file. This allows destroy to work on partial infrastructure.
54
- */
55
- export declare function hasTerraformState(deploymentName: string): Promise<boolean>;
56
- /**
57
- * Generates Terraform variables from deployment configuration
58
- */
59
- export declare function generateTerraformVars(config: DeploymentConfig): Record<string, unknown>;
60
- /**
61
- * Updates kubeconfig for the provisioned cluster
62
- */
63
- export declare function updateKubeconfig(provider: CloudProvider, clusterName: string, region: string, options?: {
64
- gcpProjectId?: string;
65
- azureResourceGroup?: string;
66
- }): Promise<void>;