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 (
dockeriorole) - Containerd for Kubernetes nodes (
containerdrole) - No default container runtime installation
Server Types
-
Production Servers
- Mercury TA servers
- Mercury Bot servers
- Kubernetes nodes
- Dokku servers
- GPU/CPU compute servers
-
Development Servers
- VPN servers
- Test environments
- Development proxies
Technical Implementation
Playbooks
server_setup.yml: Base server configurationproduction_setup.yml: Production-specific setup with container runtime handling
Roles
server: Base server configurationdocker: Docker installation and configuration (whendockeriorole 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
- Define required roles in inventory
- Add specific configuration if needed
- Update relevant playbooks
- Document in FDD
Container Runtime Selection
- Use
dockeriorole for Docker-based services - Use
containerdrole 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
- Create monitoring role with Prometheus/Node Exporter
- Implement backup strategy
- Add resource monitoring and alerts
- Create server hardening role
- Implement automatic certificate management