ReferencePlatforms/Linux-Public

From MozillaWiki
Jump to: navigation, search

You can get the reference platform here: ftp://ftp.mozilla.org/pub/mozilla/VMs. If you are working on one of the community machines, we can also clone these scrubbed VMs onto community machines for you.

Using This VM as a Development Environment

By default, the reference platform only runs a console and a VNC server. If you want to use it for actual development you'll probably want to run X. Here's how to do it:

  • Disable the VNC server with this command:
  • chkconfig --level 2345 vncserver off
    
  • Change the default run level. As root, run:
  • sed -i -e 's/^id:[0-9]:initdefault:$/id:5:initdefault:/' /etc/inittab
    

Reboot, and you should be graphical! CentOS uses 'yum' as it's RPM front-end. You should be able to install most applications/tools you need through it. If you'd like a graphical front-end you can run 'pirut'.

Installing BuildBot

Because our Buildbot code changes fairly regularly we don't keep a copy of it on the VM.

export PYTHONPATH=".:/tools/zope-interface/lib/python2.5/site-packages/:/tools/twisted-core/lib/python2.5/site-packages:/tools/twisted/lib/python2.5/site-packages/:$PYTHONPATH"
export PYTHONHOME="/tools/python"
export PATH="/tools/python/bin:/tools/twisted/bin:/tools/twisted-core/bin:$PATH"
cd /tools
hg clone http://hg.mozilla.org/build/buildbot
cd /tools/buildbot
python setup.py install --prefix=/tools/buildbot
# buildbotcustom is only required if you're running a Buildbot master
cd /tools
mkdir buildbotcustom
cd buildbotcustom
hg clone http://hg.mozilla.org/build/buildbotcustom

Usernames and Passwords

By default, this image has two accounts:
(username)/(password)
root/root
cltbld/cltbld

Running under VirtualBox

  • Download the machine image as usual, and decompress it to $img
  • Import the $img/CentOS-5.0-ref-tools-vm.vmdk (hereafter "hda") and $img/CentOS-5.0-ref-tools-vm_1.vmdk (hereafter "hdb") disk images into your VirtualBox media manager
  • Create a new VirtualBox machine that has the disks "hda" and "hdb", in that order (IDE0 master and slave, respectively)
  • Edit the VirtualBox machine config to taste: recommendations include adding more RAM and VRAM. Be sure to restart the VirtualBox master process if you edit a machine config.
  • Here we de-VMWare the image. The "big difference" is that VMWare uses virtual SCSI devices while VirtualBox uses virtual IDE devices.
    1. su root [ see password below ]
    2. cd /etc
    3. mv vmware-tools bak.vmware-tools
    4. mv fstab bak.fstab
    5. cp fstab.BeforeVMWareToolsInstall fstab
    6. Append the line
/dev/hdb1  /builds/  ext3  defaults  1 2

to /etc/fstab, using your favorite text editor. Format to taste.

    1. Reboot (it's normal to see errors from VMWare during init, since it was mostly disabled)
    2. Your image works ...?

These steps can trigger an fsck of /dev/hdb1. This is useful and fast, let it happen.

If you want a graphical environment, be sure to change your runlevel as described above. When you first reboot into a graphical environment, X will fail to start because the xorg.conf is VMWare-specific. In the error dialogs that appear, choosing the option to let X "repair itself" will result in a usable 800x600 display.

Troubleshooting

  • Make sure you login as cltbld. root will not have the correct PATH and environment variables set.
  • You may get an error about "Stale Data" when running this VM in VMware Workstation for the first time. It can be safely ignored.
  • If vmware tools doesn't install/upgrade correctly, try running vmware-config-tools.pl as root.
  • Bridged Network does not seem to work when using that image in VMWare Server (1.0x), NAT seems to work fine
  • The /builds partition might not get added properly add this to /etc/fstab:
/dev/sdb1               /builds                 ext3    defaults        0 0