Diving into the Digital Ocean

Paul Grenyer

Paul Grenyer

I’ve been looking for a good, online continuous integration solution since late 2007. It’s useful, even as a lone developer, although running it on your development machine can be problematic, especially as back then I developed on a number of different machines and those I wasn’t using were turned off.

IaaS (Infrastructure As A Service) was in its infancy then and those providers I spoke to were shocked at the idea of building and running an executable, especially as the boxes were predominantly shared. My hosting provider installed Cruise Control for me, but it never really worked.

In the end I used a spare machine at work to run Jenkins and at home I went without until I decided to buy a server and virtualise it. That worked quite well, but it took a lot of setup and the performance wasn’t great. I couldn’t afford a huge amount of memory or super fast disks. That worked sufficiently for about eighteen months until I gave the machine a good dusting internally and it refused to start again. So I was back to looking at online providers.

In the meantime PaaS (Platform As A Service) had come along and Cloudbees have quite a good hosted Jenkins based offering for Java development. The free tier gives you a limited number of minutes per month but I found I used these up far too quickly. One reason being that it ran very slowly. I was told that the paid for tier was much, much faster but at $99/month, for me at least, it didn’t represent value for money. Plus a lot of my projects run integration tests against a variety of databases and using the Cloudbees solution would mean I’d have to also find a database hosted elsewhere. Cloudbees have a fantastic offering but it’s not for me.

By this time I was writing a course on Continuous Integration that also used Sonar for measuring code quality and ideally I wanted a hosted solution for that. Again, there is one, but it costs $20/month.

Having heard a great deal about Amazon Web Services (AWS) I turned to that. From the start I found it unintuitive and complicated in the extreme. How to get going and the billing were quite opaque to me and I had to rely on some help from a colleague. I started off with an S3 Ubuntu Linux instance running Sonar and MySQL, both of which died frequently. So I moved to AWS Linux and a separate database server, both of which I thought were in the free tier, that is until I received a bill for nearly £200. Thankfully AWS saw my point of view and refunded the money.

To be on the safe side I removed all my instances and started again. This time just with a free S3 AWS Linux instance that I used to run Jenkins for a local NRUG meeting. I haven’t used it since.

My perception of my own behaviour is that I don’t usually respond to online advertising. However, when the Digital Ocean advert for server instances with 512 MB of RAM and 20GB of SSD space for $5 a month popped up on Facebook it was too much to resist. I clicked though. And set up an account in just a few seconds, but then I left it for a couple of weeks or more as it takes time setting these things up from scratch and I was busy with other things.

Then I started a new project that needed Sonar, Jenkins and Nexus (artefact repository). I logged back into Digital Ocean and went about creating a droplet (what Digital Ocean calls a server instance) for Sonar. It was fantastically easy in only a few steps:

  1. Select a host name.
  2. Select a size. There are six sizes to choose from ranging from 512 MB RAM, 1 CPU, 20GB SSD storage and 1TB of traffic for $5 per month to 16GB RAM, 16 CPUs, 160GB SSD, 6TB of traffic for $160 per month.
  3. Select a region to host the Droplet. The choice is New York 1, New York 2, Amsterdam 1, Amsterdam 2 or Singapore 1.
  4. Select an image. There are five Linux distributions to choose from Ubuntu, CentOS, Debian, Arch Linux, Fedora. You can also choose the version.
  5. Click create droplet.

The root password is emailed to you almost immediately and in less than 60 seconds the droplet is created, ready to go and you can SSH into it. That really is all there is to it.

I got Sonar set up really quite quickly as I’ve done a few times in the past. Then another Ubuntu droplet to run MySQL, another to run Jenkins and another to run Nexus. It was all so easy I managed to get most of it set up in a single evening and it all worked just like it was my own instance on my own box running in my own data centre.

I did have one problem, that I had also seen with the AWS instance. Sonar would frequently fail to respond for a few minutes. I thought there might not be enough memory for the droplet running Sonar (512MB) or the droplet running MySQL (which already had 1GB). Increasing the memory of the Sonar droplet to 1GB was incredibly easy. I shut it down, went into the droplet configuration, upped the memory and restarted. The problem went away.

It became apparent that a JIRA instance would be really helpful for running Norfolk Developers, The Norfolk Tech Journal and a few other projects. JIRA hosting is from $10 a month. If you have your own hardware its $10 a year, if not free. So I went back to Digital Ocean and set up a new droplet with 2GB of RAM, installed JIRA and pointed it at the existing MySQL database. All without a hitch.

I now have six droplets running on Digital Ocean and haven’t had a problem with any of them. The bill for the first month came to the measly sum of $16 (a little over £10). I have all the flexibility I need with very little complexity at an affordable price. Digital Ocean is a simple service, you don’t get all the fancy tools that you have with AWS, but if you have straight forward needs and/or are just starting out I would recommend you start with Digital Ocean.

Words: Paul Grenyer


2 thoughts on “Diving into the Digital Ocean

  1. Paul Russell

    It’s not the first time I’ve heard people say this about VPS hosts like Digital Ocean and Linode et al. Largely, I agree. If what you need is low cost hosting of reasonably isolated services like JIRA/Jenkins etc, then this is a pretty cost efficient way of doing it.

    Where I suspect they lose out is on larger scale deployments. I wouldn’t try hosting Netflix on Digital Ocean for example. Two key reasons: 1) features like virtual private network subnets become essential at scale, as does being able to start and stop servers at will (saving money in the process), 2) Scale. Last time I checked, AWS had five times the number of servers deployed as the rest of the cloud market combined. I think this came from a Gartner report, but I don’t have it handy…

    None the less, I think it’s awesome that such low cost options are available.

  2. Adam

    I agree It is nice I’ve not tried it at scale yet only lightweight stuff but if you think £3.10 or $5 is pretty good for the amount of control you get. Comparable in cost to shared hosting but much more control. Its nice to know it will cost X$ as well, its predictable. First thing I did on Amazon I wasn’t sure how much it would be. I was checking back frequently 🙂 but in end it was not that much.

    It does seem simpler they are selling bare vm machines not a range of interlocking services like amazon. The forums and docs on digital ocean seem pretty good to. Most of the issues I had someone else had already asked and I could find answers. I’m probably not doing things at the scale that @Paul Russell works at, Horses for courses and all that.


Write a Reply or Comment

Your email address will not be published. Required fields are marked *

    Keep up to date by email

    Sign-up to receive regular updates on all of our content and site activities.