BMO/DeveloperBox

< BMO
Revision as of 03:00, 10 December 2013 by Dlawrence (talk | contribs)

Creating a BMO Development System using VirtualBox and Vagrant

Getting your system setup

Installing and running the BMO Vagrant box

  • Create following file called 'Vagrantfile' in a directory by itself.
 Vagrant.configure("2") do |config|
   config.vm.box = "bugzilla"
   config.vm.box_url = "https://people.mozilla.com/~dkl/bugzilla.box"
   config.vm.network :forwarded_port, guest: 80, host: 8080
 end
  • Execute the following in the directory where the 'Vagrantfile' is located. This will download the box and then start the VM.
 $ vagrant up
  • The following will log you into the VM over SSH and drop you into the 'vagrant' user's home directory.
$ vagrant ssh

Working with the latest BMO code in the VM

  • For starters you will need change your login password to a known value and also make yourself a Bugzilla admin (substitute your bmo address below).
 $ vagrant ssh
 $ cd ~/htdocs/bmo
 $ ./checksetup.pl --make-admin=<email> --reset-password=<email>
  • You should now be able to access the web UI at http://localhost:8080/bmo using your browser on the same system.
    • You may need to update the values for urlbase and sslbase in /home/vagrant/htdocs/bmo/data/params to match the port number you chose for redirection earlier. If the port is different than 8080.
 $ cd ~/htdocs/bmo
 $ bzr merge  (This will merge upstream changes into your local branch. There may be conflicts if you have made changes as well)
 $ bzr commit (commit the merged files to your branch)
  • Run the built in test suite located in the /home/vagrant/htdocs/bmo/t directory.
 $ perl runtests.pl
  • You can run just one of the tests in /t, for example to run the template compilation tests:
 perl t/004template.t
  • Making a patch for review of your latest changes
 $ cd ~/htdocs/bmo
 $ bzr diff > /vagrant/<some_patch_name>_1.patch
  • File any bugs or feature requests here