[HN Gopher] Zero-Downtime Hetzner Deploys with Ansible
       ___________________________________________________________________
        
       Zero-Downtime Hetzner Deploys with Ansible
        
       Author : memset
       Score  : 139 points
       Date   : 2023-08-28 14:21 UTC (8 hours ago)
        
 (HTM) web link (scratchdb.com)
 (TXT) w3m dump (scratchdb.com)
        
       | rawoke083600 wrote:
       | Everytime Hetzner comes up I tried to make the comment hoping it
       | reaches the right ppl !
       | 
       | Hetzner has THE BEST UX for their cloud-vps stuff. Please don't
       | change a thing, just for the sake of changing something. Looking
       | at "YOU Spotify !" Compared to most of the other cloud vendors,
       | its refreshingly simple and elegant ! Good job whoever did it,
       | now the job is to KEEP it like that.
       | 
       | Happy customer for about 1.5 years now.
        
         | coffeeri wrote:
         | I love the cloud UX, but neither robot nor konsoleh. Hopefully
         | they will migrate all services into _cloud_.
        
         | drcongo wrote:
         | I'd second that. We have stuff on both Digital Ocean and
         | Hetzner, and switching between them I'm constantly reminded how
         | much better the ux on Hetzner is. The fact that they now do
         | _hugely_ capable ARM servers for stupidly cheap is a bonus, and
         | if they ever open a London data centre I 'd probably drop
         | Digital Ocean immediately.
        
         | KomoD wrote:
         | Hetzner Cloud also deploys so fast, don't have to wait a
         | billion years
        
       | esafak wrote:
       | Does anybody have a Pulumi script for the same?
        
       | memset wrote:
       | Didn't expect to see this on the front page!
       | 
       | Basically, I'm working on building the kind of company that I've
       | always wanted to: simple technology (not k8s!) to do cool things
       | (ingest tons of data into a database.) I can run the software on
       | a single server, but my customers didn't want downtime when I
       | deployed (who would've thought?) so I implemented a rolling
       | deploy.
       | 
       | I've recently started hosting on Hetzner (ran out of AWS
       | credits!) and have found the experience to be pretty good, and by
       | far the best value of compute per dollar. If you don't want
       | anything in the container world - I worked at huge companies that
       | IPOed without containers - then consider their server offerings.
        
         | dig1 wrote:
         | You can use HAProxy on a cheap shared Hetzner server (2GB or
         | RAM will be plenty for it) as an alternative for Hetzner LB. It
         | will give you more flexibility and dynamic scaling [1] without
         | downtime (plus it has very good management API through socat).
         | Even if you use a hard hacks, like updating the HAPproxy config
         | through Ansible and reloading it, HAProxy will not terminate
         | running connections but redirect requests to live backends.
         | 
         | [1] https://www.haproxy.com/blog/dynamic-scaling-for-
         | microservic...
        
       | hbroadbent wrote:
       | I love Hetzner <3.
        
       | marcopicentini wrote:
       | You could use Cloud66 + Hetzner and chose Sequential deployment
       | as a deploy strategy.
       | 
       | https://www.cloud66.com/
        
       | mati365 wrote:
       | I used to deploy Podman Quadlet containers there and I'm super
       | satisfied.
        
       | rgrieselhuber wrote:
       | Hetzner is amazing, used them for years.
        
       | wrapperup wrote:
       | Hetzner is fantastic. We switched from Linode to Hetzner over a
       | year ago for our website and backend, and have been running with
       | zero downtime. The pricing is also pretty darn cheap. Hoing they
       | expand their US locations!
        
         | truetraveller wrote:
         | Dedicated or cloud? Which data centers?
        
       | [deleted]
        
       | pbarnes_1 wrote:
       | Absolutely love Hetzner -- we use a tonne of the RX220's.
       | 
       | Good to see tools and scripts around their offerings.
       | 
       | Hoping for that US DC at some point.
        
         | tormeh wrote:
         | They already have one.
         | 
         | EDIT: Two, in Ashburn, Virginia, and Hillsboro, Oregon.
        
           | chpatrick wrote:
           | Only for their cloud machines so far though.
        
       | tekkk wrote:
       | Interesting. I'm in the process of trying to setup a k3s cluster
       | on Hetzner but it's really a can of worms trying to make sense of
       | all the different services and configuration. Makes me think
       | should I ride the Ansible horse just a little longer. All I want
       | is things not to break for users if something happens. Like me
       | making a mistake or a region going down.
       | 
       | Well, live and learn I guess.
        
       | bluehatbrit wrote:
       | Great writeup and thanks for providing the code as well!
       | 
       | I think if I were to do this I'd probably do it the other way
       | around. I'd introduce the new code first on a new node, add it to
       | the load balancer, check it's healthy, and then remove the old
       | node.
       | 
       | It allows a bit more growth for new functionality should it be
       | needed. For example you can run a canary for an hour and check
       | the error rates before promoting the deployment. Or you can
       | rollback if the new code fails to start for some reason without
       | needing to reload the previous application version first.
       | 
       | On the other hand, this works great if you want to keep the VPS
       | more long lived by recycling it.
        
       | nickspacek wrote:
       | Hetzner is great, but recently ran into an issue where their
       | (newly introduced?) cloud security just spins instead of ever
       | progressing to the login prompt on Mull and Librewolf. I assume
       | because it's detecting something it doesn't like.
       | 
       | When I reported it to the support, I was first told to visit the
       | account login screen at the provided URL. To which I responded
       | that, yes, that was what I was trying to do but could not reach.
       | Next I was asked to reset my password; I did so, as that page is
       | not protected by the same security challenge. Alas no change.
       | Finally, it was suggested that I reset my router. Since it was
       | the middle of the day with many other users on my network, I
       | asked whether this was to see if IP blocking was in place. They
       | said yes. Rebooting the router didn't change anything. I switched
       | browsers, and it immediately worked.
       | 
       | So if anyone at Hetzner is listening, maybe have a look at your
       | login protection and consider whether there is an alternative way
       | to block bots (or whatever) without impacting legitimate
       | customers.
        
       | freewizard wrote:
       | Running a small fleet in Hetzner, simply great.
       | 
       | I really hope they can offer arm servers in the US.
        
       ___________________________________________________________________
       (page generated 2023-08-28 23:01 UTC)