8000 GitHub - Mtze/simple-cd · GitHub
[go: up one dir, main page]

Skip to content
MtzePublic

About

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

simple-cd

simple-cd is a small continuous delivery server. It builds nothing and runs no tests: your GitHub Actions workflows do that. simple-cd sees the artifacts they publish, checks that they are complete, and lets authorized people deploy them to Helm, Docker Compose and Ansible targets with one click.

Documentation: https://mtze.me/simple-cd/

The project page: target cards with their status, artifacts with readiness per target, and live previews

Features

  • Helm releases from OCI charts, a single Docker Compose file on a VM, or Ansible playbooks
  • Images pinned by digest, provenance taken from GitHub, forks rejected
  • Readiness per artifact and target, with the reasons when something is missing
  • Confirmation diff when the Helm values or the Compose file change
  • Opt-in locks per target, maintenance mode, one deployment per slot
  • Preview namespaces per pull request with a TTL and automatic teardown
  • Auto-deploy on request of the workflow and with a rule on the target
  • Live logs over Server-Sent Events, deployments mirrored to GitHub
  • Keycloak roles per project (developer, maintainer), per target and for platform admins
  • Secrets read from Vault by the executor Job, never by the server
  • Audit log, retention, leader-elected background worker, stateless replicas

Who it is for

simple-cd is for teams that build and test in GitHub Actions and need a safe, visible way to put those builds onto shared environments:

  • several people share a few test systems and want to deploy their build, often from a pull request, and keep it there while they test,
  • the targets are mixed: Helm on Kubernetes, a Compose file on a VM, some Ansible,
  • a platform team defines targets, credentials and rules once, and developers deploy within them without cluster access or SSH keys,
  • Keycloak and Vault are already there.

It is not a GitOps engine, has no canary or blue-green rollouts and no multi-stage promotion with approvals.

simple-cd Argo CD / Flux Kargo Octopus Deploy GitHub / GitLab environments
Model push on click or rule GitOps pull promotion on GitOps push, releases push in the pipeline
Targets Helm, Compose over SSH, Ansible Kubernetes Kubernetes Kubernetes, SSH, Windows, cloud anything a runner reaches
Pick any build in a UI yes rollback to history (Argo CD) yes yes re-run or re-deploy
Previews per PR yes yes (ApplicationSet, Flux Operator) no yes scripted / review apps
Reserve a test system ad hoc locks scheduled sync windows / suspend windows (Enterprise) freezes queueing only
License MIT Apache-2.0 Apache-2.0 commercial, free tier part of GitHub / GitLab

The detailed comparison covers these and Spinnaker, Semaphore UI, Kamal, Coolify and Harness, with sources.

Screenshots

The UI follows the system theme; GitHub shows the screenshots in the theme you use.

Deploy with a configuration diff Live executor log
Deploy dialog showing the Helm values diff and the confirmation checkbox Deployment page with the log of helm upgrade
A locked target with its history User menu with roles and theme
Target page showing the lock holder, deployments and lock history User menu with name, roles, theme switch and logout

How it works

simple-cd components

A workflow builds images and a chart and runs the cd-publish action, which uploads deploy.json with the image digests. The simple-cd GitHub App receives the workflow_run webhook, reads deploy.json and .cd.yaml at the commit and stores the artifact. A deploy starts a Kubernetes Job that logs in to Vault and runs helm, docker compose over SSH, or ansible-playbook.

# .github/workflows/build.yml (excerpt)
- uses: Mtze/simple-cd/cd-publish@v0.1.0
  with:
    images: |
      server=ghcr.io/example/app-server@${{ steps.server.outputs.digest }}
    helm-version: ${{ steps.chart.outputs.version }}

Quick start

Try it locally

Needs Go, Node.js 26 and Docker.

git clone https://github.com/Mtze/simple-cd.git && cd simple-cd
make dev-up     # Postgres and Keycloak on 127.0.0.1
make dev-seed   # demo data
make web        # build the UI
make run        # server on http://127.0.0.1:8080

Log in as alice, bob, mia, root or guest, password dev. Details in Local development. make e2e-up starts the whole stack with Vault, a registry and real deployments in a kind cluster, see End-to-end test.

Install on Kubernetes

You need a Kubernetes cluster with a Gateway API Gateway, PostgreSQL, a Keycloak client, a GitHub App and Vault with Kubernetes auth.

  1. Create the Secret with the database URL, the OIDC client secret and the GitHub App key and webhook secret:

    kubectl create namespace simple-cd
    kubectl -n simple-cd create secret generic simple-cd \
      --from-literal=database-url='postgres://simplecd:...@db.example.org:5432/simplecd?sslmode=require' \
      --from-literal=oidc-client-secret='...' \
      --from-file=github-private-key=simple-cd.private-key.pem \
      --from-literal=github-webhook-secret='...'
  2. Write values.yaml:

    baseURL: https://cd.example.org
    github: {appID: "123456"}
    oidc: {issuer: https://keycloak.example.org/realms/main}
    vault: {address: https://vault.example.org}
    httpRoute:
      enabled: true
      parentRefs: [{name: public, namespace: gateway-system}]
      hostnames: [cd.example.org]
    config:
      defaults: {registries: [ghcr.io/example/]}
      targets:
        - {id: app-test, project: example/app, type: helm, cluster: "vault:secret/cd/clusters/test", namespace: app}
  3. Install the chart from a checkout of the release tag; the chart uses the images of that release:

    git clone --branch v0.1.0 https://github.com/Mtze/simple-cd.git
    helm upgrade --install simple-cd simple-cd/deploy/helm/simple-cd -n simple-cd -f values.yaml
  4. Connect a project: install the GitHub App on the repository, create its Keycloak roles, then add .cd.yaml and the cd-publish step to the workflow, see Getting started.

The full guide with every value is Installation; the setup order is in Administrators.

Documentation

For Start here
Developers who deploy Getting started
Project maintainers Maintainers
Platform operators Administrators
Contributors Contributors, CONTRIBUTING.md
File formats, API, settings Reference
Design Architecture

Security issues: see SECURITY.md. Changes: see CHANGELOG.md.

License

MIT

About

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0