How to setup Drone CI on a DigitalOcean droplet
There are countless continous integration continuous integration tools: Travis, Jenkins, Shippable, Circle, CodeShip, Wercker, etc.
The one I liked most is Drone, for a couple of reasons:
- free for public projects (like many others)
- you can host a CI on your own server with very little effort (as you will see)
- the documentation is really great
- it supports a large variety of languages
- plus the notification mails just look slick, imo (but maybe that's just me..)
DisclaimerTo follow along, you'll need:
- a DigitalOcean droplet
- a (sub)domain name (preferably)
You can skip the DNS setup if you don't own a domain and go straight to the section on how to configure drone.
Create a dropletIn your DigitalOcean panel create a basic droplet based on the latest version of Ubuntu. Give it a name and choose the size of your droplet depending on your needs (a 512MB one will suffice for small/medium projects). The credentials to access your droplet will be emailed to you.
Setup DNSTo setup the DNS go to your domain registrar and create an A record to point to your droplet's IP address. This can be either a subdomain or TLD, it doesn't matter. Like this:
Install drone following these steps:
wget http://downloads.drone.io/latest/drone.deb sudo dpkg -i drone.deb service drone start
Drone's backoffice will be served on port 80, so you can access it by simple typing in your Droplet's IP or the domain name you configured earlier.
The first thing you'll want to do, is create an admin user for your CI.
To do this, navigate to
http://[ci.example.com]/install and register your admin user.
In the backoffice you can configure Drone to connect to your Github, BitBucket, define the SMTP settings, as well as team members, etc.
Share on Twitter