Skip to main content

MiniStack Local Deployment

Deploy CloudForge-generated CloudFormation to MiniStack, an MIT-licensed, open-source AWS emulator, without an AWS account.

Quick start: see cloudforge-ministack for local emulator setup

MiniStack support lives in the cloudforge-ministack module; the cfc-testing Interactive Deployer drives it. Canonical AWS templates stay unchanged in the libraries; local adaptations are applied downstream and recorded in an adaptation report.

MiniStack is not LocalStack. CloudForge runs the open-source ministackorg/ministack image (pinned in LocalEmulatorDefaults.MINISTACK_IMAGE) as the cfc-ministack container. MiniStack and LocalStack both bind gateway port 4566, so run one emulator at a time.

Authentication: MiniStack cannot execute ALB authenticate-oidc / authenticate-cognito actions, so the adapter strips them. The optional local auth proxy and mock OIDC provider are off by default (MINISTACK_AUTH_AUTOSTART=false). Use authMode: none on MiniStack, or use LocalStack with application-oidc to test sign-in locally. Canonical AWS templates still include auth when configured.


Available vs not available​

Canonical CloudForge templates are unchanged for AWS. MiniStack deploys an adapted copy (see cdk.out/<stack>.ministack-adaptations.json). Use this table to set expectations for option 6 deployments.

Available​

CapabilityNotes
CloudFormation create / update / delete / no-opVia MiniStackDeployer + change sets
VPC, subnets, IGW, security groupsSG rules are recorded and queryable (describe-security-groups); not full packet-filter enforcement
ECS Fargate → Docker containersApp reachable on host port; logs via CloudWatch Logs APIs
ALB + listeners (control plane)Inventory via ELBv2 APIs; local entry MiniStackLocalUrl (/_alb/...)
Route53 hosted zones + recordsEmulator DNS only; assert via API, not OS/public resolver
ACM certificates + HTTPS listener resourcesPresence in CFN/ACM; local TLS termination differs from AWS
IAM roles/policies in templateAccepted for stack create; not full IAM evaluation
Incremental add/remove domain / TLSSame stack update path
EFS → host bind mountPaths under .ministack-volumes/; MiniStackHostVolume* outputs
CloudForge Manager operations against MiniStackInventory, health, delete, history
Automated native testsmvn -pl cloudforge-ministack test -P ministack; see Verification

Not available or adapted away​

CapabilityMiniStack behavior
ALB → ECS forward / target health routingAdapter rewrites to HTTP redirect → localhost:<appPort>
ALB Cognito / OIDC authenticate actionsStripped from adapted template; auth proxy / mock OIDC off by default
Security group packet filteringRules stored; do not treat allow/deny traffic tests as real
Public / OS DNS for FQDNsUse MiniStackApplicationUrl / MiniStackLocalUrl; optional /etc/hosts
Browser HTTPS / ACM validation flowCert + HTTPS listener resources exist; use output HTTP URLs for smoke tests
EFS NFS mountsReplaced with host bind mounts
Application Auto ScalingRemoved by adapter
RDS, WAF, Config, CloudTrail, GuardDuty, BackupNot supported; preflight blocks templates that contain these types
AWS Service CatalogNot emulated; publish and test Service Catalog products on AWS

Per-resource canonical vs adapted vs deployed detail: Resource verification matrix.


Documentation​

GuideDescription
SetupPrerequisites, build, start MiniStack
DeploymentInteractive Deployer, MiniStackCli, base Jenkins walkthrough
Jenkins on MiniStackJenkins Fargate setup, AWS CLI against MiniStack, CloudWatch logs, initial admin password
VerificationConfirm what deployed locally; includes local DNS vs API
Resource verification matrixPer AWS resource: canonical vs adapted vs deployed, how to verify, local fidelity
Advanced ConfigurationStack outputs, template adaptations, auth proxy, incremental updates, environment variables
Deployable applicationsSupported vs blocked applications; see also the full catalog
TroubleshootingCommon failures and debugging steps

Quick Start​

# Repository root: build once
mvn clean install -DskipTests
mvn -f cfc-testing package -Dmaven.test.skip=true

# Start MiniStack: choose the ministack platform, then the `start` action
cd cfc-testing
java -cp "target/classes:target/dependency/*" \
com.cloudforgeci.samples.app.InteractiveDeployer --platform

# Configure and deploy; choose option 6 (Deploy to MiniStack)
java -cp "target/classes:target/dependency/*" \
com.cloudforgeci.samples.app.InteractiveDeployer

AWS_ENDPOINT_URL defaults to http://localhost:4566. MiniStack is always menu option 6; no flag or environment variable is needed to enable it. cdk synth / cdk deploy never show the menu; run InteractiveDeployer directly for local targets.

Run CloudForge Manager locally against MiniStack​

CloudForge Manager lives in its own repository. With a cloudforge-manager checkout at the repository root, you can run the Manager panel on your host against MiniStack without deploying it into the emulator:

# Build the Angular panel and package the Manager server
mvn -f cloudforge-manager/pom.xml -Pui package -DskipTests

# Start MiniStack from the platform menu (see Quick Start), then:
mvn -f cloudforge-manager/pom.xml spring-boot:run -Dspring-boot.run.profiles=local \
-Dspring-boot.run.arguments="--cfc.manager.target=ministack"

Open http://127.0.0.1:1958, complete the first-run local-admin setup, and choose MiniStack in the target selector.

Deploy CloudForge Manager into MiniStack​

To run CloudForge Manager as a Fargate application inside the emulator, use the standard cfc-testing → CDK synth → MiniStack adapter path. The Manager deployment extension (CloudForgeManagerDeploymentExtension, from cloudforge-manager-deployment) resolves the container image before deploy: a local build when a cloudforge-manager checkout is present, otherwise the published image.

# Repository root
mvn -f cfc-testing package -Dmaven.test.skip=true

cd cfc-testing
java -cp "target/classes:target/dependency/*" \
com.cloudforgeci.samples.app.InteractiveDeployer \
--context deployment-contexts/CloudForgeManager-Fresh.json 6

Use a context without provisionDatabase: true; MiniStack preflight blocks RDS. Option 6 synthesizes the canonical CDK template for applicationId: cloudforge-manager, adapts it for MiniStack, and deploys it. Option 8 is the LocalStack equivalent.

Deploy preflight (option 6)​

Before adapt/deploy, option 6 runs a preflight that blocks stacks MiniStack cannot create, so you get a clear message instead of a CloudFormation rollback. It blocks:

  • applications that require RDS (requiresDatabase) or contexts with provisionDatabase: true
  • canonical templates containing unsupported types (AWS::RDS::*, AWS::WAFv2::*, AWS::Config::*, AWS::CloudTrail::*, AWS::GuardDuty::*, AWS::Backup::*)
  • topologies other than application-service / jenkins-service
  • host-port conflicts with another running MiniStack stack
VariableDefaultPurpose
MINISTACK_PREFLIGHTenforceenforce blocks unsupported deploys; warn prints warnings; off skips checks

Use Interactive Deployer option 8 (LocalStack) or deploy to AWS for blocked applications. See Deployable applications.


Architecture​

DeploymentConfig
→ CDK synthesis (canonical AWS template)
→ MiniStackDeploymentPipeline (cloudforge-ministack)
→ MiniStackTemplateAdapter (audited local copy)
→ MiniStackDeployer (CloudFormation create/update via AWS SDK)
→ MiniStack emulator

Design principles

  • Canonical templates are never weakened in cloudforge-api / cloudforge-core.
  • Cross-target local deploy contracts live in cloudforge-core (com.cloudforge.core.local); MiniStack implementations live in cloudforge-ministack.
  • MiniStack-specific changes happen only in MiniStackTemplateAdapter, with an adaptation report written beside the local template.
  • Incremental deployments use CloudFormation change sets (create → update → no-op).
  • No AWS CLI or AWS credentials are required for local deployment (the AWS CLI is optional for verification).

Source Layout​

TypeModuleRole
DeploymentTarget, TemplateAdapter, LocalDeployer, LocalDeploymentPipelinecloudforge-coreCross-module local deploy contracts
CloudFormationTemplateDiffcloudforge-coreSemantic CFN template diff (canonical parity tests)
LocalEmulatorDefaultscloudforge-coreContainer names, images, ports, env var keys
LocalEmulatorSpeccloudforge-corePer-target metadata (ministack(), localstack())
LocalEmulatorRuntimescloudforge-coreRuntime catalog (forTarget(MINISTACK))
EmulatorLifecyclecloudforge-coreStart/stop/restart/status orchestration
MiniStackDeploymentPipelinecloudforge-ministackMiniStack wiring for LocalDeploymentPipeline
MiniStackTemplateAdaptercloudforge-ministackMiniStack TemplateAdapter implementation
MiniStackDeployercloudforge-ministackMiniStack LocalDeployer implementation
MiniStackDeployPreflightcloudforge-ministackPre-deploy checks for option 6
MiniStackPlatformRuntimeProvidercloudforge-ministack--platform menu actions (start, stop, restart, status, reconcile_edge)
MiniStackEmulatorRuntimecloudforge-ministackDocker create arguments (extends AbstractLocalEmulatorRuntime)
MiniStackLocalRuntimecloudforge-ministackMock OIDC + auth proxy lifecycle (off by default)
MiniStackAuthProxycloudforge-ministackLocal OIDC proxy (off by default)
MiniStackClicloudforge-ministackNon-interactive deploy/verify/delete
InteractiveDeployercfc-testingInteractive flow; options 4, 6, and 7 use the MiniStack pipeline