The Classroom Continuous Build Butler
A continuous build server designed for the classroom. Uses the Amazon Simple Workflow Service to manage asynchronous builds. Results are stored in the filesystem.
Student repositories must be organized in the
config.student.repos directory under
<kind>/<proj>/<users>.git. In each repository,
hooks/post-receive should copy or symlink Didit's
The staff repository at
config.staff.repo must store build materials in the
config.staff.base directory, under
vagrant up should download, configure, and provision the VM. Use
vagrant ssh to log in. The
/vagrant directory gives the VM read/write access to the project.
config/aws.json with AWS authentication keys.
config/development.js with development settings.
node src/web: start the web front-end and build workflow decider
node src/worker: start a build worker
node src/builder <kind> <proj> <users> <rev>: run a build manually
In a student repository, simulate a push:
echo <oldrev> <newrev> refs/heads/master | GIT_DIR=. hooks/post-receive
<oldrev> can be
0000000, or use e.g.:
echo `git rev-parse HEAD^1 HEAD` refs/heads/master | GIT_DIR=. hooks/post-receive
To use AFS:
- Install packages:
sudo apt-get install krb5-user openafs-client openafs-krb5 module-assistant(for Athena: realm
- And the kernel module:
sudo m-a prepare,
sudo m-a auto-install openafs,
sudo modprobe openafs,
sudo service openafs-client restart
Didit relies on:
- AWS Simple Workflow Service to drive the build workflow. A workflow domain must be configured in the SWF console before running Didit.
- AWS Simple Email Service (optionally) to send emails. The sender DNS domain must be verified in the SES console before sending email.
To build virtual machine images, install Packer. On OS X, use
brew install homebrew/binary/packer.
bin/pack <rev> [opts] to build images using Packer:
--working, working-copy versions of tracked files will be packed
-only=openstackor similar to build only certain images
To manage OpenStack instances, install the OpenStack CLI. In the Vagrant VM, use
apt-get install python-pip,
pip install python-novaclient python-cinderclient. Then use
bin/openstack to run commands with credentials.
The script automates common operations, including
launch to start a new instance.
After starting a new instance, use
bin/productionize to copy configuration files from
- For a web front-end, use a production SSL certificate
- On AFS, use a production Kerberos keytab
didit.keytab(in CSAIL, obtain an AFS user and keytab from TIG)
On an instance, in
bin/daemon start src/web(or
src/monitor.js for a simple monitoring app designed for use on Heroku to send alerts via SES:
- Create an application and add the Heroku Scheduler add-on
- Set configuration variables:
RECIPIENTwill receive alert emails
- Then create a scheduled job with the command
- Amazon Simple Email Service
- Amazon Simple Workflow Service
- Apache Ant
- Bootstrap front-end framework
- Java security policy permissions and syntax