Follow

tech 

My personal/snake.club infra hygiene is really weird. I use terraform to manage instances, object storage buckets, etc across both AWS and Linode. But then for my actual management of my server, there's no puppet/ansible/anything. Just a git repo full of docker-compose and systemd units, with a shell script to link them all into place.

Also a shell script to configure iptables.

@bentley am I doing it right?

tech 

@brenns10
The questions I’d ask are:
1. What is the impact / effort to fix a server disappearing? Ideally this would be close to zero (eg autoscaling group), or at least not require running any manual commands
2. How much effort is rolling out changes (including updating code and updating/changing OS settings/packages)? The nice thing about ansible, puppet, etc is you define the state you want and it gets you there, whereas scripts might require running things in the right order to work

tech 

@brenns10
An alternative that could be interesting is to just re-deploy everything when you want to make a change, and do a blue/green changeover at the load balancer level

tech 

@bentley forgot my content warning :/

But yeah given that DB server == app server that won't work for me :P

tech 

@brenns10
Honestly under maybe a dozen servers it’s not worth spending a ton of time on automation. I’d be more worried about making sure packages stay up to date and security groups are properly configured.

tech 

@bentley Yeah I was just so spoiled with automation that it feels like it's a noble goal on its own. Thankfully my entire personal compute infra consists of exactly one 4CPU/8GiB Linode and one EC2 instance which is about to be terminated. So keeping things up to date is easy.

tech 

@bentley But can I just say how proud I am to have nightly DB backups at all? Or Mastodon media stored off-site in object storage? lol.

tech 

@brenns10
If load ever surpasses 1 server then I’d separate the datastore and application layer, move the datastore to (eg) RDS, and put the app layer in a 1-2 instance ASG

@bentley LOL if my server disappears, I feel sad. Then I start a new one, install my list of packages from my README, restore my nightly postrges DB backup, and start up all my docker-compose services again. Toots from that day are lost because the backup happened at 00:20. Uploaded media is stored in S3-compatible object storage and is safe.

Not all of us use spot instances :P :P :P

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!