Skip to content
sdslabsPublic

About

A CD tool with webhook-driven pipelines for Linux servers and Kubernetes, with built-in YAML mutation and secrets management.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

85 Commits

Folders and files

Repository files navigation

Shogun-CD

A simple, self-hosted continuous delivery tool for Git-based deployments.

Shogun-CD watches a Git repository and deploys changes to your servers via SSH and SFTP. Pipelines and targets are written in YAML, so your delivery setup stays close to the code and manifests it manages.

Shogun helps one Git repository coordinate deployments across many servers.

Status: Active development. SSH and SFTP deployments are ready to use. Kubernetes support is under development.

What it does

  • Watches a Git repository for changes.
  • Runs pipelines when matching files present in the repository change.
  • Accepts webhooks from CI systems to run pipelines.
  • Copies manifests to servers over SFTP.
  • Runs commands on servers over SSH.
  • Updates YAML files and pushes the change back to repository.
  • Stores secrets encrypted in PostgreSQL.
  • Keeps a history of pipeline runs.

How it works

Shogun-CD architecture

Shogun-CD clones your manifest repository and looks for Pipeline and Target YAML files to be indexed. When a matching Git change or webhook arrives, it runs the pipeline steps in order.

Example

This pipeline sends a Compose file to a server and restarts the application when the API changes.

apiVersion: shogun.dev/v1
kind: Pipeline
metadata:
  name: deploy-api
  enabled: true
spec:
  triggers:
    - type: git_changes
      paths: ["services/api/**"]
  steps:
    - sync:
        target: prod-api
        files:
          - src: services/api/compose.yaml
            dst: ~/api/docker-compose.yaml
    - exec:
        target: prod-api
        commands:
          - cd ~/api
          - docker compose up -d

See examples for pipeline and target definitions.

Main features

Feature Description
Git triggers Run pipelines only when selected files change.
CI webhooks Starts a deployment from your CI system.
Exec commands Run deployment commands on a server.
SFTP sync Copy modified files to a server safely from the repo.
YAML mutation Update values in YAML manifests, then commit and push it.
Secrets Store SSH keys and other values encrypted at rest which can be accessed in pipelines.
Run history View pipeline runs and step logs through the API.

Get started

  1. Setup docker for postgres container or provide RDS.

  2. Copy sample.config.yaml to config.yaml and update it for your environment.

  3. Add Pipeline and Target files to your Git repository.

  4. Start Shogun-CD:

    $ go run ./cmd

For local development, make start starts PostgreSQL container and runs the app with Air.

When API docs are enabled, open /docs/ in your browser.

Roadmap forward

  • Kubernetes deployments with apply
  • Target and pipeline listing API
  • CLI for shogun
  • UI for Shogun
  • API keys
  • Live pipeline logs

License

Licensed under Apache License 2.0. See NOTICE.

Created with ❤️ by SDSLabs!

About

A CD tool with webhook-driven pipelines for Linux servers and Kubernetes, with built-in YAML mutation and secrets management.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages