How To Install Buildbot on CentOS 7 Step by Step

Buildbot is a continuous integration tool based on Python which automates the build, test and release software cycles. It is built using the Twisted networking engine, supports parallel execution of jobs across multiple platforms and it is compatible with all major operating systems. In this tutorial we will learn how to Install Buildbot on CentOS 7 Step by Step.

Prerequisites

This tutorial assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step install Buildbot on CentOS 7 server.

Install Buildbot on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing Python.

First you need to install pip and python development packages using the yum package manager:

yum install epel-release
yum install python-pip gcc python-devel git
pip install --upgrade pip

Step 3. Installing Buildbot on CentOS 7.

Use the following command to install Buildbot with pip:

pip install 'buildbot[bundle]'

You can verify by checking the version of Buildbot:

buildbot --version

The output should:

Buildbot version: 1.1.1
Twisted version: 18.4.0

Next, create a new system user for Buildbot:

adduser --home /opt/buildbot --shell /bin/bash buildbot

Step 4. Configuring Buildbot Master.

First, create the Buildbot master run the following command:

su - buildbot
buildbot create-master master

Next, copy the default sample Buildbot configuration file by using the following command:

cp master/master.cfg.sample master/master.cfg

Then, configure Buildbot’s web interface:

### nano master/master.cfg
c['buildbotURL'] = "http://your_ip_or_domain:8010/"

Once you save the file run the following command to verify the master configuration:

buildbot checkconfig master

Step 5. Configuring Buildbot Worker.

To create the Buildbot worker named ‘wpcademy-worker’ with password ‘pass’ on ‘localhost’, execute the following command:

buildbot-worker create-worker worker localhost wpcademy-worker pass

If you want to use a different username (example-worker), and password (pass) you need to update the following line in the master/master.cfg file:

# a Worker object, specifying a unique worker name and password. The same
# worker name and password must be configured on the worker.
c['workers'] = [worker.Worker("wpcademy-worker", "pass")]

Finally we can start the worker by typing:

buildbot-worker start worker

Step 6. Accessing Buildbot.

Buildbot will be available on HTTP port 8010 by default. Open your favorite browser and navigate to http://yourdomain.com:8010 or http://server-ip:8010 and complete the required the steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed Buildbot. Thanks for using this tutorial for installing Buildbot on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Buildbot web site.

Leave a Reply