Skip to main content

Server Setup

Overview

Defines the base configuration and setup for all server instances in the infrastructure. This includes both production and development servers, with specific considerations for different roles and requirements.

Status

  • Base server setup with essential packages
  • Container runtime management (Docker/Containerd)
  • Logrotate and unattended upgrades
  • Network monitoring tools
  • Monitoring integration (Prometheus/Node Exporter)
  • Backup configuration
  • Resource limits and tuning

Components

Base Setup

  • Essential packages installation
  • System maintenance tools
  • Network monitoring utilities
  • Log management
  • Automatic updates

Container Runtime

  • Docker for standalone services (dockerio role)
  • Containerd for Kubernetes nodes (containerd role)
  • No default container runtime installation

Server Types

  1. Production Servers

    • Mercury TA servers
    • Mercury Bot servers
    • Kubernetes nodes
    • Dokku servers
    • GPU/CPU compute servers
  2. Development Servers

    • VPN servers
    • Test environments
    • Development proxies

Technical Implementation

Playbooks

  • server_setup.yml: Base server configuration
  • production_setup.yml: Production-specific setup with container runtime handling

Roles

  • server: Base server configuration
  • docker: Docker installation and configuration (when dockerio role is present)
  • containerd: Containerd setup for Kubernetes nodes
  • Various service-specific roles (dokku, monitoring, etc.)

Configuration

# Server essentials
- net-tools
- nmap
- tcpdump
- iftop
- mtr
- rsync
- logrotate
- cron
- unattended-upgrades

# Container runtime selection via roles
roles:
- dockerio # For Docker-based servers
- containerd # For Kubernetes nodes

Development Guidelines

Adding New Server Types

  1. Define required roles in inventory
  2. Add specific configuration if needed
  3. Update relevant playbooks
  4. Document in FDD

Container Runtime Selection

  • Use dockerio role for Docker-based services
  • Use containerd role for Kubernetes nodes
  • Never install both on the same host
  • Document runtime choice in inventory

Monitoring and Maintenance

  • All servers should have basic monitoring
  • Regular backup configuration
  • Resource usage monitoring
  • Log rotation and management

Next Steps

  1. Create monitoring role with Prometheus/Node Exporter
  2. Implement backup strategy
  3. Add resource monitoring and alerts
  4. Create server hardening role
  5. Implement automatic certificate management