Building Heroku for DigitalOcean: The beginning

Vadim Demedes
5 min readMar 15, 2015

Instead of jumping straight into the topic, let me introduce myself first. My name is Vadim, I’ve been a developer since the age of 13 and my programming language of choice is JavaScript. I was working for startups last 3 years and I always wanted to start something own, but I could not find a time even for a smallest project from my “Ideas” to-do list. There were many reasons for that: relationships, almost full-time job, sport, studies (in that order). During last 6 months items 0, 1 and 3 got removed from that array and I’ve been working on a product, that I would love to see people use and more importantly, use it myself.

And I think I took it far enough to confidently share the details with the world and plans on when it will be available for everyone. I’m building a Heroku for your DigitalOcean servers and it’s called Roqet. But wait, before you think “this dude must be kidding me” and close this tab, give me 14 more seconds and let the following list convince you to continue reading:

  1. You will save up to 80% in monthly costs (compared to Heroku) and keep the comfort of deploying with git push.
  2. Your app will be hosted on your DigitalOcean servers, therefore if Roqet is down, your application is up.
  3. Roqet does not have access to your servers. It is, like my friend Alex said, “a little dev-ops assistant”.
  4. This is definitely not a Heroku killer and it would be stupid to say so. This is a product for developers like me, you and small to medium startups, who’d rather spend a spare hundred dollars for something else, than for a few 1024 MB instances.

Great! If you are reading this, then probably you, Roqet and me will be friends!

So how did it all start? I must tell you, I love Heroku. It is safe to say, it revolutionized the way we deploy and manage our applications and it is a gold standard on how it should be done. But I am not a fan of its pricing and inability to easily install custom software inside dynos. I can make peace with the latter, but first one is a big warning sign for me.

So I decided to find a way to fix that for myself. I was following all the news around DigitalOcean, so it was obvious that it would be the place for hosting my apps. Then, I needed to find the tools, which would allow me to enjoy doing my job. It was easy to find tutorials on how to implement deployment via git push, but it seemed that I might as well just use Capistrano instead. Ok, I needed something more close to Heroku. Dokku and Deis came along. Those are definitely nice projects, but wait, I would need to repeat installation for each application, even if I just wanted to play with something for a few hours. And there was that moment, when a bulb lighted in my head.

Why don’t I create a tool, that will allow me to create a cluster of servers in my DigitalOcean account, configure load balancer and set up a deployment process in one command? I will be able to spend way less money on servers and still be able to manage my application using a command-line program. A tsunami of features and ideas for this project crushed onto my mind. I admit, I haven’t felt that excited for a long time. It sounded like a perfect plan and product.

Until I started to think about things, that would prevent me to do it. It was like that for a few days. I had this great idea, but also doubts and fears, which put me on hold before even trying to start. Then, something stroke my mind again. I’ve been years in web development, gained a ton of knowledge, applied it thousands of times, worked for clients, worked for startups and yet, I have nothing to show or be proud of. Isn’t that just crazy? I knew one thing for sure, it can’t go on like that. So I stopped thinking about bullshit and just started.

Exciting times, the beginning of an interesting project! The project felt big already on the start line and I pressured myself to start with a right tool set for the job so that I avoid mistakes and failures in the future. I know JavaScript and Node.js very well, but back then I thought the right path would be to use Ruby on Rails on pair with a PostgreSQL database. Rails and pgsql are solid & stable, big guys use them in production, libraries are awesome. So what was the problem, you might ask?

The problem was, exactly that, the “right” tool for the job. I haven’t even started, but I was already wasting hours on figuring out which turn to take. I’m not even going to talk about how much time I spent on finding benchmarks and comparing performance between both stacks. But eventually, I was convinced and settled down, I needed to go the Rails path, because community says it’s better suited for that type of project. Despite the fact that I was on a beginner/intermediate level with Rails and pgsql.

So this time, I really started developing the product. One week, two weeks, three weeks. Time was passing by and I was going really slow. After about three weeks, I said “fuck it, I am tired of googling how to do this and that, while I don’t even need to think about how to do the same in JavaScript”. And that was the first lesson learned in a product building process. You already know something, you can execute using that, why search for alternatives and read StackOverflow whether it’s the right tool or not? I abandoned the Rails app and started from scratch with Node.js (and MongoDB), which I really love and been using it for more than 3 years. And one week later I had a working prototype of an API server, that satisfied my needs.

So, here’s my first advice. If you have an idea, which you are excited about, start building it right now. It can be in Haskell, Elixir, C, Assembly or Brainfuck. If it can keep you going, there is definitely nothing wrong with it. And who even cares? Your users certainly will not care what’s under the hood, if the product is great. Would you stop using Google if it was written in Perl? I wouldn’t.

Ok, let’s get back to Roqet for a minute! I want all of you to use it as soon as possible, so I had to strip down a set of features to these:

  1. Automatic creation of server cluster and configuration using one command (roqet apps:create hello-world, just like in Heroku).
  2. Load balancer configuration to allow failover and zero-downtime deployments.
  3. Deployment using git push.
  4. Management of individual processes: start, stop, restart (full support of Procfile).
  5. Management of environment variables.
  6. Real-time logs from all your servers and your application.
  7. Management of ssh keys (syncs with DigitalOcean).
  8. Management of application releases, support for rollback.

I am planning to write a blog post about each of these and future features, how I build them and what problems I face while doing it.

I want to share my journey of building a product and I want you to join it!

P.S. Interested in how Roqet was built? Follow me on Twitter, so that you don’t miss any future posts!

--

--