Skip to content

011. Server Deployment Strategy

Date: 2026-02-07

Status

Accepted

Context

We need a reliable way to deploy dotfiles to headless servers, containers, and cloud instances. Our previous setup was primarily focused on personal workstations (laptops/desktops) and lacked a streamlined process for server environments which often have different requirements:

  1. Minimalism: Servers don't need GUI tools (VS Code, Alacritty, etc.).
  2. Automation: Deployments should be scriptable and non-interactive (Ansible, cloud-init).
  3. Optimization: Servers may benefit from specific tools (Docker utilities) not needed elsewhere.

Decision

We will implement a multi-layered server deployment strategy:

  1. Bootstrap Script Enhancements:

    • Add --server flag to force minimal installation.
    • Add --profile <name> to select specific toolsets.
    • Add --yes for non-interactive execution.
  2. Mise Profiles:

    • Use mise to manage tool versions for servers.
    • Create specialized profiles (e.g., docker-host, minimal) that include/exclude tools based on the server's role.
    • Maintain a base mise-server.toml for common server utilities.
  3. Ansible Integration:

    • Provide a production-ready Ansible role (roles/dotfiles).
    • Support "Push" model deployments via ansible-playbook.
    • Allow inventory-level configuration of profiles and packages.
  4. Chezmoi Conditionals:

    • Use is_server variable in templates to exclude desktop-specific configuration files.
    • This prevents cluttering servers with useless config files.

Consequences

Positive

  • Streamlined Deployments: Single-command or Ansible-driven setup for new servers.
  • Reduced Bloat: Servers only get what they need.
  • Flexibility: Profiles allow tailoring (e.g., a heavy dev server vs. a lightweight container).
  • Idempotency: The entire process is designed to be safe to re-run.

Negative

  • Complexity: Introducing profiles adds another layer of configuration to manage.
  • Testing: We now need to verify both desktop and server deployment paths.

Compliance

  • Non-interactive mode supported? Yes.
  • Idempotent? Yes.
  • Minimal footprint option? Yes (minimal profile).