Implementation:A5c ai Babysitter install environment
| Knowledge Sources | |
|---|---|
| Domains | Kubernetes, Environment_Installation |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
Concrete tool for installing and verifying a Kradle environment by applying Terraform and Helm to a Kubernetes cluster.
Description
The installEnvironment function orchestrates the full installation: it builds a deployment plan, renders Terraform and Kubernetes files, writes them to disk, then optionally applies them. When dryRun or renderOnly is set, files are written but not applied. Otherwise it runs terraform apply and helm install/upgrade.
The getEnvironmentStatus function queries the live cluster via kubectl to report the status of deployments, services, ingresses, and PVCs in the target namespace.
Usage
- Kradle deployment Step 4: Install the environment after rendering manifests.
- Kradle deployment Step 8: Verify environment status after installation.
Code Reference
Source Location
- Repository: Babysitter
- File: packages/kradle/installer/src/sdk/deploy.ts:L138-160 (status), L162-207 (install)
Signature
async function installEnvironment(
config: CloudConfig,
options?: InstallOptions
): Promise<InstallResult>;
// InstallOptions: { dryRun?, renderOnly?, workingDirectory? }
// InstallResult: { plan, terraform, kubernetes, terraformApply?, kubernetesApply?, providerConfiguration?, agentInstalls?, status }
async function getEnvironmentStatus(config: CloudConfig): Promise<EnvironmentStatus>;
// EnvironmentStatus: { namespace, resources: StatusResource[], commands: string[] }
Import
import { installEnvironment, getEnvironmentStatus } from "@a5c-ai/kradle/installer";
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| config | CloudConfig | Yes | Cloud config |
| options.dryRun | boolean | No | Render without applying |
| options.renderOnly | boolean | No | Render files only |
| options.workingDirectory | string | No | State directory |
Outputs
| Name | Type | Description |
|---|---|---|
| InstallResult | object | Plan, terraform, kubernetes, apply results, status |
| EnvironmentStatus | object | Namespace, resources, commands |
Usage Examples
Full Installation
import { loadCloudConfig, installEnvironment } from "@a5c-ai/kradle/installer";
const config = await loadCloudConfig({ environment: "staging" });
const result = await installEnvironment(config);
console.log("Status:", result.status);
if (result.terraformApply) console.log("Terraform applied:", result.terraformApply);
if (result.kubernetesApply) console.log("Kubernetes applied:", result.kubernetesApply);
Dry Run
const config = await loadCloudConfig({ environment: "eks" });
const result = await installEnvironment(config, { dryRun: true });
// Files rendered but not applied
Check Status
import { getEnvironmentStatus } from "@a5c-ai/kradle/installer";
const status = await getEnvironmentStatus(config);
for (const res of status.resources) {
console.log(`${res.name}: ${res.status || res.ready}`);
}