This is a set of Puppet scripts to automate the build of a web developer box on Ubuntu. You can install it on bare metal or virtual machine.
- Puppet 2.6.0 and later
- Ubuntu 11.10 Oneiric Ocelot Desktop (works on both 32-bit or 64-bit)
- Create VM and install Ubuntu 11.10 Oneiric Ocelot Desktop through the ISOs (downloadable at http://www.ubuntu.com).
- Whilst installing Ubuntu from the ISO, note down the username you used (or if you want to use the default for this Puppet script, it's
ubuntu
). - After booting into Ubuntu, install Guest Additions by going to the VirtualBox Device menu and selecting "Install Guest Additions".
- After installing Guest Additions, reboot.
- After the system has rebooted, open Terminal (Control + Alt + T).
- Run:
sudo apt-get update
sudo apt-get install git puppet -y
cd /etc
sudo chown -R root:ubuntu puppet
sudo chmod -R g+w puppet
find puppet -type d | xargs sudo chmod g+s
cd puppet
git clone http://github.com/khoomeister/puppet-devbox
cd puppet-devbox
mv * ..
mv .git* ..
cd ..
rmdir puppet-devbox
cd manifests
cp site-template.pp site.pp
gedit site.pp
- Read through the file & edit the settings to your liking (especially
$ubuntuUsername
if you used something other thanubuntu
), save & quit. - Run
sudo puppet apply site.pp
- Installs all the apps you need as a web developer
- Applies default settings to make life more fun as a developer (e.g. faster SSH connections, Git coloring, turns off Update Manager by default, etc.)
- LAMP stack uses mass virtual hosting to make setting up additional sites easier
- LAMP (Apache, MySQL & PHP)
- Once installed, phpMyAdmin can be accessed at http://myadmin.local/
- MySQL root password is set to
root
by default. - Also includes PEAR & PHPUnit
- nodejs + npm + coffee + expresso + lessc + uglifyjs
- Google Chrome
- Sublime Text
- Includes Puppet & CoffeeScript code coloring
- Other useful applications are included like ack-grep, alarm-clock-applet, filezilla, freemind, libreoffice, meld, octave & redshift.
If you don't like any of these applications, feel free to comment them out of the site.pp file.
There is a module called metacity-shortcuts
which does two things.
- It changes the Ubuntu run dialog box's shortcut from
Alt + F2
toWindows + Space
. I've found this much easier on the wrists for starting up applications. - For dual monitor setups (i.e. left & right, not up & down), it binds
Windows + S
to switch the active window to the opposite monitor and maximise it.- It requires one setting to be set though -
$dualMonitorsLeftMonitorWidth
which refers to the width of the left monitor. - If you're not using two monitors or you don't want to use this feature, set
$dualMonitorsLeftMonitorWidth
tofalse
insite.pp
.
- It requires one setting to be set though -
- Add
127.0.0.1 <hostname>.local
to/etc/hosts
. - Create directory
/var/www/<hostname>.local/public
. - Place files in the public directory.
- There is an alias called
pup
which is setup in~/.bashrc
to make it easy to call the site.pp file as needed (i.e.sudo puppet "/etc/puppet/manifests/site.pp"
).