π Real-World Examples
π Real-World Examples
Production-style Itamae recipes for common infrastructure tasks. Each example includes a complete directory structure, node attributes, recipe code, and templates.
π Examples
| Example | Description | Key Resources |
|---|---|---|
| Nginx Web Server | Install and configure Nginx with virtual hosts | package, service, template, directory, execute, link |
| PostgreSQL Database | Set up PostgreSQL with users, databases, and tuning | package, service, template, execute, user, group, directory |
| Ruby Application | Deploy a Ruby app with Puma and systemd | user, directory, git, gem_package, execute, template, service, link |
| Docker Host | Provision a Docker host with daemon configuration | package, execute, template, group, service, file |
| User Management | Manage system users, groups, SSH keys, and sudoers | user, group, directory, file, template, execute |
| Monitoring Stack | Deploy a monitoring agent with health checks | user, http_request, template, service, directory, file |
| Security Hardening | SSH hardening, firewall rules, and audit logging | template, package, service, execute, file, directory |
| Redis Cache | In-memory data store with persistence and kernel tuning | package, service, template, user, group, directory, execute |
| Letβs Encrypt SSL | TLS certificates with certbot and auto-renewal | package, execute, template, directory, service |
| Log Management | Centralized rsyslog forwarding and logrotate | package, template, service, directory |
| MySQL Database | MySQL server with users, backups, and tuning | package, service, template, execute, user, group, directory |
| HAProxy Load Balancer | Reverse proxy with health checks and stats | package, service, template, directory, file, execute |
| Jenkins CI | CI/CD server with Java, plugins, and Nginx proxy | package, service, template, directory, execute, link |
| Multi-Tier Application | Compose roles for a full web + app + db stack | Roles combining all the above |
π How to Use These Examples
- Copy the directory structure into your Itamae project
- Customize node attributes in your JSON files for each host
- Run with Itamae targeting your server:
# Local execution
itamae local -j nodes/web01.json cookbooks/nginx/default.rb
# Remote via SSH
itamae ssh -j nodes/web01.json -h web01.example.com cookbooks/nginx/default.rb
See the Getting Started guide for installation and the CLI Reference for all options.