I'm currently managing a handful of servers hosting some e-commerce sites built on WordPress, as well as a few custom PHP applications using Vanilla PHP and Laravel on DigitalOcean. My system is pretty basic at the moment, running on Fedora Cloud OS, and I upgrade my servers every six months to keep things running smoothly. My tech stack includes Nginx, PHP-FPM, MariaDB, Redis, Postfix, and basic log management with Cron jobs and Logrotate.
Initially, I set everything up manually, which took several hours for maintenance every six months. However, I began automating some processes with custom bash scripts, which brought that time down to under 30 minutes. The main bottleneck now is handling large database backups, which still eats up quite a bit of time.
As my number of servers grows, I'm looking to fully automate the process. I've come across several steps that I think I need to take: switching from Nginx to Caddy, containerizing my applications, using the ELK stack for logging, changing mail servers, moving to a more stable OS, and replacing my bash scripts with Ansible combined with Terraform and Nomad. I'm also considering adding replication to MariaDB and integrating CI/CD pipelines. It's a bit overwhelming! Has anyone else been through this? How did you manage your transition to automation? I'd love some guidance on how to proceed tactfully without overwhelming myself.
6 Answers
Since you're already on DigitalOcean, I'd suggest diving into Ansible combined with Terraform right away. Use Terraform for provisioning droplets and various resources, while Ansible can handle the server configuration. You can stick with Docker and docker-compose for the time being, then consider a switch to Kubernetes as you scale up your operations.
It looks like you're suggesting too many changes at once rather than focusing on automating your current setup. I recommend starting with automation before altering your tech stack. Create a plan where you categorize all your changes between automation tasks and those related to stack improvements. This will help you manage things better without the stress of too many changes at once.
What kind of automation have you already implemented? Knowing your current setup can help others provide better suggestions for the next steps!
You might want to rethink switching to Caddy since you're already using Nginx effectively. If it's working well, it could be worth sticking with it for performance reasons. As for transitioning from bash scripts, using Ansible is a smart move! But about Terraform, it seems your infrastructure is already set up, and Terraform is mainly for provisioning new infrastructure rather than managing existing servers. I've had great experiences using Debian if you're looking for a solid OS option.
You can take advantage of DigitalOcean's platforms like Kubernetes, App Platform, or stick with Terraform + Ansible. Slowly containerize your apps and set up managed databases and CI/CD workflows. Just take your time; focus on automating one layer at a time to avoid overwhelming yourself.
Are you managing your servers through SSH? If they're on virtual machines, a great next step for automation is definitely Ansible. It’s straightforward to use for configuring everything automatically, making your life easier in the long run.
Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures