5 ms·
Not hetzner but a similar provider: - Deploy by stopping the server, rsyncing in the changes, and starting the server. The whole thing is automated by scri
by alex7734 4y ago
Not hetzner but a similar provider:
- Deploy by stopping the server, rsyncing in the changes, and starting the server. The whole thing is automated by script and takes 5 seconds which is acceptable for us.
- Run apt upgrade manually biweekly or so.
- We use client-side load balancing (the client picks an app server at random) but most cloud providers will give you a load balancer IP that transparently does the same thing (not for free though).
- For scaling just manually rent more servers.
- For backups we use a cronjob that does the backup and then uploads to MEGA
- For security we setup a script that runs iptables-restore but this isn't really all that necessary if you don't run anything that listens on the network (except your own server obviously).
- DDoS is handled transparently by our provider.
While this might change if you're super big and have thousands of servers, in my experience simple is best and "just shell scripts" is the simplest solution to most sysadmin problems.
- bayesian_horse 4y agoAnsible can be a big step forward from "just shell scripts". I was on the fence for a while, but it does make things easier quite quickly, even for smaller deployments. Even for just documenting wtf is running on the servers and how.
- sshine 4y agoWhat I like about Ansible: - It provides a standard procedural format for my shell scripts - It comes with some level of type-checking when I play a script - It makes me actually test that my procedures can bootstrap - The playbook style helps me keep scripts organized - It lets me start from "You have a server." without questioning where it came from. - Ansible, while "bottom-up", lets me bootstrap "top-down" systems like Kubernetes, container registries, etc.
- marcosdumay 4y ago> Ansible can be a big step forward from "just shell scripts". It can be. It also can not-be. I'd recommend anybody to start looking once they reach more than 2 machines, but yeah, depending on what you are doing it can add value when you have 1 or 2 machines too.
- lastofus 4y agoIn my experience, Ansible is fantastic for provisioning a machine from bare Linux VM to running service. OTOH it's quite slow when used for deployments. There's no way you would be getting 5 second deployments with it. My favorite middle ground between shell scripts and Ansible is Fabric (https://www.fabfile.org/ https://www.fabfile.org/).
- e12e 4y agoAnsible isn't a speed demon, but note that Ansible, like docker over ssh (export DOCKER_HOST=“ssh://user@remotehost) greatly benefits from persisted ssh connections - via ~/.ssh/ssh_config or Ansible config. https://docs.rackspace.com/blog/speeding-up-ssh-session-creation/ https://docs.rackspace.com/blog/speeding-up-ssh-session-crea... https://www.redhat.com/sysadmin/faster-ansible-playbook-execution https://www.redhat.com/sysadmin/faster-ansible-playbook-exec... Apparently Docker also let you point at different hosts via "context": https://docs.docker.com/engine/context/working-with-contexts https://docs.docker.com/engine/context/working-with-contexts