My last infrastructure related post was about an experience of using AppFog and switching to Nodejitsu eventually. But that was not the end. In short: for Likeastore we needed SSL support, it happed that SSL is only available for Nodejitsu business plan, which price is 120 USD. That was simply to much for our small venture.
Long time ago, I realized – constrains are good. This case just proved that. Looking for alternative options, gave really nice results, which I easily could be re-used if you looking for simple deployment solutions.
Heroku is good service. Afraid to be mistaken, but that’s probably Heroku who popularized “git-powered” deployments much, ones there deployment script looks like:
The rest is all about the service – prepare runtime, deploy code, start web application etc. Besides of that Heroku open-sourced a lot of good stuff, including so called buildpacks, some ready to use scripts that are able to setup the dyno with all required runtime to be able to start application there.
I never seriously used Heroku, though. What I dislike, is pricing. Also, the other people I asked about their satisfaction of using Heroku, was not satisfying much (arguable). We needed more lightweight, easy to change setup.
Digital Ocean is very fast growing cloud-computing service. It’s not PaaS (platform as a service) like Heroku, it’s rather IaaS (infrastructure as a service). They are notable for few major things:
But again, Digital Ocean is nothing more as great infrastructure. Herding the server is all up to you. I personally was really afraid of that perspective of setting up nginx, configuring firewalls, load-balancing etc., that prevented me to look to Digital Ocean closely. Getting used to deployment procedures with Nodejitsu and Heroku, it’s real pain to deploy app by FTP again and do everything manually.
But lucky chance I noticed Dokku project and that was something really great, explain why later.
Dokku, can be installed to Ubuntu 13 machine and turn that machine into Heroku-like server. I mean, you can push the code there and Dokku, will fire-up new docker process, deploy code there, start the application, configure nginx and setup environment variables and SSL.
Btw, the time I just looked to Dokku, they missed exactly support of ENV variables and SSL. It was not acceptable for me, without those 2 features. Constraints again, but that gave me ability to contribute the projects and eventually I submitted both features.
Dokku, is very interesting project. First of all, because it based on trendy Docker. Docker is “Virtual-Machine-Based-Deployment” alternative. Deployment on virtual boxes are de-facto standard now and docker is about to change that. Guys from dotCloud open-sourced solution that allows to run isolated processes (containers) – that are like lightweight virtual machines. You can deploy docker on Ubuntu server and then use that as host any kind of applications or databases.
Docker could turn Ubuntu Server to PaaS and Dokku makes great “interface” for that.
Each Dokku piece is very interesting indeed and I hope to blog more about. And Dokku is using Heroku buildbacks, which makes you feel you deal with Heroku, not with your own setup.
Digital Ocean and Dokku make a perfect match. As I said above, Digital Ocean is something you can really start quick with. So, what we did is just started up 10$ Ubuntu 13 server and installed Dokku there. In total it took 7 minutes or so. I would not bother you with instructions, cause you find a lot in internet.. but also, assuming that DO + Dokku is a kind of Apple product, that does not require instructions.
First impression was simply amazing. You have everything under control and fill great with “git-powered” deployments. So, after successful try that machine became our staging server and I also fired-up another one for production one.
Now, then we developing features and what to show each other or test, you just need to do following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
The time we are ready to release:
1 2 3 4 5 6 7 8
It’s fast and it’s pretty reliable.
For conclusion, I would say that using both Digial Ocean and Dokku was a clear win for Likeastore being released.