Salt (SaltStack) is a powerful configuration management and remote execution tool that can manage thousands of servers simultaneously. Using a master-minion architecture with ZeroMQ messaging, Salt delivers configurations in near real-time. This guide covers setting up Salt for managing your VPS infrastructure.
Architecture
- Salt Master: Central server that stores configurations and sends commands
- Salt Minion: Agent running on managed servers that executes commands
- Salt SSH: Agentless alternative using SSH (slower but simpler)
- Grains: Static data about minions (OS, IP, CPU, etc.)
- Pillars: Secure, per-minion configuration data
Install Salt Master
# On your management server
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
sudo sh bootstrap-salt.sh -M -P
# Configure the master
sudo cat > /etc/salt/master.d/custom.conf /etc/salt/minion.d/custom.conf