@rulebricks/cli 2.1.6 → 2.3.1
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.
- package/README.md +75 -14
- package/cluster-setup/aws/README.md +123 -0
- package/cluster-setup/aws/check-aws-access.sh +242 -0
- package/cluster-setup/aws/parameters.json +13 -0
- package/cluster-setup/aws/rulebricks-cluster.cfn.yaml +355 -0
- package/cluster-setup/azure/README.md +141 -0
- package/cluster-setup/azure/check-aks-prereqs.sh +276 -0
- package/cluster-setup/azure/parameters.json +30 -0
- package/cluster-setup/azure/rulebricks-cluster.bicep +546 -0
- package/cluster-setup/gcp/README.md +189 -0
- package/cluster-setup/gcp/check-gke-prereqs.sh +260 -0
- package/dist/commands/backup.d.ts +5 -0
- package/dist/commands/backup.js +104 -0
- package/dist/commands/deploy.d.ts +3 -1
- package/dist/commands/deploy.js +226 -326
- package/dist/commands/destroy.d.ts +1 -1
- package/dist/commands/destroy.js +73 -123
- package/dist/commands/init.d.ts +5 -1
- package/dist/commands/init.js +78 -47
- package/dist/commands/list.d.ts +1 -0
- package/dist/commands/list.js +74 -0
- package/dist/commands/open.d.ts +1 -1
- package/dist/commands/open.js +4 -12
- package/dist/commands/redeploy.d.ts +6 -0
- package/dist/commands/redeploy.js +310 -0
- package/dist/commands/restore.d.ts +5 -0
- package/dist/commands/restore.js +338 -0
- package/dist/commands/status.js +62 -49
- package/dist/commands/upgrade.js +74 -51
- package/dist/components/DNSWaitScreen.d.ts +5 -1
- package/dist/components/DNSWaitScreen.js +47 -41
- package/dist/components/Wizard/WizardContext.d.ts +174 -29
- package/dist/components/Wizard/WizardContext.js +896 -91
- package/dist/components/Wizard/steps/CloudProviderStep.js +192 -102
- package/dist/components/Wizard/steps/DomainStep.js +5 -24
- package/dist/components/Wizard/steps/ExternalServicesStep.d.ts +6 -0
- package/dist/components/Wizard/steps/ExternalServicesStep.js +645 -0
- package/dist/components/Wizard/steps/FeatureConfigStep.d.ts +2 -1
- package/dist/components/Wizard/steps/FeatureConfigStep.js +959 -248
- package/dist/components/Wizard/steps/FeaturesStep.js +31 -35
- package/dist/components/Wizard/steps/ObservabilityStep.d.ts +6 -0
- package/dist/components/Wizard/steps/ObservabilityStep.js +137 -0
- package/dist/components/Wizard/steps/ReviewStep.d.ts +2 -1
- package/dist/components/Wizard/steps/ReviewStep.js +56 -7
- package/dist/components/Wizard/steps/StorageStep.d.ts +9 -0
- package/dist/components/Wizard/steps/StorageStep.js +592 -0
- package/dist/components/Wizard/steps/SupabaseCredentialsStep.js +20 -21
- package/dist/components/Wizard/steps/VersionStep.js +45 -23
- package/dist/components/Wizard/steps/index.d.ts +3 -3
- package/dist/components/Wizard/steps/index.js +3 -3
- package/dist/components/common/CommandApproval.d.ts +12 -0
- package/dist/components/common/CommandApproval.js +91 -0
- package/dist/components/common/DeploymentPicker.d.ts +14 -0
- package/dist/components/common/DeploymentPicker.js +16 -0
- package/dist/components/common/index.d.ts +2 -0
- package/dist/components/common/index.js +2 -0
- package/dist/index.js +94 -62
- package/dist/lib/cloudCli.d.ts +134 -63
- package/dist/lib/cloudCli.js +512 -220
- package/dist/lib/clusterSetupDefaults.d.ts +30 -0
- package/dist/lib/clusterSetupDefaults.js +64 -0
- package/dist/lib/commandApproval.d.ts +26 -0
- package/dist/lib/commandApproval.js +114 -0
- package/dist/lib/config.d.ts +12 -10
- package/dist/lib/config.js +91 -33
- package/dist/lib/configFixtures.d.ts +5 -0
- package/dist/lib/configFixtures.js +513 -0
- package/dist/lib/deploymentHealth.d.ts +32 -0
- package/dist/lib/deploymentHealth.js +157 -0
- package/dist/lib/dns.d.ts +1 -1
- package/dist/lib/dns.js +19 -1
- package/dist/lib/dns.test.d.ts +1 -0
- package/dist/lib/dns.test.js +27 -0
- package/dist/lib/dockerHub.d.ts +12 -1
- package/dist/lib/dockerHub.js +18 -8
- package/dist/lib/helm.d.ts +4 -0
- package/dist/lib/helm.js +16 -0
- package/dist/lib/helmValues.d.ts +25 -0
- package/dist/lib/helmValues.js +1937 -259
- package/dist/lib/helmValues.test.d.ts +1 -0
- package/dist/lib/helmValues.test.js +966 -0
- package/dist/lib/htpasswd.d.ts +1 -0
- package/dist/lib/htpasswd.js +15 -0
- package/dist/lib/kubernetes.d.ts +126 -13
- package/dist/lib/kubernetes.js +624 -134
- package/dist/lib/secrets.d.ts +23 -0
- package/dist/lib/secrets.js +158 -0
- package/dist/lib/validateValues.d.ts +31 -0
- package/dist/lib/validateValues.js +253 -0
- package/dist/lib/versions.d.ts +82 -11
- package/dist/lib/versions.js +131 -31
- package/dist/lib/versions.test.d.ts +1 -0
- package/dist/lib/versions.test.js +81 -0
- package/dist/lib/wizardSteps.d.ts +14 -0
- package/dist/lib/wizardSteps.js +23 -0
- package/dist/lib/workloadIdentity.d.ts +26 -0
- package/dist/lib/workloadIdentity.js +323 -0
- package/dist/lib/workloadIdentity.test.d.ts +1 -0
- package/dist/lib/workloadIdentity.test.js +57 -0
- package/dist/types/index.d.ts +2152 -95
- package/dist/types/index.js +554 -286
- package/package.json +10 -4
- package/schema/values.schema.json +1934 -0
- package/dist/components/Wizard/steps/CredentialsStep.d.ts +0 -6
- package/dist/components/Wizard/steps/CredentialsStep.js +0 -22
- package/dist/components/Wizard/steps/DeploymentModeStep.d.ts +0 -5
- package/dist/components/Wizard/steps/DeploymentModeStep.js +0 -26
- package/dist/components/Wizard/steps/TierStep.d.ts +0 -6
- package/dist/components/Wizard/steps/TierStep.js +0 -29
- package/dist/lib/terraform.d.ts +0 -66
- package/dist/lib/terraform.js +0 -754
- package/terraform/aws/main.tf +0 -355
- package/terraform/azure/main.tf +0 -371
- package/terraform/gcp/main.tf +0 -407
|
@@ -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,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,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
|
-
}
|
package/dist/lib/terraform.d.ts
DELETED
|
@@ -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>;
|