`sztabctl` Runtime Control Script for Release Deployments (SZ-94)
rk@tigase.net opened 10 hours ago

Summary

Introduce a minimal runtime control script (sztabctl) for Sztab release environments.

This script will:

  • Start the Sztab stack
  • Stop the Sztab stack
  • Tail logs
  • Show container status
  • Print service URLs

It is intended strictly for release/runtime usage and must not depend on repository layout, Dockerfiles, or Maven.

This cleanly separates:

  • Developer workflow =>sztab
  • Runtime/operator workflow =>sztabctl

Motivation

The existing sztab script is development-oriented and:

  • Assumes repository structure
  • Uses Maven for version resolution
  • Builds images
  • References Dockerfiles

In release environments none of this is required.

Sztab administrator only needs to:

  1. Start stack
  2. Stop stack
  3. Tail logs
  4. Check status
  5. See service URLs

We should not require a Git checkout or repository root for runtime control.


Scope

Create new standalone script:

sztabctl

It must operate using:

docker-compose-release.yml

from the current directory.

It must not reference:

  • backend/
  • frontend/
  • Maven
  • Git
  • Dockerfile paths
  • repo root

Functional Requirements

--start

./sztabctl --start

Runs:

docker compose -f docker-compose-release.yml up -d

After start, print:

UI       : http://localhost
API      : http://localhost/api
Git      : http://localhost/git

--down

./sztabctl --down

Runs:

docker compose -f docker-compose-release.yml down

--logs

./sztabctl --logs

Runs:

docker compose -f docker-compose-release.yml logs -f

--status

./sztabctl --status

Runs:

docker compose -f docker-compose-release.yml ps

--urls

Print static URLs:

UI       : http://localhost
API      : http://localhost/api
Git      : http://localhost/git
Database : internal only

Non-Goals

  • No image builds
  • No Maven calls
  • No version detection
  • No Git checks
  • No auto-update
  • No environment templating
  • No release tagging logic

Testing Plan

  1. Create empty directory
  2. Place:
    • docker-compose-release.yml
    • caddy/Caddyfile
    • sztabctl
  3. Run:
    • ./sztabctl --start
    • ./sztabctl --status
    • ./sztabctl --logs
    • ./sztabctl --down
  4. Confirm no dependency on repo layout

Estimated Time

  • Design runtime contract: 0.5h
  • Implement minimal script: 1.0h
  • Clean directory testing: 1.0h
  • Edge case fixes: 0.5h
  • Documentation update: 0.5h
  • Packaging validation: 0.5h

Total: 4.0h


Risk

Low.

Main risk: accidental coupling to development compose file or repo structure.

Mitigation: test in completely empty directory.


Impact

  • Cleaner production UX
  • Clear separation of dev vs runtime tooling
  • Reduced operator friction
  • More professional release posture

Target Release: 1.9.x

  • rk@tigase.net commented 10 hours ago

    Time Log

    Design & Scope Definition – 30 min

    • Clarified separation of dev vs runtime responsibilities
    • Identified minimum required commands
    • Eliminated unnecessary build logic

    Script Implementation – 60 min

    • Implemented minimal runtime script
    • Added defensive checks
    • Added URL printing

    Clean Environment Testing – 60 min

    • Tested from outside repository
    • Verified no implicit path dependencies
    • Confirmed no Maven or Git assumptions

    Compose Default Refinement – 45 min

    • Added fallback defaults for:
      • POSTGRES_PASSWORD
      • SZTAB_PUBLIC_URL
      • GIT_PUBLIC_URL
    • Ensured .env optional

    Final Review & Hardening – 30 min

    • Verified no dev-only logic leaked in
    • Confirmed predictable failure modes
    • Removed build-related commands

    Total Time Spent

    3h 45m

    Estimated: 4h
    Actual: ~3h45m


  • rk@tigase.net commented 10 hours ago
    rksuma@Ramakrishnans-MacBook-Pro sztab % git checkout -b feature/SZ-94-sztabctl
    Switched to a new branch 'feature/SZ-94-sztabctl'
    rksuma@Ramakrishnans-MacBook-Pro sztab % 
    
    
  • rk@tigase.net changed state to 'In Progress' 10 hours ago
    Previous Value Current Value
    Open
    In Progress
issue 1 of 1
Type
New Feature
Priority
Major
Assignee
Version
1.9.0
Sprints
n/a
Customer
n/a
Issue Votes (0)
Watchers (3)
Reference
SZ-94
Please wait...
Page is in error, reload to recover