warden icon indicating copy to clipboard operation
warden copied to clipboard

Implement Sablier Traefik Plugin for Workload Management

Open SamJUK opened this issue 1 year ago • 0 comments

Overview

Implement the Sablier Traefik Plugin, allowing Warden to dynamic start and stop project containers on request rather than having to manage them with env up/down saving system resources for us forgetful people. Especially useful if your working on multiple large projects simultaneously, or for certain edge use cases (we run Warden also as a Ephemeral/Feature hosts deployment with a lot of projects for example).

Implementation Notes

  • Disabled by default, can be enabled via setting WARDEN_SABLIER_ENABLE =1 in the service .env
  • With stop all containers except the ingress (varnish/nginx depending on project configuration)
  • Session lifetime can be set per project via TRAEFIK_SABLIER_DURATION=2h (How long before Sablier sleeps the containers)
  • Custom warden theme (Good PR opportunity for someone to make it look decent)
  • Requires updating TRAEFIK, which can be done through the service configTRAEFIK_VERSION=2.9

Configuration

Service Config: WARDEN_SABLIER_ENABLE=0 - Enables Sablier globally for the installation (Unable to think of a good use case of enablement on project basis)

Project : TRAEFIK_SABLIER_DURATION=30m - How long Sablier waits to sleep containers TRAEFIK_SABLIER_THEME=ghost - Sablier theme to use List of Default Themes

Advanced: ${WARDEN_HOME_DIR}/etc/sablier/theme - Directory if you want to declare any custom Sablier Themes ${WARDEN_HOME_DIR}/etc/sablier/sablier.yml - Sablier Service Configuration Overrides

SamJUK avatar Feb 20 '24 10:02 SamJUK