Ask HN: Where do you deploy to in 2018 and how?

77 points by Narzerus ↗ HN
I've been using Heroku for several years now, and as it happens to everyone eventually it becomes just too expensive.

I'm curious to know what people here use to deploy, and where are you hosting your apps.

Personally I'm looking for an experience as similar as possible to Heroku, any recommendations?

84 comments

[ 3.1 ms ] story [ 59.8 ms ] thread
What parts of Heroku in particular are you interested in seeing in an alternative? If a friendly user interface is a big part of the ask, your options are unfortunately limited (at least among the big cloud providers, I'm unfamiliar with smaller providers).

AWS's Elastic Beanstalk doesn't have any UX to speak of (just a few options to fiddle and some weak logging support). It's a very raw service, much like the rest of AWS (rock-solid infrastructure to bring-your-own stuff). They take care of infrastructure but developer pleasantries are entirely up to you.

App Engine is significantly better on the UX front - you get error reporting, metrics, logging, etc all in a single cohesive web app. In my experience I hit some hard to debug / resolve quirks, but that is very much a ymmv situation. It can be tricky to figure out how to configure the right pieces / permissions in their new app engine variant (docker-based). I wouldn't use the classic variant at this point, it's pretty heavy on the vendor lock-in front. It's great if you need the specific capability of classic app engine but that's most likely not what you need.

If you're using Heroku's hosted postgres, know that GCloud's postgres support is still "beta". AWS RDS on the other hand has very good postgres support.

In both cases, deploys aren't just a git push, but use a custom CLI (`eb deploy` and `gcloud something something`). They're also both pretty typically tough to get to the first successful deploy with - for example Elastic Beanstalk will spend quite a while attempting to recover from deployment errors, and if you've never deployed a successful version it's very bad at that, and it also blocks deployments while it attempts to recover. So you end up stuck while it attempts to recover from a problem it will never recover from for a bit (this has been a problem for literally every beanstalk service I've ever deployed, heh).

You can also go something like the hosted Kubernetes route. Currently GCloud is king here, but naturally that's a command-line only UX unless you deploy your own kubernetes UI service (unfamiliar with options there)

Unfamiliar with Azure's offerings.

Some AMIs built with Packer, auto scaling groups, ELBs, CloudFront, Jenkins, RDS, Elasticache, and some scripts in the repo. I build simple apps; if they got crazier I might use a cloud managed k8s.
Azure app service, deploy to it with MSBuild (which we fire off from teamcity, which git clones, runs build scripts, then deploys with msbuild). App services have a 'staging' deployment slot, so you can deploy to the staging slot, test it, then swap the slots and you are live.

App Services are cheap and easy to manage, if you write efficient code they have plenty of horsepower for medium sized websites.

Heroku and AWS, depending on application. Heroku is a bit pricey, yes, but on the other hand they've provided really good service over the years.

In general all my deploys are done using Travis CI.

In making a selection like this you need to separate the deploy UX (git push heroku master) from the underlying service.

Things like dokku, etc are great at providing the UX and generally really solid.

However, much of the benefit of Heroku is that they handle some/much of the underlying sysadmin tasks you'd otherwise need to worry about. It's easy to discount that as it's mostly invisible until there's a serious problem.

A middle ground between putting dokku onto a VPS is perhaps Amazon's Elastic Beanstalk service combined with Amazon RDS which provides you a big chunk of the functionality (albeit in a less slick wrapper).

Flynn [1] is worth a look (having come from dokku). Heroku-like and runs as a cluster.

[1]: https://flynn.io

Are they still knocking about? They used to do a weekly blog post but nothing since March 2017
AWS, mostly. On my servers I have simple shell scripts that have functions for pulling and running Docker images. Locally I use rake to build and push Docker images. Finally, Rake executes the deploy script on the server via ssh which pulls and runs the new images.

It's not fancy like dokku (or even Docker Compose), but it's composed of very minor pieces that are easy to debug and extend.

Not knowing if Docker Compose has executed successfully, and if I'm on the newest image or not, grew to be an extra todo in my checklist when debugging my applications.

I know it's not useful for you, but: In our own datacenters, using Kubernetes on baremetal.
I'm looking into this. How and how difficult is it to get K8 onto baremetal? Could you point me towards tooling and best practices for running K8 on baremetal?
The short answer is: It's pretty ugly. I don't know the details, but we PXE-boot and install CoreOS, then run kubelet using rkt (using a systemd service). The other k8s components (etcd, apiserver, controller manager etc.) are managed by the kubelet using static manifests. Persistent volumes are backed by a separate storage appliance via NFS.

Our team built this entire process ~2 years ago, when we started using k8s. We would probably use some off-the-shelf parts today, but practically nothing existed back then.

Heh, nice timing with this question! We just published an article on how we deploy at Kiwi.com (to Rancher) yesterday: https://code.kiwi.com/announcing-crane-e8ce911b187b
Ugh, this level of abstraction is dizzying. Now you telling me I need Crane to deploy to Rancher to manage Kubernetes to orchestrate Docker containers to run my app?
Well, almost. We don't use Kubernetes, but Cattle (which is part of Rancher.)

I don't entirely understand your point though; is our level of abstraction too low? With Heroku (preference of the OP) all of this, the containerization, the orchestration, the deploy tool, is abstracted away. Is that what you'd prefer?

Kubernetes, both in-house and on AWS. I couldn't live without it anymore, it's just so nice to use and easy once you've gotten over the initial learning curve.

kubectl apply -f for simple deployments, Helm for more complex ones.

What services on AWS do you use with Kubernetes? Any good resources re: Kube and AWS?
vmware guests with powershell and jenkins
If you like the Heroku user experience you might like the Serverless Framework[1] as a front-end to AWS Lambda. In my case the app that I was deploying was already a WSGI Twelve-Factor app[2] so I created a yaml file and deployment just worked.

[1] https://serverless.com/ [2] https://12factor.net/

Docker managed by Kubernetes and deployed in AWS.
aws lambda with aws-sam-local for serverless apps and aws s3 and cloudfront for html/css/js frontend

For more heavier stuff I use cloudformation and to deploy docker images to ECS

The AWS-Stuff was a steep learning curve in the last months but worth it.

we're using jenkins to deploy our monolithic java ecommerce applications onto baremetal servers, now slowly moving to aws
I continue to use Heroku for a few applications. Since the last few application I have worked on are B2B apps they don't get much usage in the off-hours. I wrote a heroku-addon[1] for scaling down on nights/weekends so the cost isn't bad overall.

[1] https://elements.heroku.com/addons/flightformation

We switched MindMup from Heroku to AWS Lambda (+S3+Cloudfront for web page hosting), gradually in 2016, and I’m quite happy with the results. We deploy using claudia.js.
Azure App Service, deployed via Visual Studio Team Services. App Service supports Git push deployments, but VSTS plays nicely with it (as you'd hope).
Most of my projects are Rails-based, and I tend to use DO [0], and have just discovered Hatchbox [1] to deploy. Super easy for side-projects to get started and deployed. Taken deploying side projects from days to minutes.

[0] https://www.digitalocean.com/

[1] https://www.hatchbox.io/

I also use Hatchbox. It's a pretty good (and cheaper) alternative to Heroku, and you can own the VPS with your provider of choice!
https://www.nanobox.io is also a great option for Rails... or many other languages & frameworks.

Contained developer environments, simple command line deploys to VPS, and a free tier that can handle most hobbyist application needs.

I deploy Rails & Elixir / Phoenix apps with Nanobox

Creator of Hatchbox.io here! I was surprised to see this on here, which is awesome. Let me know if you have any questions. Happy to help!
Gitlab for CI/CD then deploy to AWS, Google Cloud, or Firebase hosting.
We've bee using a mix of Heroku and Firebase for static hosting.

Lately we've been moving small services to cloud functions in order to shut down Heroku dynos and it's been great so far.

personal heroku/dokku clone, which is really just a remote git with some hooks that build images and provision to docker.

haproxy in front loadbalancing and doing routing

tinc mesh for a ghetto private cloud with dirt cheap boxes

consul k/v store used for runtime configuration