Files
sablier/README.md
2025-11-11 23:26:08 -05:00

11 KiB

Sablier Banner

Go Report Card Discord

Free and open-source software that starts workloads on demand and stops them after a period of inactivity.

Demo

Whether you don't want to overload your Raspberry Pi, or your QA environment is used only once a week and wastes resources by keeping workloads running, Sablier might be the solution you need.

Installation

You can install Sablier using one of the following methods:

Use the Docker image

Docker Pulls Docker Image Size (tag)

Choose one of the Docker images and run it with a sample configuration file:

docker run -d -p 10000:10000 -v sablier.yaml:/etc/sablier/sablier.yaml sablierapp/sablier:1.10.1

Use the binary distribution

Grab the latest binary from the releases page and run it:

./sablier --help

Compile your binary from the sources

git clone git@github.com:sablierapp/sablier.git
cd sablier
make
# Output will change depending on your distro
./sablier_draft_linux-amd64

Use the Helm Chart

Helm

Deploy Sablier to your Kubernetes cluster using the official Helm chart for production-ready deployments.

Add the Sablier Helm repository:

helm repo add sablierapp https://sablierapp.github.io/helm-charts
helm repo update

Install Sablier:

helm install sablier sablierapp/sablier

📚 Full Documentation | 💻 Chart Repository


Configuration

There are three ways to configure Sablier:

  1. In a configuration file
  2. As environment variables
  3. As command-line arguments

Configuration sources are evaluated in the order listed above.

If no value is provided for a given option, a default value is used.

Configuration File

At startup, Sablier searches for a configuration file named sablier.yml (or sablier.yaml) in:

  • /etc/sablier/
  • $XDG_CONFIG_HOME/
  • $HOME/.config/
  • . (the working directory)

You can override this using the configFile argument.

sablier --configFile=path/to/myconfigfile.yml
provider:
  # Provider to use to manage containers (docker, swarm, kubernetes)
  name: docker 
server:
  # The server port to use
  port: 10000 
  # The base path for the API
  base-path: /
storage:
  # File path to save the state (default stateless)
  file:
sessions:
  # The default session duration (default 5m)
  default-duration: 5m
  # The expiration checking interval. 
  # Higher duration gives less stress on CPU. 
  # If you only use sessions of 1h, setting this to 5m is a good trade-off.
  expiration-interval: 20s
logging:
  level: debug
strategy:
  dynamic:
    # Custom themes folder, will load all .html files recursively (default empty)
    custom-themes-path:
    # Show instances details by default in waiting UI
    show-details-by-default: false
    # Default theme used for dynamic strategy (default "hacker-terminal")
    default-theme: hacker-terminal
    # Default refresh frequency in the HTML page for dynamic strategy
    default-refresh-frequency: 5s
  blocking:
    # Default timeout used for blocking strategy (default 1m)
    default-timeout: 1m

Environment Variables

Environment variables follow the same structure as the configuration file. For example:

strategy:
  dynamic:
    custom-themes-path: /my/path

becomes

STRATEGY_DYNAMIC_CUSTOM_THEMES_PATH=/my/path

Arguments

To list all available arguments:

sablier --help

# or

docker run sablierapp/sablier:1.10.1 --help

Command-line arguments follow the same structure as the configuration file. For example:

strategy:
  dynamic:
    custom-themes-path: /my/path

becomes

sablier start --strategy.dynamic.custom-themes-path /my/path

Providers

Docker

Docker

Sablier integrates seamlessly with Docker Engine to manage container lifecycle based on demand.

Features:

  • Start and stop containers automatically
  • Scale containers based on HTTP traffic
  • Works with Docker Compose deployments

📚 Full Documentation


Docker Swarm

Docker Swarm

Sablier supports Docker Swarm mode for managing services across a cluster of Docker engines.

Features:

  • Scale Swarm services on demand
  • Distributed scaling across multiple nodes
  • Seamless integration with Docker Swarm orchestration

📚 Full Documentation


Podman

Podman

Sablier works with Podman, the daemonless container engine, providing the same dynamic scaling capabilities as Docker.

Features:

  • Rootless container management
  • Docker-compatible API integration
  • Seamless migration from Docker

📚 Full Documentation


Kubernetes

Kubernetes

Sablier provides native Kubernetes support for managing deployments, scaling workloads dynamically.

Features:

  • Scale Kubernetes deployments and statefulsets
  • Works with any Kubernetes cluster
  • Label-based workload selection

📚 Full Documentation

Usage with Reverse Proxies

Apache APISIX

Apache APISIX

Sablier integrates with Apache APISIX through a Proxy-WASM plugin, enabling dynamic scaling for your services.

Quick Start:

  1. Install the Sablier Proxy-WASM plugin
  2. Configure APISIX routes with Sablier plugin settings
  3. Define your scaling labels on target services

📚 Full Documentation | 💻 Plugin Repository


Caddy

Caddy

Sablier provides a native Caddy module for seamless integration with Caddy v2.

Quick Start:

  1. Build Caddy with the Sablier module using xcaddy
  2. Add Sablier directives to your Caddyfile
  3. Configure dynamic scaling rules

📚 Full Documentation | 💻 Plugin Repository


Envoy

Envoy

Sablier integrates with Envoy Proxy through a Proxy-WASM plugin for high-performance dynamic scaling.

Quick Start:

  1. Deploy the Sablier Proxy-WASM plugin
  2. Configure Envoy HTTP filters
  3. Set up scaling labels on your workloads

📚 Full Documentation | 💻 Plugin Repository


Istio

Istio

Sablier works with Istio service mesh using the Proxy-WASM plugin for intelligent traffic management.

Quick Start:

  1. Install the Sablier Proxy-WASM plugin in your Istio mesh
  2. Configure EnvoyFilter resources
  3. Annotate your services with Sablier labels

📚 Full Documentation | 💻 Plugin Repository


Nginx

Nginx

Sablier integrates with Nginx through a WASM module, bringing dynamic scaling to your Nginx deployments.

Quick Start:

  1. Build Nginx with WASM support
  2. Load the Sablier Proxy-WASM plugin
  3. Configure Nginx locations with Sablier directives

📚 Full Documentation | 💻 Plugin Repository


Traefik

Traefik

Sablier provides a powerful middleware plugin for Traefik, the cloud-native application proxy.

Quick Start:

  1. Add the Sablier plugin to your Traefik static configuration
  2. Create Sablier middleware in your dynamic configuration
  3. Apply the middleware to your routes

📚 Full Documentation | 💻 Plugin Repository

📝 Documentation

See the documentation here

Community

Join our Discord server to discuss and get support!

Discord