Install a fully functioning CI platform on the CenturyLink Cloud, hook it up to GitHub, and demonstrate full CI automation through the use of Docker and Drone.


  • A working email address. We will use
  • A CenturyLink Cloud server with Docker installed. See this tutorial for instructions on how to set this up.
  • A working GitHub account. We will be using the CenturyLinkCloudTutorials GitHub account in the following examples.

What is Continuous Integration?

It is the fairly modern practice of merging developer changes into a single trunk version several times a day. Additionally, most teams using a CI methodology hook in their QA systems to allow the automation of unit and integration tests. By designing the CI pipeline to invoke QA processes prior to merging the changes to the mainline trunk, an organization can effectively have a “gated trunk” whereby all of the changes have passed tests before being merged, thereby guaranteeing that the trunk version is always runnable. Drone is a CI platform that has tight integration with GitHub (public and Enterprise) and BitBucket, with more code repos to come, I am sure. It is based on Docker and container technologies and is available through a SaaS model (at or via open source that you install yourself (

Today we are going to install the open source Drone platform on the CenturyLink Cloud and demonstrate how easy it is to get going. To start, ensure the 3 pre-requisites (above) are in place. We will want to have 2 windows open at this time:

  1. A browser
  2. A terminal session to the cloud server that is running Docker.

Install Drone

From your terminal:

$ sudo wget $ sudo dpkg -i drone.deb

And that is how easy it is to install Drone on a Docker-based CenturyLink Cloud server.

Configure Drone

From your browser navigate to http://public IP/install. Drone, by default, is listening on port 80 (of of the default ports we opened when installing the Docker server). Follow the steps to create the admin user.

The second page will ask for a GitHub Client ID and secret. This has to be done from your GitHub account and is done by registering a new application. Open a second browser window, the link is here and it should look like:


Enter a name for the application (eg. “Drone”). Enter http://public IP for your server under “Homepage URL”.

An optional Application description can be entered. Set the “Callback URL” to http://public IP/auth/login/github. Push the button to register the application. In the upper right of the subsequent screen you will find the Client ID and Client Secret. Enter these into the original Drone install browser window.


Scroll to the bottom of the page and you will find settings for email notifications. This is super helpful in keeping track of the CI process flow, so take a few minutes to enter these and then press the “Save” button.

Linking your GitHub Repo with Drone

Look at the top of the page, see the “New Repository” button? Click this, and then the GitHub “Link Now” button on the next page. Press the “Authorize Application” button and the enter your GitHub name and repo. Parabéns! You have successfully installed and configured Drone and GitHub on the CenturyLink Cloud. You are ready to start adding code and feeling the power of build automation! Go Hello World Since our version of Ubuntu does not have the user ‘ubuntu’ we need to add it. This is (currently) required for Drone to execute correctly. Create a new user named 'ubuntu' by following these steps:

$ adduser ubuntu

At the prompt create a password for this user and then accept the default user information by pressing

ENTER at the prompts. In order to give ubuntu the correct privileges we must add the user to the sudoers file.

# Edit the sudoers file to add the new user $ /user/sbin/visudo

Add the new ubuntu user in the "User privilege specification" section.

# User privilege specification root ALL=(ALL:ALL) ALL ubuntu ALL=(ALL:ALL) ALL

Once the file has been successfully edited press

CTRL-x to exit the file; and Y to save the changes. The key thing to make Drone work with your GitHub repo is to add a .drone.yml file to your repo. This is the instruction manual to tell Drone what to do. We are going to build a simple Go application and our .drone.yml file looks like:

image: go1.2 env: - GOPATH==/var/cache/drone script: - go build - go test –v - go install services: - redis notify: email: recipients: -

Make sure when you commit this file it has the leading period. If you commit this file with no Go language files (as I just did) you will notice in your Drone browser window that a new file has been detected. Click on the commit number (eg. 1aaf85) and you can see that the commit has started. Why does it take so long (approx. 3 minutes for me) to complete, particularly since there is actually no application code to build? Since this is the first commit Drone is downloading and installing the base images (including Ubuntu) that the applications will run on. Go back to the README file, make a trivial change, and see how long the second commit takes. On my system it took less than a minute. Let’s add the Hello World application to the repo. Over at GitHub create a file called GoHello.go and add the following:

package main import "fmt" func main() { fmt.Printf("Hello Worldn") }

Once you are done, commit the file. Quick... look at your Drone browser to see that the CI server has detected the new file and is processing it. Click on the commit number and you should see something like this:


This shows a successful clone, build, test, and install CI pass! Now all you have to do is add some tests, rinse, and repeat!