Need an expert to help you with
" How to Install Buildbot on Debian 9" ?
" How to Install Buildbot on Debian 9" ?
How to Install Buildbot on Debian 9Learning new things a new day! Here is our new tutorial “How to Install Buildbot on Debian 9″. before going into details Check out Our Best VPS Hosting and WordPress hosting for scaling your cloud-based applications and processes.
What is BuidlbotBuildbot is a continuous integration framework written in Python which automates the test, build, and release software cycles.
- It is built using the Twisted networking engine, supports parallel execution of jobs across several platforms, and runs on all major operating systems.
- The Buildbot installation can have one or more masters and multiple workers.
Install Buildbot on Debian 9In this tutorial, we are going to show you how to install Buildbot master and worker on Debian 9.
Update the SystemBefore we proceed with the guide, we are going to make sure the package index is updated and all system packages are up to date:
sudo apt-get update sudo apt-get upgrade
Installing BuildbotInstalling Buildbot with pip is very easy. If you don’t have pip installed on your Debian server, you can install pip and python development packages using the following command:
In order to upgrade pip to its latest version, be sure to run the command below:
sudo apt-get install python-pip python-dev
The output will look like the following:
sudo pip install --upgrade pip
Collecting pip Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB) 100% |################################| 1.3MB 82kB/s Installing collected packages: pip Found existing installation: pip 9.0.1 Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr Successfully installed pip-10.0.1After pip is installed and updated to the latest version, you may continue with the Buildbot installation. Buildbot can be installed like any other pip package. If you don’t have pip installed on your Debian server, you can install pip and python development packages with the command below:
Collecting pip Downloading https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (1.3MB) 100% |################################| 1.3MB 82kB/s Installing collected packages: pip Found existing installation: pip 9.0.1 Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr Successfully installed pip-10.0.1After pip is installed and updated to the latest you can continue with the Buildbot installation. Buildbot can be installed like any other pip package. Run the command below to install Buildbot with pip:
If the installation goes well, the output will look as it does below:
sudo pip install 'buildbot[bundle]'
Installing collected packages: txaio, autobahn, future, PyJWT, attrs, Automat, constantly, idna, hyperlink, incremental, zope.interface, Twisted, sqlalchemy, python-dateutil, MarkupSafe, Jinja2, pbr, sqlparse, decorator, Tempita, sqlalchemy-migrate, buildbot-console-view, buildbot-grid-view, buildbot-waterfall-view, buildbot-www, buildbot-worker, buildbot Found existing installation: idna 2.2 Uninstalling idna-2.2: Successfully uninstalled idna-2.2 Successfully installed Automat-0.6.0 Jinja2-2.10 MarkupSafe-1.0 PyJWT-1.6.1 Tempita-0.5.2 Twisted-18.4.0 attrs-18.1.0 autobahn-18.5.1 buildbot-1.1.2 buildbot-console-view-1.1.2 buildbot-grid-view-1.1.2 buildbot-waterfall-view-1.1.2 buildbot-worker-1.1.2 buildbot-www-1.1.2 constantly-15.1.0 decorator-4.3.0 future-0.16.0 hyperlink-18.0.0 idna-2.6 incremental-17.5.0 pbr-4.0.3 python-dateutil-2.7.3 sqlalchemy-1.2.7 sqlalchemy-migrate-0.11.0 sqlparse-0.2.4 txaio-2.10.0 zope.interface-4.5.0
Verify the Buildbot installationTo confirm whether Buildbot was installed correctly or not, run the command below, which should print the Buildbot version:
sudo buildbot --version
Buildbot version: 1.1.2 Twisted version: 18.4.0
Create a new system user for BuildbotIn order to create a new system user and group, which are going to run our Buildbot services, use the command below:
sudo adduser --home /opt/buildbot --shell /bin/bash buildbot
Configuring the Buildbot MasterSince we have Buildbot installed, we can proceed and create then configure our first Buildbot master. Before running the next few commands, be sure to switch to the new Buildbot user by typing:
To create the Buildbot master, type the following command:
sudo su - buildbot
The output will look like this:
buildbot create-master master
mkdir /opt/buildbot/master creating /opt/buildbot/master/master.cfg.sample creating database (sqlite:///state.sqlite) buildmaster configured in /opt/buildbot/masterCopy the default sample Buildbot configuration file by using the command below:
To be able to access Buildbot’s web interface on your server IP address or domain, you will have to edit the Buildbot configuration file and change the Buildbot URL settings. Open the configuration file:
cp master/master.cfg.sample master/master.cfg
c['buildbotURL'] = "http://your_ip_or_domain:8010/"Do not forget to change your_ip_or_domain to your server IP address or your actual domain. Execute the command below to confirm the master configuration:
If all is good, you will see the output below:
buildbot checkconfig master
Config file is good!To initiate the Buildbot master, run the following command:
If the server initiates successfully, you will see the output below: Following twistd.log until startup finished.. The buildmaster appears to have (re)started correctly. After the Buildbot master has restarted, you can access the web interface at: http://your_ip_or_domain:8010/
buildbot start master
Configuring a Buildbot WorkerWe will install and configure our first Buildbot worker on the same server as the master. To create the buildbot worker, called ‘test-worker’, with password ‘pass’ on ‘localhost’, run the command below:
The output should look something like this:
buildbot-worker create-worker worker localhost example-worker pass
mkdir /opt/buildbot/worker mkdir /opt/buildbot/worker/infoIf 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("example-worker", "pass")]Finally, to start the worker, type:
If there are no errors, you should see the following output: Following twistd.log until startup finished.. The buildbot-worker appears to have (re)started correctly. Finalize the Buildbot installation via web browser You can now navigate to http://your_ip_or_domain:8010/ and start configuring your Buildbot installation. Also, here are a few hand-picked guides that must read next:
buildbot-worker start worker
Updated on 04 Aug 2018
Add a comment