Posted in Software Engineering

Seting up bugzilla using docker

Step1: Git clone bugzilla

git clone https://github.com/mozilla-bteam/bmo.git

Step2: Build docker image

docker-compose build

Step3: Bring up docker image

docker-compose up

Step4: Connect to docker bugzilla instance

Here we need to create a new user ‘bugs’ with ALL privileges and password as ‘bugs’ on localhost for new database as ‘bugs’.

$docker exec -it bugzilla_bugzilla_1 su — bugzillaLast login: Mon May 29 21:11:59 UTC 2017
[bugzilla@1f5025cbfde5 ~]$ mysql -h localhost -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 70
Server version: 5.6.36 MySQL Community Server (GPL)Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>mysql> CREATE USER 'bugs'@'localhost' IDENTIFIED BY 'bugs';mysql> SELECT User FROM mysql.user;mysql> GRANT ALL PRIVILEGES ON *.* TO 'bugs'@'localhost' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)mysql> SHOW GRANTS FOR ‘bugs’@’localhost’;
+ — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — +
| Grants for bugs@localhost |
+ — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — +
| GRANT ALL PRIVILEGES ON *.* TO ‘bugs’@’localhost’ IDENTIFIED BY PASSWORD ‘*F6143BCA58806D14CD1C97998C6792405D8AE8AE’ WITH GRANT OPTION |
+ — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — +
1 row in set (0.00 sec)[bugzilla@1f5025cbfde5 bugzilla]$ mysql -h localhost -u bugs -D bugs -p
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -AWelcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 55
Server version: 5.6.36 MySQL Community Server (GPL)Copyright © 2000, 2017, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.mysql>

Step5: Now run ‘perl checksetup.pl’

[bugzilla@1f5025cbfde5 bugzilla]$ cd /home/bugzilla/devel/htdocs/bugzilla
[bugzilla@1f5025cbfde5 bugzilla]$ pwd
/home/bugzilla/devel/htdocs/bugzilla[bugzilla@1f5025cbfde5 bugzilla]$ perl checksetup.pl
.
.
.
.
.
.
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_status rep_platform resolution bug_severity op_sys
Creating ./data directory…
Creating ./data/assets directory…
Creating ./data/attachments directory…
Creating ./data/db directory…
Creating ./data/extensions directory…
Creating ./data/mining directory…
Creating ./data/webdot directory…
Creating ./graphs directory…
Creating ./skins/custom directory…
Creating ./data/extensions/additional…
Creating ./data/mailer.testfile…
Precompiling templates…done.
Fixing file permissions…
Initializing “Dependency Tree Changes” email_setting …
Initializing “Product/Component Changes” email_setting …
Marking closed bug statuses as such…
Creating default classification ‘Unclassified’…
Setting up foreign keys…
Setting up the default status workflow…
Creating default groups…
Setting up user preferences…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: deepak.shakya@gyana.space
Enter the login name the administrator will log in with: dshakya
Enter the real name of the administrator: Deepak Shakya
Enter a password for the administrator account:
Please retype the password to verify:
dshakya 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.

If no obvious errors in the above step, then bugzilla is ready to use.

You can open a browser and use the following address to connect to bugzilla

http://localhost:8080/bugzilla/

Bugzilla home page snapshot

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s