Go to file
A. F. Dudley 47d3d10ead
Some checks failed
Lint Checks / Run linter (push) Failing after 14s
Lint Checks / Run linter (pull_request) Failing after 15s
K8s Deployment Control Test / Run deployment control suite on kind/k8s (pull_request) Failing after 2m3s
Deploy Test / Run deploy test suite (pull_request) Successful in 2m10s
K8s Deploy Test / Run deploy test suite on kind/k8s (pull_request) Failing after 2m51s
Webapp Test / Run webapp test suite (pull_request) Successful in 4m0s
Smoke Test / Run basic test suite (pull_request) Successful in 3m56s
fix(k8s): query resources by label in down() for proper cleanup
Previously, down() generated resource names from the deployment config
and deleted those specific names. This failed to clean up orphaned
resources when deployment IDs changed (e.g., after force_redeploy).

Changes:
- Add 'app' label to all resources: Ingress, Service, NodePort, ConfigMap, PV
- Refactor down() to query K8s by label selector instead of generating names
- This ensures all resources for a deployment are cleaned up, even if
  the deployment config has changed or been deleted

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:55:14 -05:00
.gitea/workflows Limit test workflow PR triggers to main branch only 2026-01-24 15:44:54 -05:00
.github/workflows Apply pre-commit linting fixes 2026-01-20 23:16:44 -05:00
docs Allow relative volume paths for k8s-kind deployments 2026-02-03 17:17:44 -05:00
scripts Apply pre-commit linting fixes 2026-01-20 23:16:44 -05:00
stack_orchestrator fix(k8s): query resources by label in down() for proper cleanup 2026-02-03 17:55:14 -05:00
tests Add --update option to deploy create 2026-01-29 08:25:05 -06:00
.gitignore Rename app -> stack_orchestrator (#625) 2023-11-07 00:06:55 -07:00
.pre-commit-config.yaml Add black, pyright, yamllint to pre-commit hooks 2026-01-21 20:04:15 -05:00
AI-FRIENDLY-PLAN.md Add documentation for AI-friendly stack creation 2026-01-12 02:21:47 -08:00
CLAUDE.md Add setup-repositories to key files list 2026-02-03 17:16:26 -05:00
laconic-network-deployment.md Add documentation for AI-friendly stack creation 2026-01-12 02:21:47 -08:00
LICENSE Apply pre-commit linting fixes 2026-01-20 23:16:44 -05:00
MANIFEST.in Initial version of pip packaging 2022-08-23 11:32:55 -06:00
pyproject.toml Fix pyright type errors across codebase 2026-01-22 01:10:36 -05:00
pyrightconfig.json Fix pyright type errors across codebase 2026-01-22 01:10:36 -05:00
README.md Split documentation: README for users, CLAUDE.md for agents 2026-02-03 17:16:26 -05:00
requirements.txt Support uploaded config, add 'publish-webapp-deployer' and 'request-webapp-deployment' commands (#938) 2024-08-27 19:55:06 +00:00
setup.py Apply pre-commit linting fixes 2026-01-21 20:58:31 -05:00
STACK-CREATION-GUIDE.md Add documentation for AI-friendly stack creation 2026-01-12 02:21:47 -08:00
TODO.md Add TODO.md with planned features and refactoring 2026-01-24 10:43:12 -05:00
tox.ini Apply pre-commit linting fixes 2026-01-20 23:16:44 -05:00

Stack Orchestrator

Stack Orchestrator allows building and deployment of a Laconic Stack on a single machine with minimial prerequisites. It is a Python3 CLI tool that runs on any OS with Python3 and Docker. The following diagram summarizes the relevant repositories in the Laconic Stack - and the relationship to Stack Orchestrator.

The Stack

Install

To get started quickly on a fresh Ubuntu instance (e.g, Digital Ocean); try this script. WARNING: always review scripts prior to running them so that you know what is happening on your machine.

For any other installation, follow along below and adapt these instructions based on the specifics of your system.

Ensure that the following are already installed:

  • Python3: python3 --version >= 3.8.10 (the Python3 shipped in Ubuntu 20+ is good to go)
  • Docker: docker --version >= 20.10.21
  • jq: jq --version >= 1.5
  • git: git --version >= 2.10.3

Note: if installing docker-compose via package manager on Linux (as opposed to Docker Desktop), you must install the plugin, e.g. :

mkdir -p ~/.docker/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.11.2/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose

Next decide on a directory where you would like to put the stack-orchestrator program. Typically this would be a "user" binary directory such as ~/bin or perhaps /usr/local/laconic or possibly just the current working directory.

Now, having selected that directory, download the latest release from this page into it (we're using ~/bin below for concreteness but edit to suit if you selected a different directory). Also be sure that the destination directory exists and is writable:

curl -L -o ~/bin/laconic-so https://git.vdb.to/cerc-io/stack-orchestrator/releases/download/latest/laconic-so

Give it execute permissions:

chmod +x ~/bin/laconic-so

Ensure laconic-so is on the PATH

Verify operation (your version will probably be different, just check here that you see some version output and not an error):

laconic-so version
Version: 1.1.0-7a607c2-202304260513

Save the distribution url to ~/.laconic-so/config.yml:

mkdir ~/.laconic-so
echo "distribution-url: https://git.vdb.to/cerc-io/stack-orchestrator/releases/download/latest/laconic-so" >  ~/.laconic-so/config.yml

Update

If Stack Orchestrator was installed using the process described above, it is able to subsequently self-update to the current latest version by running:

laconic-so update

Usage

The various stacks each contain instructions for running different stacks based on your use case. For example:

Deployment Types

  • compose: Docker Compose on local machine
  • k8s: External Kubernetes cluster (requires kubeconfig)
  • k8s-kind: Local Kubernetes via Kind - one cluster per host, shared by all deployments

External Stacks

Stacks can live in external git repositories. Required structure:

<repo>/
  stack_orchestrator/data/
    stacks/<stack-name>/stack.yml
    compose/docker-compose-<pod-name>.yml
  deployment/spec.yml

Deployment Commands

# Create deployment from spec
laconic-so --stack <path> deploy create --spec-file <spec.yml> --deployment-dir <dir>

# Start (creates cluster on first run)
laconic-so deployment --dir <dir> start

# GitOps restart (git pull + redeploy, preserves data)
laconic-so deployment --dir <dir> restart

# Stop
laconic-so deployment --dir <dir> stop

spec.yml Reference

stack: stack-name-or-path
deploy-to: k8s-kind
network:
  http-proxy:
    - host-name: app.example.com
      routes:
        - path: /
          proxy-to: service-name:port
  acme-email: admin@example.com
config:
  ENV_VAR: value
  SECRET_VAR: $generate:hex:32$   # Auto-generated, stored in K8s Secret
volumes:
  volume-name:

Contributing

See the CONTRIBUTING.md for developer mode install.

Platform Support

Native aarm64 is not currently supported. x64 emulation on ARM64 macos should work (not yet tested).