diff --git a/bun.lockb b/bun.lockb index dcf997e..386d06a 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/scripts/local/check.sh b/scripts/local/check.sh index 9c36965..3e1ef7c 100755 --- a/scripts/local/check.sh +++ b/scripts/local/check.sh @@ -13,4 +13,4 @@ for service in ${SERVICES[@]}; do fi done -echo "🔧 Done!" \ No newline at end of file +echo "🔧 Done!" diff --git a/src/books/physical-cluster-creation/aws.ts b/src/books/physical-cluster-creation/aws.ts index 0ce720a..08c8f5a 100644 --- a/src/books/physical-cluster-creation/aws.ts +++ b/src/books/physical-cluster-creation/aws.ts @@ -1,13 +1,13 @@ -import type { PhysicalClusterCloudCreator } from "./cloud.ts"; -import { $ } from "bun"; -import * as path from "node:path"; -import type { UtilPrompter } from "../../lib/prompts/util-prompter.ts"; -import { input } from "@inquirer/prompts"; -import type { YamlManipulator } from "../../lib/utility/yaml-manipulator.ts"; -import type { KubectlUtil } from "../../lib/utility/kubectl-util.ts"; -import type { LandscapeCluster, ServiceTreeService } from "../../lib/service-tree-def.ts"; -import type { TaskRunner } from "../../tasks/tasks.ts"; -import type { Git } from "../../lib/utility/git.ts"; +import type { PhysicalClusterCloudCreator } from './cloud.ts'; +import { $ } from 'bun'; +import * as path from 'node:path'; +import type { UtilPrompter } from '../../lib/prompts/util-prompter.ts'; +import { input } from '@inquirer/prompts'; +import type { YamlManipulator } from '../../lib/utility/yaml-manipulator.ts'; +import type { KubectlUtil } from '../../lib/utility/kubectl-util.ts'; +import type { LandscapeCluster, ServiceTreeService } from '../../lib/service-tree-def.ts'; +import type { TaskRunner } from '../../tasks/tasks.ts'; +import type { Git } from '../../lib/utility/git.ts'; class AwsPhysicalClusterCreator implements PhysicalClusterCloudCreator { slug: string; @@ -22,14 +22,14 @@ class AwsPhysicalClusterCreator implements PhysicalClusterCloudCreator { private sulfoxideHelium: ServiceTreeService, private sulfoxideKrypton: ServiceTreeService, private sulfoxideLead: ServiceTreeService, - slug: string + slug: string, ) { this.slug = slug; } async Run( [phyLandscape, phyCluster]: LandscapeCluster, - [adminLandscape, adminCluster]: LandscapeCluster + [adminLandscape, adminCluster]: LandscapeCluster, ): Promise { // constants const tofu = this.sulfoxideTofu; @@ -42,43 +42,43 @@ class AwsPhysicalClusterCreator implements PhysicalClusterCloudCreator { const Kr_Dir = `./platforms/${Kr.platform.slug}/${Kr.principal.slug}`; const Pb_Dir = `./platforms/${Pb.platform.slug}/${Pb.principal.slug}`; - const He_YamlPath = path.join(He_Dir, "chart", `values.${adminLandscape.slug}.${adminCluster.set.slug}.yaml`); - const Kr_YamlPath = path.join(Kr_Dir, "chart", `values.${phyLandscape.slug}.${phyCluster.principal.slug}.yaml`); - const Pb_YamlPath = path.join(Pb_Dir, "chart", `values.${phyLandscape.slug}.${phyCluster.principal.slug}.yaml`); + const He_YamlPath = path.join(He_Dir, 'chart', `values.${adminLandscape.slug}.${adminCluster.set.slug}.yaml`); + const Kr_YamlPath = path.join(Kr_Dir, 'chart', `values.${phyLandscape.slug}.${phyCluster.principal.slug}.yaml`); + const Pb_YamlPath = path.join(Pb_Dir, 'chart', `values.${phyLandscape.slug}.${phyCluster.principal.slug}.yaml`); const aCtx = `${adminLandscape.slug}-${adminCluster.principal.slug}`; const aNS = `${He.platform.slug}-${He.principal.slug}`; // Check if we want to inject the DO secrets - const awsSecrets = await this.up.YesNo("Do you want to inject AWS secrets?"); + const awsSecrets = await this.up.YesNo('Do you want to inject AWS secrets?'); if (awsSecrets) { - const access = await input({ message: "Enter your AWS Access Key" }); + const access = await input({ message: 'Enter your AWS Access Key' }); await $`infisical secrets set --projectId=${tofu.principal.projectId} --env=${phyLandscape.slug} ${phyCluster.principal.slug.toUpperCase()}_AWS_ACCESS_KEY=${access}`; - console.log("✅ AWS Access Key injected"); - const secret = await input({ message: "Enter your AWS Secret Key" }); + console.log('✅ AWS Access Key injected'); + const secret = await input({ message: 'Enter your AWS Secret Key' }); await $`infisical secrets set --projectId=${tofu.principal.projectId} --env=${phyLandscape.slug} ${phyCluster.principal.slug.toUpperCase()}_AWS_SECRET_KEY=${secret}`; - console.log("✅ AWS Secret Key injected"); + console.log('✅ AWS Secret Key injected'); } const L0 = `${phyLandscape.slug}:l0:${phyCluster.principal.slug}`; await this.task.Run([ - "Build L0 Infrastructure", + 'Build L0 Infrastructure', async () => { await $`pls setup`.cwd(tofuDir); await $`pls ${{ raw: L0 }}:init`.cwd(tofuDir); await $`pls ${{ raw: L0 }}:apply`.cwd(tofuDir); - } + }, ]); await this.task.Run([ - "Retrieve Kubectl Configurations", + 'Retrieve Kubectl Configurations', async () => { await $`pls kubectl`; - } + }, ]); // extract endpoint to use - console.log("📤 Extract endpoint to use..."); + console.log('📤 Extract endpoint to use...'); const output = await $`pls ${{ raw: L0 }}:output -- -json`.cwd(tofuDir).json(); const endpoint = output.cluster_endpoint.value; console.log(`✅ Extracted endpoint: ${endpoint}`); @@ -86,154 +86,154 @@ class AwsPhysicalClusterCreator implements PhysicalClusterCloudCreator { // build L1 generic infrastructure const L1G = `${phyLandscape.slug}:l1:${phyCluster.set.slug}`; await this.task.Run([ - "Build L1 Generic Infrastructure", + 'Build L1 Generic Infrastructure', async () => { await $`pls ${{ raw: L1G }}:init`.cwd(tofuDir); await $`pls ${{ raw: L1G }}:apply`.cwd(tofuDir); - } + }, ]); // Propagate Tofu outputs for Karpenter const nodeRole = output.karpenter_node_role_name.value; const nodeArn = output.karpenter_role_arn.value; - console.log("📤 Extract node role and ARN to use..."); + console.log('📤 Extract node role and ARN to use...'); console.log(`✅ Extracted node role: ${nodeRole}`); console.log(`✅ Extracted node ARN: ${nodeArn}`); await this.task.Run([ - "Propagate Tofu outputs to Krypton (Karpenter)", + 'Propagate Tofu outputs to Krypton (Karpenter)', async () => { console.log(`🛣️ Propagating YAML Path: ${Kr_YamlPath}`); await this.y.Mutate(Kr_YamlPath, [ - [["nodeRole"], nodeRole], - [["karpenterRole"], nodeArn], + [['nodeRole'], nodeRole], + [['karpenterRole'], nodeArn], ]); - } + }, ]); await this.task.Run([ - "Commit changes to Krypton", + 'Commit changes to Krypton', async () => { - await this.g.CommitAndPush(Kr_Dir, "action: propagate Tofu outputs to Krypton"); - } + await this.g.CommitAndPush(Kr_Dir, 'action: propagate Tofu outputs to Krypton'); + }, ]); // propagate Tofu outputs for Lead const irsaRoleArn = output.irsa_role_arn.value; const vpcId = output.vpc_id.value; - console.log("📤 Extract IRSA Role ARN and VPC ID to use..."); + console.log('📤 Extract IRSA Role ARN and VPC ID to use...'); console.log(`✅ Extracted IRSA Role ARN: ${irsaRoleArn}`); console.log(`✅ Extracted VPC ID: ${vpcId}`); await this.task.Run([ - "Propagate Tofu outputs to Lead (IRSA Components)", + 'Propagate Tofu outputs to Lead (IRSA Components)', async () => { await this.y.Mutate(Pb_YamlPath, [ - [["role"], irsaRoleArn], - [["vpcId"], vpcId], + [['role'], irsaRoleArn], + [['vpcId'], vpcId], ]); - } + }, ]); await this.task.Run([ - "Commit changes to Lead", + 'Commit changes to Lead', async () => { - await this.g.CommitAndPush(Pb_Dir, "action: propagate Tofu outputs to Lead"); - } + await this.g.CommitAndPush(Pb_Dir, 'action: propagate Tofu outputs to Lead'); + }, ]); // build L1 infrastructure const L1 = `${phyLandscape.slug}:l1:${phyCluster.principal.slug}`; await this.task.Run([ - "Build L1 Infrastructure", + 'Build L1 Infrastructure', async () => { await $`pls ${{ raw: L1 }}:init`.cwd(tofuDir); await $`pls ${{ raw: L1 }}:apply`.cwd(tofuDir); - } + }, ]); // retrieve yaml in helium folder and replace await this.task.Run([ - "Update Helium Configuration", + 'Update Helium Configuration', async () => { await this.y.Mutate(He_YamlPath, [ - [["connector", "clusters", phyLandscape.slug, phyCluster.principal.slug, "enable"], true], - [["connector", "clusters", phyLandscape.slug, phyCluster.principal.slug, "deployAppSet"], true], - [["connector", "clusters", phyLandscape.slug, phyCluster.principal.slug, "aoa", "enable"], true], - [["connector", "clusters", phyLandscape.slug, phyCluster.principal.slug, "destination"], endpoint] + [['connector', 'clusters', phyLandscape.slug, phyCluster.principal.slug, 'enable'], true], + [['connector', 'clusters', phyLandscape.slug, phyCluster.principal.slug, 'deployAppSet'], true], + [['connector', 'clusters', phyLandscape.slug, phyCluster.principal.slug, 'aoa', 'enable'], true], + [['connector', 'clusters', phyLandscape.slug, phyCluster.principal.slug, 'destination'], endpoint], ]); - } + }, ]); // apply ArgoCD configurations const HePls = `${adminLandscape.slug}:${adminCluster.set.slug}`; await this.task.Run([ - "Apply Helium Configuration", + 'Apply Helium Configuration', async () => { await $`pls ${{ raw: HePls }}:install -- --kube-context ${aCtx} -n ${aNS}`.cwd(He_Dir); - } + }, ]); // retrieve kubectl configurations again await this.task.Run([ - "Retrieve Kubectl Configurations", + 'Retrieve Kubectl Configurations', async () => { await $`pls kubectl`; - } + }, ]); // wait for iodine to be ready - console.log("🕙 Waiting for iodine to be ready..."); + console.log('🕙 Waiting for iodine to be ready...'); await this.task.Exec([ - "Wait for iodine applications to be ready", + 'Wait for iodine applications to be ready', async () => { await this.k.WaitForApplications(3, { - kind: "app", + kind: 'app', context: aCtx, namespace: aNS, selector: [ - ["atomi.cloud/sync-wave", "wave-5"], - ["atomi.cloud/landscape", phyLandscape.slug], - ["atomi.cloud/cluster", phyCluster.principal.slug] - ] + ['atomi.cloud/sync-wave', 'wave-5'], + ['atomi.cloud/landscape', phyLandscape.slug], + ['atomi.cloud/cluster', phyCluster.principal.slug], + ], }); - } + }, ]); await this.task.Exec([ - "Wait for statefulset (etcd) to be ready", + 'Wait for statefulset (etcd) to be ready', async () => { - for (const ns of ["pichu", "pikachu", "raichu"]) { + for (const ns of ['pichu', 'pikachu', 'raichu']) { await this.k.WaitForReplica({ - kind: "statefulset", + kind: 'statefulset', context: `${phyLandscape.slug}-${phyCluster.principal.slug}`, namespace: ns, - name: `${phyLandscape.slug}-${ns}-iodine-etcd` + name: `${phyLandscape.slug}-${ns}-iodine-etcd`, }); } - } + }, ]); await this.task.Exec([ - "Wait for deployment (iodine) to be ready", + 'Wait for deployment (iodine) to be ready', async () => { - for (const ns of ["pichu", "pikachu", "raichu"]) { + for (const ns of ['pichu', 'pikachu', 'raichu']) { await this.k.WaitForReplica({ - kind: "deployment", + kind: 'deployment', context: `${phyLandscape.slug}-${phyCluster.principal.slug}`, namespace: ns, - name: `${phyLandscape.slug}-${ns}-iodine` + name: `${phyLandscape.slug}-${ns}-iodine`, }); } - } + }, ]); // retrieve kubectl configurations again await this.task.Run([ - "Retrieve Kubectl Configurations", + 'Retrieve Kubectl Configurations', async () => { await $`pls kubectl`; - } + }, ]); // last applications to be ready @@ -241,16 +241,16 @@ class AwsPhysicalClusterCreator implements PhysicalClusterCloudCreator { "Wait for vcluster carbon's last sync wave to be ready", async () => { await this.k.WaitForApplications(3, { - kind: "app", + kind: 'app', context: aCtx, namespace: aNS, selector: [ - ["atomi.cloud/sync-wave", "wave-5"], - ["atomi.cloud/element", "silicon"], - ["atomi.cloud/cluster", phyCluster.principal.slug] - ] + ['atomi.cloud/sync-wave', 'wave-5'], + ['atomi.cloud/element', 'silicon'], + ['atomi.cloud/cluster', phyCluster.principal.slug], + ], }); - } + }, ]); } } diff --git a/src/init/index.ts b/src/init/index.ts index c9be5fd..fe0785c 100644 --- a/src/init/index.ts +++ b/src/init/index.ts @@ -1,12 +1,12 @@ -import { UtilPrompter } from "../lib/prompts/util-prompter.ts"; -import { HttpUtil } from "../lib/utility/http-util.ts"; -import { KubectlUtil } from "../lib/utility/kubectl-util.ts"; -import { ServiceTreePrinter } from "../lib/utility/service-tree-printer.ts"; -import { YamlManipulator } from "../lib/utility/yaml-manipulator.ts"; -import { ServiceTreePrompter } from "../lib/prompts/landscape.ts"; -import { CLOUD_TREE, LANDSCAPE_TREE } from "../lib/service-tree.ts"; -import { TaskRunner } from "../tasks/tasks.ts"; -import { Git } from "../lib/utility/git.ts"; +import { UtilPrompter } from '../lib/prompts/util-prompter.ts'; +import { HttpUtil } from '../lib/utility/http-util.ts'; +import { KubectlUtil } from '../lib/utility/kubectl-util.ts'; +import { ServiceTreePrinter } from '../lib/utility/service-tree-printer.ts'; +import { YamlManipulator } from '../lib/utility/yaml-manipulator.ts'; +import { ServiceTreePrompter } from '../lib/prompts/landscape.ts'; +import { CLOUD_TREE, LANDSCAPE_TREE } from '../lib/service-tree.ts'; +import { TaskRunner } from '../tasks/tasks.ts'; +import { Git } from '../lib/utility/git.ts'; interface Dependencies { httpUtil: HttpUtil; @@ -25,11 +25,7 @@ const utilPrompter = new UtilPrompter(); const kubectl = new KubectlUtil(utilPrompter); const serviceTreePrinter = new ServiceTreePrinter(); const yamlManipulator = new YamlManipulator(); -const stp = new ServiceTreePrompter( - CLOUD_TREE, - LANDSCAPE_TREE.a, - LANDSCAPE_TREE.p, -); +const stp = new ServiceTreePrompter(CLOUD_TREE, LANDSCAPE_TREE.a, LANDSCAPE_TREE.p); const taskRunner = new TaskRunner(utilPrompter); const git = new Git(); diff --git a/src/init/runbooks.ts b/src/init/runbooks.ts index 3d05bd3..a330897 100644 --- a/src/init/runbooks.ts +++ b/src/init/runbooks.ts @@ -1,23 +1,23 @@ -import type { Dependencies } from "./index.ts"; -import type { TaskGenerator } from "./tasks.ts"; -import type { RunBook } from "../books/run-book.ts"; -import type { PhysicalClusterCloudCreator } from "../books/physical-cluster-creation/cloud.ts"; -import { DigitalOceanPhysicalClusterCreator } from "../books/physical-cluster-creation/digital-ocean.ts"; -import { CLOUDS, LANDSCAPE_TREE, SERVICE_TREE } from "../lib/service-tree.ts"; -import { PhysicalClusterCreator } from "../books/physical-cluster-creation"; -import { GracefulPhysicalClusterDestructor } from "../books/graceful-physical-cluster-destruction"; -import { BareAdminClusterCreator } from "../books/bare-admin-cluster-creation"; -import type { BareAdminClusterCloudCreator } from "../books/bare-admin-cluster-creation/cloud.ts"; -import { DigitalOceanBareAdminClusterCreator } from "../books/bare-admin-cluster-creation/digital-ocean.ts"; -import type { FullAdminClusterCloudCreator } from "../books/full-admin-cluster-creation/cloud.ts"; -import { DigitalOceanFullAdminClusterCreator } from "../books/full-admin-cluster-creation/digital-ocean.ts"; -import { FullAdminClusterCreator } from "../books/full-admin-cluster-creation"; -import { GracefulAdminClusterDestructor } from "../books/graceful-admin-cluster-destruction"; -import { GenericGracefulAdminClusterDestructor } from "../books/graceful-admin-cluster-destruction/generic.ts"; -import { GenericGracefulPhysicalClusterDestructor } from "../books/graceful-physical-cluster-destruction/generic.ts"; -import { AdminClusterMigrator } from "../books/admin-cluster-migration"; -import { AdminClusterTransitioner } from "../books/admin-cluster-migration/transition.ts"; -import { AwsPhysicalClusterCreator } from "../books/physical-cluster-creation/aws.ts"; +import type { Dependencies } from './index.ts'; +import type { TaskGenerator } from './tasks.ts'; +import type { RunBook } from '../books/run-book.ts'; +import type { PhysicalClusterCloudCreator } from '../books/physical-cluster-creation/cloud.ts'; +import { DigitalOceanPhysicalClusterCreator } from '../books/physical-cluster-creation/digital-ocean.ts'; +import { CLOUDS, LANDSCAPE_TREE, SERVICE_TREE } from '../lib/service-tree.ts'; +import { PhysicalClusterCreator } from '../books/physical-cluster-creation'; +import { GracefulPhysicalClusterDestructor } from '../books/graceful-physical-cluster-destruction'; +import { BareAdminClusterCreator } from '../books/bare-admin-cluster-creation'; +import type { BareAdminClusterCloudCreator } from '../books/bare-admin-cluster-creation/cloud.ts'; +import { DigitalOceanBareAdminClusterCreator } from '../books/bare-admin-cluster-creation/digital-ocean.ts'; +import type { FullAdminClusterCloudCreator } from '../books/full-admin-cluster-creation/cloud.ts'; +import { DigitalOceanFullAdminClusterCreator } from '../books/full-admin-cluster-creation/digital-ocean.ts'; +import { FullAdminClusterCreator } from '../books/full-admin-cluster-creation'; +import { GracefulAdminClusterDestructor } from '../books/graceful-admin-cluster-destruction'; +import { GenericGracefulAdminClusterDestructor } from '../books/graceful-admin-cluster-destruction/generic.ts'; +import { GenericGracefulPhysicalClusterDestructor } from '../books/graceful-physical-cluster-destruction/generic.ts'; +import { AdminClusterMigrator } from '../books/admin-cluster-migration'; +import { AdminClusterTransitioner } from '../books/admin-cluster-migration/transition.ts'; +import { AwsPhysicalClusterCreator } from '../books/physical-cluster-creation/aws.ts'; function initRunBooks(d: Dependencies, t: TaskGenerator): RunBook[] { const sulfoxide = SERVICE_TREE.sulfoxide; @@ -31,7 +31,7 @@ function initRunBooks(d: Dependencies, t: TaskGenerator): RunBook[] { d.kubectl, sulfoxide.services.tofu, sulfoxide.services.argocd, - CLOUDS.DigitalOcean.slug + CLOUDS.DigitalOcean.slug, ), new AwsPhysicalClusterCreator( d.taskRunner, @@ -43,8 +43,8 @@ function initRunBooks(d: Dependencies, t: TaskGenerator): RunBook[] { sulfoxide.services.argocd, sulfoxide.services.cluster_scaler, sulfoxide.services.aws_adapter, - CLOUDS.AWS.slug - ) + CLOUDS.AWS.slug, + ), ]; const physicalClusterCreator = new PhysicalClusterCreator( d.taskRunner, @@ -52,7 +52,7 @@ function initRunBooks(d: Dependencies, t: TaskGenerator): RunBook[] { t.nitrosoWaiter, sulfoxide.services.argocd, LANDSCAPE_TREE.v, - phyClusterCreators + phyClusterCreators, ); // graceful physical cluster destruction @@ -63,13 +63,13 @@ function initRunBooks(d: Dependencies, t: TaskGenerator): RunBook[] { d.utilPrompter, sulfoxide.services.tofu, sulfoxide.services.argocd, - LANDSCAPE_TREE.v + LANDSCAPE_TREE.v, ); const phyGracefulDestructor = new GracefulPhysicalClusterDestructor( d.stp, d.serviceTreePrinter, - genericPhyGracefulDestructor + genericPhyGracefulDestructor, ); // bare admin cluster creation @@ -82,8 +82,8 @@ function initRunBooks(d: Dependencies, t: TaskGenerator): RunBook[] { sulfoxide.services.backup_engine, sulfoxide.services.metricsServer, t.sulfoxideXenonWaiter, - CLOUDS.DigitalOcean.slug - ) + CLOUDS.DigitalOcean.slug, + ), ]; const bareAdminClusterCreator = new BareAdminClusterCreator(d.stp, d.serviceTreePrinter, bareAdminCloudCreators); @@ -95,15 +95,15 @@ function initRunBooks(d: Dependencies, t: TaskGenerator): RunBook[] { sulfoxide.services.internal_ingress, t.sulfoxideHeliumWaiter, t.sulfoxideBoronWaiter, - CLOUDS.DigitalOcean.slug - ) + CLOUDS.DigitalOcean.slug, + ), ]; const fullAdminCloudCreator = new FullAdminClusterCreator( d.stp, d.serviceTreePrinter, bareAdminCloudCreators, - fullAdminCloudCreators + fullAdminCloudCreators, ); // graceful admin cluster destruction @@ -112,13 +112,13 @@ function initRunBooks(d: Dependencies, t: TaskGenerator): RunBook[] { d.kubectl, sulfoxide.services.argocd, sulfoxide.services.internal_ingress, - sulfoxide.services.tofu + sulfoxide.services.tofu, ); const adminGracefulDestructor = new GracefulAdminClusterDestructor( d.stp, d.serviceTreePrinter, - genericAdminGracefulDestructor + genericAdminGracefulDestructor, ); // admin cluster migration @@ -129,14 +129,14 @@ function initRunBooks(d: Dependencies, t: TaskGenerator): RunBook[] { sulfoxide.services.backup_engine, sulfoxide.services.internal_ingress, t.sulfoxideHeliumWaiter, - t.sulfoxideBoronWaiter + t.sulfoxideBoronWaiter, ); const adminClusterMigrator = new AdminClusterMigrator( d.stp, d.serviceTreePrinter, bareAdminCloudCreators, genericAdminGracefulDestructor, - adminClusterTransitioner + adminClusterTransitioner, ); return [ @@ -145,7 +145,7 @@ function initRunBooks(d: Dependencies, t: TaskGenerator): RunBook[] { bareAdminClusterCreator, fullAdminCloudCreator, adminGracefulDestructor, - adminClusterMigrator + adminClusterMigrator, ]; } diff --git a/src/lib/service-tree.ts b/src/lib/service-tree.ts index ad5ab0e..9601e52 100644 --- a/src/lib/service-tree.ts +++ b/src/lib/service-tree.ts @@ -5,215 +5,215 @@ import type { CloudTreeClusterSetPrincipal, ServiceTreeLandscapePrincipal, ServiceTreePlatform, - ServiceTreePlatformPrincipal -} from "./service-tree-def.ts"; + ServiceTreePlatformPrincipal, +} from './service-tree-def.ts'; const LANDSCAPES = { arceus: { - name: "Arceus", - slug: "arceus", - description: "Global meta landscape-agnostic administrative environment" + name: 'Arceus', + slug: 'arceus', + description: 'Global meta landscape-agnostic administrative environment', }, pinsir: { - name: "Pinsir", - slug: "pinsir", - description: "Continuous Integration" + name: 'Pinsir', + slug: 'pinsir', + description: 'Continuous Integration', }, lapras: { - name: "Lapras", - slug: "lapras", - description: "Local development" + name: 'Lapras', + slug: 'lapras', + description: 'Local development', }, tauros: { - name: "Tauros", - slug: "tauros", - description: "Local Development (Production Parity)" + name: 'Tauros', + slug: 'tauros', + description: 'Local Development (Production Parity)', }, absol: { - name: "Absol", - slug: "absol", - description: "Test environment" + name: 'Absol', + slug: 'absol', + description: 'Test environment', }, pichu: { - name: "Pichu", - slug: "pichu", - description: "Singapore Development Environment" + name: 'Pichu', + slug: 'pichu', + description: 'Singapore Development Environment', }, pikachu: { - name: "Pikachu", - slug: "pikachu", - description: "Singapore Staging Environment" + name: 'Pikachu', + slug: 'pikachu', + description: 'Singapore Staging Environment', }, raichu: { - name: "Raichu", - slug: "raichu", - description: "Singapore Production Environment" + name: 'Raichu', + slug: 'raichu', + description: 'Singapore Production Environment', }, suicune: { - name: "Suicune", - slug: "suicune", - description: "Singapore administrative environment" + name: 'Suicune', + slug: 'suicune', + description: 'Singapore administrative environment', }, entei: { - name: "Entei", - slug: "entei", - description: "Singapore physical landscape" - } + name: 'Entei', + slug: 'entei', + description: 'Singapore physical landscape', + }, } satisfies Record; const CLOUDS = { DigitalOcean: { - name: "DigitalOcean", - slug: "digitalocean", - description: "DigitalOcean Cloud" + name: 'DigitalOcean', + slug: 'digitalocean', + description: 'DigitalOcean Cloud', }, Linode: { - name: "Linode", - slug: "linode", - description: "Linode Cloud, Akamai" + name: 'Linode', + slug: 'linode', + description: 'Linode Cloud, Akamai', }, Vultr: { - name: "Vultr", - slug: "vultr", - description: "Vultr Cloud" + name: 'Vultr', + slug: 'vultr', + description: 'Vultr Cloud', }, AWS: { - name: "AWS", - slug: "aws", - description: "AWS Cloud, Amazon Web Services" + name: 'AWS', + slug: 'aws', + description: 'AWS Cloud, Amazon Web Services', }, GCP: { - name: "GCP", - slug: "gcp", - description: "GCP Cloud, Google Cloud Platform" + name: 'GCP', + slug: 'gcp', + description: 'GCP Cloud, Google Cloud Platform', }, Azure: { - name: "Azure", - slug: "azure", - description: "Azure Cloud, Microsoft Azure" - } + name: 'Azure', + slug: 'azure', + description: 'Azure Cloud, Microsoft Azure', + }, } satisfies Record; const CLUSTER_SETS = { OpalRuby: { - name: "OpalRuby", - slug: "opal-ruby", - description: "Opal-Ruby Cluster Set" + name: 'OpalRuby', + slug: 'opal-ruby', + description: 'Opal-Ruby Cluster Set', }, OnyxJade: { - name: "OnyxJade", - slug: "onyx-jade", - description: "Onyx-Jade Cluster Set" + name: 'OnyxJade', + slug: 'onyx-jade', + description: 'Onyx-Jade Cluster Set', }, MicaTalc: { - name: "MicaTalc", - slug: "mica-talc", - description: "Mica-Talc Cluster Set" + name: 'MicaTalc', + slug: 'mica-talc', + description: 'Mica-Talc Cluster Set', }, TopazAmber: { - name: "TopazAmber", - slug: "topaz-amber", - description: "Topaz-Amber Cluster Set" + name: 'TopazAmber', + slug: 'topaz-amber', + description: 'Topaz-Amber Cluster Set', }, AgateLapis: { - name: "AgateLapis", - slug: "agate-lapis", - description: "Agate-Lapis Cluster Set" + name: 'AgateLapis', + slug: 'agate-lapis', + description: 'Agate-Lapis Cluster Set', }, BerylCoral: { - name: "BerylCoral", - slug: "beryl-coral", - description: "Beryl-Coral Cluster Set" - } + name: 'BerylCoral', + slug: 'beryl-coral', + description: 'Beryl-Coral Cluster Set', + }, } satisfies Record; const CLUSTERS = { Opal: { - name: "Opal", - slug: "opal", - description: "Opal Cluster" + name: 'Opal', + slug: 'opal', + description: 'Opal Cluster', }, Ruby: { - name: "Ruby", - slug: "ruby", - description: "Ruby Cluster" + name: 'Ruby', + slug: 'ruby', + description: 'Ruby Cluster', }, Onyx: { - name: "Onyx", - slug: "onyx", - description: "Onyx Cluster" + name: 'Onyx', + slug: 'onyx', + description: 'Onyx Cluster', }, Jade: { - name: "Jade", - slug: "jade", - description: "Jade Cluster" + name: 'Jade', + slug: 'jade', + description: 'Jade Cluster', }, Mica: { - name: "mica", - slug: "mica", - description: "Mica Cluster" + name: 'mica', + slug: 'mica', + description: 'Mica Cluster', }, Talc: { - name: "Talc", - slug: "talc", - description: "Talc Cluster" + name: 'Talc', + slug: 'talc', + description: 'Talc Cluster', }, Topaz: { - name: "Topaz", - slug: "topaz", - description: "Topaz Cluster" + name: 'Topaz', + slug: 'topaz', + description: 'Topaz Cluster', }, Amber: { - name: "Amber", - slug: "amber", - description: "Amber Cluster" + name: 'Amber', + slug: 'amber', + description: 'Amber Cluster', }, Agate: { - name: "Agate", - slug: "agate", - description: "Agate Cluster" + name: 'Agate', + slug: 'agate', + description: 'Agate Cluster', }, Lapis: { - name: "Lapis", - slug: "lapis", - description: "Lapis Cluster" + name: 'Lapis', + slug: 'lapis', + description: 'Lapis Cluster', }, Beryl: { - name: "Beryl", - slug: "beryl", - description: "Beryl Cluster" + name: 'Beryl', + slug: 'beryl', + description: 'Beryl Cluster', }, Coral: { - name: "Coral", - slug: "coral", - description: "Coral Cluster" - } + name: 'Coral', + slug: 'coral', + description: 'Coral Cluster', + }, } satisfies Record; const PLATFORMS = { Sulfoxide: { - name: "Sulfoxide", - slug: "sulfoxide", - description: "System and infrastructure components" + name: 'Sulfoxide', + slug: 'sulfoxide', + description: 'System and infrastructure components', }, Nitroso: { - name: "Nitroso", - slug: "nitroso", - description: "BunnyBooker" + name: 'Nitroso', + slug: 'nitroso', + description: 'BunnyBooker', }, Azo: { - name: "Azo", - slug: "azo", - description: "Romantic Song Composer" - } + name: 'Azo', + slug: 'azo', + description: 'Romantic Song Composer', + }, } satisfies Record; // Associations @@ -223,231 +223,231 @@ const SERVICE_TREE = { services: { aws_adapter: { principal: { - name: "AWS Adapter", - slug: "lead", - description: "AWS Adapters, like CSI and ELB controller", - projectId: "" + name: 'AWS Adapter', + slug: 'lead', + description: 'AWS Adapters, like CSI and ELB controller', + projectId: '', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, sos: { principal: { - name: "Secret of secrets", - slug: "sos", - description: "Secrets of other infisical secrets", - projectId: "1cffa31e-7653-4c0d-9a18-9914a2dbc30b" + name: 'Secret of secrets', + slug: 'sos', + description: 'Secrets of other infisical secrets', + projectId: '1cffa31e-7653-4c0d-9a18-9914a2dbc30b', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, metricsServer: { principal: { - name: "Metrics Server", - slug: "xenon", - description: "Metrics Server for Cluster", - projectId: "" + name: 'Metrics Server', + slug: 'xenon', + description: 'Metrics Server for Cluster', + projectId: '', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, tofu: { principal: { - name: "Tofu", - slug: "tofu", - description: "IaC for AtomiCloud", - projectId: "5c418f54-d211-46dd-a263-e4c07585b47d" + name: 'Tofu', + slug: 'tofu', + description: 'IaC for AtomiCloud', + projectId: '5c418f54-d211-46dd-a263-e4c07585b47d', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, argocd: { principal: { - name: "ArgoCD", - slug: "helium", - description: "Deployment platform using GitOps", - projectId: "7b458fa1-1225-40ce-8e48-3f4a67031bc0" + name: 'ArgoCD', + slug: 'helium', + description: 'Deployment platform using GitOps', + projectId: '7b458fa1-1225-40ce-8e48-3f4a67031bc0', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, backup_engine: { principal: { - name: "Backup Engine", - slug: "fluorine", - description: "Velero as the backup engine for Kubernetes", - projectId: "d712436d-2022-4970-838b-f0b854a83c9c" + name: 'Backup Engine', + slug: 'fluorine', + description: 'Velero as the backup engine for Kubernetes', + projectId: 'd712436d-2022-4970-838b-f0b854a83c9c', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, secrets_engine: { principal: { - name: "Secrets Engine", - slug: "cobalt", - description: "External Secrets to sync secrets from infisical", - projectId: "1c2bc52e-c49b-4307-ad41-ff69a755beed" + name: 'Secrets Engine', + slug: 'cobalt', + description: 'External Secrets to sync secrets from infisical', + projectId: '1c2bc52e-c49b-4307-ad41-ff69a755beed', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, internal_ingress: { principal: { - name: "Internal Ingress", - slug: "boron", - description: "Internal Ingress with cloudflared", - projectId: "9ab0fcd2-ee24-4dd4-8701-c530b888b805" + name: 'Internal Ingress', + slug: 'boron', + description: 'Internal Ingress with cloudflared', + projectId: '9ab0fcd2-ee24-4dd4-8701-c530b888b805', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, external_ingress: { principal: { - name: "External Ingress", - slug: "gold", - description: "External Ingress with nginx", - projectId: "47c29693-3255-4a5b-b0a7-09e0281e1910" + name: 'External Ingress', + slug: 'gold', + description: 'External Ingress with nginx', + projectId: '47c29693-3255-4a5b-b0a7-09e0281e1910', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, scaler: { principal: { - name: "Pod Autoscaler", - slug: "iron", - description: "KEDA scaler for pods", - projectId: "ca687032-485f-4d09-9d7c-5d0f50bf3ab3" + name: 'Pod Autoscaler', + slug: 'iron', + description: 'KEDA scaler for pods', + projectId: 'ca687032-485f-4d09-9d7c-5d0f50bf3ab3', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, cluster_scaler: { principal: { - name: "Cluster Scaler", - slug: "krypton", - description: "Karpenter scaler for nodes", - projectId: "" + name: 'Cluster Scaler', + slug: 'krypton', + description: 'Karpenter scaler for nodes', + projectId: '', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, cluster_issuer: { principal: { - name: "Cluster Issuer", - slug: "zinc", - description: "Cluster Issuer for Certificate", - projectId: "eb3db9f2-3b49-493c-81df-8528121c0ccc" + name: 'Cluster Issuer', + slug: 'zinc', + description: 'Cluster Issuer for Certificate', + projectId: 'eb3db9f2-3b49-493c-81df-8528121c0ccc', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, cert_manager: { principal: { - name: "Cert Manager", - slug: "sulfur", - description: "Certificate Issuing operator", - projectId: "8a244c1b-f58a-40c0-92dd-585ffa2787d1" + name: 'Cert Manager', + slug: 'sulfur', + description: 'Certificate Issuing operator', + projectId: '8a244c1b-f58a-40c0-92dd-585ffa2787d1', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, reloader: { principal: { - name: "Reloader", - slug: "chlorine", - description: "Reloader", - projectId: "" + name: 'Reloader', + slug: 'chlorine', + description: 'Reloader', + projectId: '', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, policy_engine: { principal: { - name: "Policy Engine", - slug: "argon", - description: "Kyverno operator", - projectId: "3cc63883-9ec6-42c1-9772-8570620de422" + name: 'Policy Engine', + slug: 'argon', + description: 'Kyverno operator', + projectId: '3cc63883-9ec6-42c1-9772-8570620de422', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, policies: { principal: { - name: "Policies", - slug: "sodium", - description: "Kyverno policies", - projectId: "cd55ee78-bf70-4853-9bb1-fcc9f3d445cd" + name: 'Policies', + slug: 'sodium', + description: 'Kyverno policies', + projectId: 'cd55ee78-bf70-4853-9bb1-fcc9f3d445cd', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, otel_collector: { principal: { - name: "OpenTelemetry Collector", - slug: "silicon", - description: "OpenTelemetry Collector", - projectId: "3e90c2ef-7007-47a4-bd6a-bac6cdae7396" + name: 'OpenTelemetry Collector', + slug: 'silicon', + description: 'OpenTelemetry Collector', + projectId: '3e90c2ef-7007-47a4-bd6a-bac6cdae7396', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, otel_operator: { principal: { - name: "OpenTelemetry Operator", - slug: "lithium", - description: "OpenTelemetry Operator", - projectId: "ef96dd70-dea3-4548-81b7-0a22231b54ad" + name: 'OpenTelemetry Operator', + slug: 'lithium', + description: 'OpenTelemetry Operator', + projectId: 'ef96dd70-dea3-4548-81b7-0a22231b54ad', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, external_dns: { principal: { - name: "External DNS", - slug: "tin", - description: "External DNS", - projectId: "4c3d88b5-977d-449f-8f4c-2bf9e09e97c8" + name: 'External DNS', + slug: 'tin', + description: 'External DNS', + projectId: '4c3d88b5-977d-449f-8f4c-2bf9e09e97c8', }, - platform: PLATFORMS.Sulfoxide + platform: PLATFORMS.Sulfoxide, }, vcluster: { principal: { - name: "Virtual Cluster", - slug: "iodine", - description: "Virtual clusters with vcluster", - projectId: "e0c572b3-4eb8-40c6-85ea-f9cf54b6e13b" + name: 'Virtual Cluster', + slug: 'iodine', + description: 'Virtual clusters with vcluster', + projectId: 'e0c572b3-4eb8-40c6-85ea-f9cf54b6e13b', }, - platform: PLATFORMS.Sulfoxide - } - } + platform: PLATFORMS.Sulfoxide, + }, + }, }, nitroso: { principal: PLATFORMS.Nitroso, services: { tin: { principal: { - name: "BunnyBooker Polling System", - slug: "tin", - description: "System of pollers for BunnyBooker", - projectId: "df53bb81-dee0-4479-b515-3cab9af7386f" + name: 'BunnyBooker Polling System', + slug: 'tin', + description: 'System of pollers for BunnyBooker', + projectId: 'df53bb81-dee0-4479-b515-3cab9af7386f', }, - platform: PLATFORMS.Nitroso + platform: PLATFORMS.Nitroso, }, zinc: { principal: { - name: "BunnyBooker API Server", - slug: "zinc", - description: "API Server for BunnyBooker", - projectId: "3b4f93e1-aab6-4b4a-a883-55de7eb401ea" + name: 'BunnyBooker API Server', + slug: 'zinc', + description: 'API Server for BunnyBooker', + projectId: '3b4f93e1-aab6-4b4a-a883-55de7eb401ea', }, - platform: PLATFORMS.Nitroso + platform: PLATFORMS.Nitroso, }, argon: { principal: { - name: "BunnyBooker Frontend", - slug: "argon", - description: "Frontend for BunnyBooker", - projectId: "65f937ec-50a5-4551-9338-eb146df712af" + name: 'BunnyBooker Frontend', + slug: 'argon', + description: 'Frontend for BunnyBooker', + projectId: '65f937ec-50a5-4551-9338-eb146df712af', }, - platform: PLATFORMS.Nitroso + platform: PLATFORMS.Nitroso, }, helium: { principal: { - name: "Pollee", - slug: "helium", - description: "Pollee for BunnyBooker", - projectId: "cc897910-0fe7-4784-ac3d-be9847fca2d9" + name: 'Pollee', + slug: 'helium', + description: 'Pollee for BunnyBooker', + projectId: 'cc897910-0fe7-4784-ac3d-be9847fca2d9', }, - platform: PLATFORMS.Nitroso - } - } + platform: PLATFORMS.Nitroso, + }, + }, }, azo: { principal: PLATFORMS.Azo, - services: {} - } + services: {}, + }, } satisfies Record; const CLOUD_TREE = { @@ -461,16 +461,16 @@ const CLOUD_TREE = { { principal: CLUSTERS.Opal, cloud: CLOUDS.DigitalOcean, - set: CLUSTER_SETS.OpalRuby + set: CLUSTER_SETS.OpalRuby, }, { principal: CLUSTERS.Ruby, cloud: CLOUDS.DigitalOcean, - set: CLUSTER_SETS.OpalRuby - } - ] - } - } + set: CLUSTER_SETS.OpalRuby, + }, + ], + }, + }, }, Linode: { principal: CLOUDS.Linode, @@ -482,16 +482,16 @@ const CLOUD_TREE = { { principal: CLUSTERS.Onyx, cloud: CLOUDS.Linode, - set: CLUSTER_SETS.OnyxJade + set: CLUSTER_SETS.OnyxJade, }, { principal: CLUSTERS.Jade, cloud: CLOUDS.Linode, - set: CLUSTER_SETS.OnyxJade - } - ] - } - } + set: CLUSTER_SETS.OnyxJade, + }, + ], + }, + }, }, // vultr - mica talc Vultr: { @@ -504,16 +504,16 @@ const CLOUD_TREE = { { principal: CLUSTERS.Mica, cloud: CLOUDS.Vultr, - set: CLUSTER_SETS.MicaTalc + set: CLUSTER_SETS.MicaTalc, }, { principal: CLUSTERS.Talc, cloud: CLOUDS.Vultr, - set: CLUSTER_SETS.MicaTalc - } - ] - } - } + set: CLUSTER_SETS.MicaTalc, + }, + ], + }, + }, }, // aws - topaz amber AWS: { @@ -526,16 +526,16 @@ const CLOUD_TREE = { { principal: CLUSTERS.Topaz, cloud: CLOUDS.AWS, - set: CLUSTER_SETS.TopazAmber + set: CLUSTER_SETS.TopazAmber, }, { principal: CLUSTERS.Amber, cloud: CLOUDS.AWS, - set: CLUSTER_SETS.TopazAmber - } - ] - } - } + set: CLUSTER_SETS.TopazAmber, + }, + ], + }, + }, }, // gcp - agate lapis GCP: { @@ -548,16 +548,16 @@ const CLOUD_TREE = { { principal: CLUSTERS.Agate, cloud: CLOUDS.GCP, - set: CLUSTER_SETS.AgateLapis + set: CLUSTER_SETS.AgateLapis, }, { principal: CLUSTERS.Lapis, cloud: CLOUDS.GCP, - set: CLUSTER_SETS.AgateLapis - } - ] - } - } + set: CLUSTER_SETS.AgateLapis, + }, + ], + }, + }, }, // azure - beryl coral Azure: { @@ -570,24 +570,24 @@ const CLOUD_TREE = { { principal: CLUSTERS.Beryl, cloud: CLOUDS.Azure, - set: CLUSTER_SETS.BerylCoral + set: CLUSTER_SETS.BerylCoral, }, { principal: CLUSTERS.Coral, cloud: CLOUDS.Azure, - set: CLUSTER_SETS.BerylCoral - } - ] - } - } - } + set: CLUSTER_SETS.BerylCoral, + }, + ], + }, + }, + }, } satisfies Record; const LANDSCAPE_TREE = { a: [LANDSCAPES.suicune], v: [LANDSCAPES.pichu, LANDSCAPES.pikachu, LANDSCAPES.raichu], l: [LANDSCAPES.lapras, LANDSCAPES.tauros, LANDSCAPES.absol, LANDSCAPES.pinsir], - p: [LANDSCAPES.entei] + p: [LANDSCAPES.entei], } satisfies Record; export { LANDSCAPES, CLOUDS, CLUSTERS, CLUSTER_SETS, PLATFORMS, SERVICE_TREE, CLOUD_TREE, LANDSCAPE_TREE };