How to Setup Bugzilla Issue Tracker on Azure/AWS/GCP

Setup and install Bugzilla bug/issue tracker in the cloud.  This self hosted bug tracking solution enables users to stay connected with their clients or employees, to communicate about problems effectively throughout the software development life cycle.  Bugzilla is an open source project that is a web based bug tracker and testing tool. It allows you to keep track of outstanding bugs, problems, issues and enhancement, often used by software development teams to manage their software devopment projects. 

 

Deploy using the image available in the cloud marketplaces below. Comes pre configured with the required Perl modules, Apache Web Server and MySQL/MariaDB database.

Setup Bugzilla on AWS

Launching soon..

Setup Bugzilla on Google GCP

Launching soon..

Getting Started with Bugzilla

Once your Bugzilla server has been deployed, the following links explain how to connect to a Linux VM:

 

 

Once connected and logged in, the following section explains how to start using Bugzilla.

Bugzilla uses Apache Web Server and MariaDB Server for Linux which are pre installed in this image. The following steps will explain how to get Bugzilla setup.

 

1.) Create Database and User

2.) Configure Bugzilla Database Connection

3.) Create Bugzilla Apache Site

4.) Testing the Bugzilla Installation

5) Login to Bugzilla web dashboard

Create the Bugzilla Database and Database User

From your ssh terminal we need to first run the MariaDB inital security script to disable remote root logins, remove anonymous users and test databases.  Run the following command:

				
					sudo mysql_secure_installation
				
			

Next we need to login to mysql and create a database that will be used by Bugzilla and create a user.

				
					sudo mysql
				
			

Replace the following database name, user and password if you would like to change the defaults:

				
					CREATE DATABASE bugzilla;
CREATE USER 'bugadmin'@'localhost' identified by 'changeme';
GRANT ALL ON bugzilla.* TO 'bugadmin'@'localhost' WITH GRANT OPTION;
				
			

Reload privileges table and exit the database:

				
					FLUSH PRIVILEGES;
exit;
				
			

Then restart MariaDB

				
					sudo systemctl restart mariadb
				
			

Configure Bugzilla Database Connection

Once you have created the Bugzilla MySQL/MariaDB database were now ready configure the database connection details.

 

First we need to run the checksetup.pl bugzilla script

				
					cd /var/www/html/bugzilla
sudo ./checksetup.pl
				
			

You should see errors about editing the ./localconfig file, which we will do next

bugzilla-config

Now we need to open the /var/www/html/bugzilla/localconfig configuration file and update the database connection details as created above.

				
					sudo nano ./localconfig
				
			

Replace the database details with your database details as we created earlier:

				
					...
# The name of the group that your web server runs as. On Red Hat
# distributions, this is usually "apache". On Debian/Ubuntu, it is 
# usually "www-data".
$webservergroup = 'www-data';
...
# What SQL database to use.
$db_driver = 'mysql';

# The DNS name or IP address of the host that the database server runs on.
$db_host = 'localhost';

# The name of the database.
#$db_name = 'bugs';
$db_name = 'bugzilla';

# Who we connect to the database as.
#$db_user = 'bugs';
$db_user = 'bugadmin';

# Enter your database password here.
$db_pass = 'changeme';
...
# port for my database server."
$db_port = 0;
...
				
			

Save and exit the file.

Verify Bugzilla database and initialize DB schemas

Run the checksetup.pl Bugzilla script to verify the database connection, initialize several Bugzilla database schemas and create the required database tables and other configuration settings.

				
					sudo /var/www/html/bugzilla/checksetup.pl
				
			

Should see a similar output to the following:

				
					...
Reading ./localconfig...

OPTIONAL NOTE: If you want to be able to use the 'difference between two
patches' feature of Bugzilla (which requires the PatchReader Perl module
as well), you should install patchutils from:

Checking for            DBD-mysql (v4.001)    ok: found v4.050 
Checking for                MySQL (v5.0.15)   ok: found v5.5.5-10.5.8-MariaDB-1:10.5.8+maria~focal 

Adding new table bz_schema...
Initializing bz_schema...
Creating tables...
Converting attach_data maximum size to 100G...
Setting up choices for standard drop-down fields:
   priority bug_severity rep_platform op_sys resolution bug_status
Creating ./data directory...
Creating ./data/assets directory...
Creating ./data/attachments directory...
Creating ./data/db directory...
...
				
			

Once the Bugzilla database setup has completed, you are then asked to set the Bugzilla admin email, name and password.

				
					...
Looks like we don't have an administrator set up yet. Either this is
your first time using Bugzilla, or your administrator's privileges
might have accidentally been deleted.

Enter the e-mail address of the administrator: test1@cloudinfrastructureservices.co.uk
Enter the real name of the administrator: test1
Enter a password for the administrator account: 
Please retype the password to verify: 
test1@cloudinfrastructureservices.co.uk is now set up as an administrator.
Creating initial dummy product 'TestProduct'...

Now that you have installed Bugzilla, you should visit the 'Parameters'
page (linked in the footer of the Administrator account) to ensure it
is set up as you wish - this includes setting the 'urlbase' option to
the correct URL.
checksetup.pl complete.
				
			

Create Bugzilla Apache Site Configuration file

Now we need to create an Apache site configuration file in order to access Bugzilla web interface.

				
					sudo nano /etc/apache2/sites-available/bugzilla.conf
				
			

Update the Apache config with the following and change your site name under ServerName to yours

				
					<VirtualHost *:80>
ServerName cloudinfrastructureservices.co.uk
DocumentRoot /var/www/html/bugzilla/

<Directory /var/www/html/bugzilla/>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI
DirectoryIndex index.cgi
AllowOverride Limit FileInfo Indexes Options AuthConfig
</Directory>

ErrorLog /var/log/apache2/bugzilla.error_log
CustomLog /var/log/apache2/bugzilla.access_log common
</VirtualHost>
				
			

Save and exit the configuration file.

 

Reload Apache

				
					sudo systemctl reload apache2
				
			

Enable Bugzilla site.

				
					sudo a2ensite bugzilla.conf
				
			

Enable the required modules;

				
					sudo a2enmod headers env rewrite expires cgi
				
			
				
					sudo systemctl reload apache2
				
			

Now set the ownership of Bugzilla document root directory to the Apache user

				
					sudo chown -R www-data: /var/www/html/bugzilla/
				
			

Test the Apache systax:

				
					sudo apachectl -t
				
			

If no errors were returned, we can now restart the Apache service

				
					sudo systemctl restart apache2
				
			

Testing Bugzilla Installation

Once you’re done with the installation and setup of Bugzilla we can run the testserver.pl script to verify the installation and testing was successful. Its best to run this as the root user:

				
					sudo -i
				
			
				
					cd /var/www/html/bugzilla 
/var/www/html/bugzilla/testserver.pl <URL to this Bugzilla installation>
				
			

In my example i would put the following:

				
					/var/www/html/bugzilla/testserver.pl https://cloudinfrastructureservices.co.uk
				
			

And you should get the following output if it was successful:

				
					TEST-OK Webserver is running under group id in $webservergroup.
TEST-OK Got padlock picture.
TEST-OK Webserver is executing CGIs via mod_cgi.
TEST-OK Webserver is preventing fetch of https://cloudinfrastructureservices.co.uk/localconfig.
...
				
			

Logging into the Bugzilla Web Interface

Once you have confirmed the installation was successful, you can then access Bugzilla web interface via your url you’ve setup Bugzilla on.

 

Login using the administrator email and password you created above. You can create as many accounts as needed.

Bugzilla Login

Bugzilla Firewall Ports

Bugzilla uses the following ports:

 

  • TCP 80
  • TCP 443

 

 

If you are using any of the cloud security groups and need to change / add ports refer to the following guides:

 

To setup AWS firewall rules refer to – AWS Security Groups

To setup Azure firewall rules refer to – Azure Network Security Groups

To setup Google GCP firewall rules refer to – Creating GCP Firewalls

Bugzilla Documentation / Support

For further documentation and support refer to Bugzilla Documentation

 

Documentation Guides:

https://www.bugzilla.org/docs/

 

Bugzilla Support:

https://www.bugzilla.org/support/

 

Disclaimer: Bugzilla is licensed under Mozilla Public License 2.0. No warrantee of any kind, express or implied, is included with this software. Use at your risk.

Avatar for Andrew Fitzgerald
Andrew Fitzgerald

Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x