Skip to content

Commit

Permalink
Add detailed debugging help in README
Browse files Browse the repository at this point in the history
  • Loading branch information
thewoolleyman committed Oct 20, 2010
1 parent 0852ff5 commit e78fe4a
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions README.markdown
Expand Up @@ -681,14 +681,21 @@ _Known Issues_
_Testing_
=========

CI
--

Continuous Integration for Boxbuilder is at [http://ci.pivotallabs.com:3333/builds/boxbuilder](http://ci.pivotallabs.com:3333/builds/boxbuilder)

Test Suite
----------

Boxbuilder has an integration test in test/boxbuilder_test which does the following:

* Runs boxbuilder\_remote\_build\_ami to create an AMI with the default
example configuration and chef repos
* Starts a new EC2 instance from the newly-built AMI
* Verifies the AMI was built correctly by performing assertions on the instance via SSH
* Repeats entire process for both Ubuntu and Centos (soon)
* Terminates/deletes all test resources (instance, AMI, and snapshot)

test/boxbuilder\_test requires the same variables to be set as does the 'boxbuilder\_remote\_build\_ami'
Expand All @@ -699,18 +706,39 @@ The test takes several minutes to run, because that is how long it takes boxbuil
to run. Be patient. The terminal will also be locked and prevent input while boxbuilder\_remote\_build\_ami
is running.

If you are hacking boxbuilder, and the test fails, try setting boxbuilder\_debug to true. This
Debugging
---------

**'boxbuilder\_debug'** - If you are hacking boxbuilder, and the test fails, try setting boxbuilder\_debug to true. This
will give a very verbose output to help you find the failure.

You can also use settings to do things like work on a topic branch of boxbuilder,
and disable automatic termination of EC2 instances, so you can inspect and manually
run any failing commands. Here's an example which does both:
**'boxbuilder\_branch'** - You can work on a topic branch of
boxbuilder ([this story](http://www.pivotaltracker.com/story/show/5156467) will eliminate the need
to use boxbuilder\_config):

export boxbuilder_terminate_ec2_resources=false && \
export boxbuilder_branch='centos' && \
export boxbuilder_config="export boxbuilder_branch='centos'" && \
test/boxbuilder_test

**'boxbuilder\_terminate\_ec2\_resources'** - You can disable automatic termination of EC2 instances, to inspect and manually
run any failing commands:

export boxbuilder_terminate_ec2_resources=false && \
test/boxbuilder_test

**'boxbuilder\_ami\_no\_password\_ssh\_debug\_access'** - This option opens a **GAPING SECURITY HOLE**
on your box, by allowing no-password ssh authentication to 'boxbuilder\_user'. However, it is very handy
if EC2 key-based ssh authentication is broken on your newly-built AMI:

export boxbuilder_ami_no_password_ssh_debug_access=false && \
test/boxbuilder_test

**'test\_ubuntu\_ami'** and **'test\_centos\_ami'** - These options allow you to enable or disable
tests for Ubuntu or Centos. Here's an example running Centos tests only::

export test_ubuntu_ami=false && export test_centos_ami=true && \
test/boxbuilder_test

----
 

Expand Down

0 comments on commit e78fe4a

Please sign in to comment.