Skip to content

Lazerbeak12345/docker-static-cluster

Repository files navigation

docker-static-cluster

Kubernetes is very abstract, whereas Docker Swarm Mode is just a step above docker compose. This tries to be somewhere between, by building on Docker Swarm Mode

Docker's Cluster feature has a weakness, however, that it doesn't do high-availability very well when persistance is needed.

Docker Swarm Mode also doesn't have a static way to configure desired cluster state, which this adds.

How it works

It generates docker compose files, and runs docker swarm and related commands for you to do what you'd like.

The killer features are jq_pools, which lets you use the result of a jq query to make new nodes during translation time, and the planned plugin specification feature.

It also uses docker-sdp to rotate things.

Status

I'm testing this in a homelab, and evaluating it for production.

Docs

No time for decent docs, yet. I'm using tools that should give decent autogenerated error messages on common mistakes, so --help should work okay anywhere in the CLI, and bad configs will get errors.

Sources of error messages

  • click: CLI/argument related errors.
  • yaml tomlib or tomli: bad config syntax
  • pydantic: config file content and structure related errors.
  • docker api: errors from docker's SDK. I dump some hints for these.
  • docker cli: errors from the printed command that was ran.
  • docker-sdp: errors involving config or secret redeployment. This tool doesn't support some edge-case features, and may give you errors on otherwise valid code.

Licence

Complies with the reuse specification.

About

home-brewed clustering software bc k8s is too complicated, but this surely couldn't be worse....

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages