This repository contains files for the Accidental DBA tutorial. These files are required to perform the hands-on exercises. Importantly, there is significant setup required in order to do the hands-on exercises which needs to happen before the tutorial starts, so please read the below.
All steps through Vagrant Up should be completed before getting to the tutorial
- running Linux, OSX, or Windows XP or later
- 64-bit (32-bit may be possible, see below)
- at least 1GB of RAM, 2GB or more preferred
- 300MB free disk space
Software and Wetware:
- terminal program capable of ssh
- familiarity with the bash/linux command line
- familiarity with one or more command-line text editors
The Vagrant website has download packages, instructions on how to install and configure vagrant on various OSes, and a "getting started" guide. Please install and configure vagrant right away; this will take around an hour.
You will also need VirtualBox. The Vagrant website has instructions on installing VirtualBox as well
Install the tutorial exercises on your machine one of two ways:
Preferred Method: Git Checkout from the Github repo. The repository is here: https://github.com/pgexperts/accidentalDBA, and you can clone it by:
git clone https://github.com/pgexperts/accidentalDBA.git
Alternate Method: if you're not comfortable with git, download the tarball from:
This will require the programs "tar" and "gzip" to expand, as follows:
tar -p -xvf accidentalDBA.tgz
We apologize for not providing a "zip" formatted archive, but zip does not preserve file permissions, which would cause issues.
The accidentalDBA directory should be placed somewhere you have disk space available.
The first time you do vagrant up, it will require an internet connection with significant bandwidth and around 1/2 hour. As such, you should do it at home, before you get to the conference or the tutorial.
Open your terminal program. Navigate to accidentalDBA/vagrant directory. Type the following:
This will download the "precise64" box (VM), install a bunch of software on it, and start it up. Verify that you can log into it with:
Now log out with "exit". Shut down the VM, but leave it set up in preparation for the tutorial:
The exercises have not been tested on a 32-bit VM. However, it's quite possible that they will work that way. The way to switch to 32-bit is:
- open the file "VagrantFile" in a text editor
- change every instance of "precise64" to "precise32"
- run "vagrant up"
If it does not work on a 32-bit machine, please contact firstname.lastname@example.org.
According to one attendee, pgbadger does not install on the 32-bit version.
pgbadger is only used in one exercise, however.
The AccidentalDBA package also contains the following files in the Tutorial directory:
- accidental_dba_oscon.odt = Libreoffice presentation files
- accidental_dba_oscon.pdf = PDF presentation files
- exercises.txt = text file of exercises for the hands-on portion
The Accidental DBA tutorial is Copyright 2013 PostgreSQL Experts Inc.
All slides, text, instructions and similar content in this tutorial are licensed Creative Commons Attribution-ShareAlike 3.0
Code exercises and sample databases are licensed under the Gnu Public License Version 2
All other rights reserved.