Bootstrapping of BUx external grader environments for use with the BUx Grader Framework.
Provisioning is accomplished using Ansible.
In addition a Vagrantfile is provided for quick setup of local development VMs with Vagrant.
In order for the grader to start it must be able to succesfully connect to a running XQueue instance. If your course will be hosted on edx.org, contact your program manager to set up your course queue and obtain credentials. See the course author docs on external graders for more details.
For development purposes you might consider standing up your own edX platform using the edX configuration repository. See the Wiki page for installation options.
Clone this repository to your build machine and install the requirements.
Use of virtualenv
is highly recommended.
$ git clone git@github.com:bu-ist/bux-grader-configuration
$ cd bux-grader-configuration
$ pip install -r requirements.txt
The playbook uses roles which depend on the existence of a few variables.
grader_repos: https://github.com/your-grader-repository
grader_version: develop
grader_settings_module: settings
The grader
role will look for a top-level requirements.txt
file in your course repository, which it will use to populate a virtualenv
if found.
The grader_settings_module
variable should refer to a settings module that is importable by Python from your repository root.
For example, if your settings module is located in settings/production.py
, the grader_settings_module
should be set to settings.production
.
- VirtualBox (https://www.virtualbox.org/)
- Vagrant (http://www.vagrantup.com)
- vagrant-vbguest plugin (https://github.com/dotless-de/vagrant-vbguest) (Optional)
- vagrant-hostupdater plugin (https://github.com/cogitatio/vagrant-hostsupdater) (Optional)
- Add your grader-specific configuration vars to
playbooks/group_vars/vagrant
- Run
vagrant up
to install and boot the VM and start provisioning with Ansible
The first run will take a while -- consider grabbing a coffee or calling your grandmother.
Once it's completed, the grader should be up and polling xqueue inside the VM.
The VM will mount two shared folders for your development convenience:
- grader - /edx/app/grader/grader
- venv - /edx/app/grader/venv
- Add an inventory file to
playbooks/inventory
describing the remote system to be provisioned - Add your grader-specific configuration (see
playbooks/group_vars/all
for examples) - Provision with
ansible-playbook -i inventory/file grader.yml
# Check grader status
$ /edx/bin/supervisorctl status
# Start / stop grader
$ /edx/bin/supervisorctl start|stop bux-grader