From aec4b6c4119af6cf8b05ab7f4c11b5574624f474 Mon Sep 17 00:00:00 2001 From: Joel Low Date: Wed, 13 Jan 2016 13:41:55 +0800 Subject: [PATCH] Define a Procfile for running the evaluator. --- .env | 3 +++ Procfile | 1 + README.md | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 .env create mode 100644 Procfile diff --git a/.env b/.env new file mode 100644 index 0000000..341ce43 --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +HOST=http://localhost:3000 +API_TOKEN=YOUR_TOKEN_HERE +API_USER_EMAIL=test@example.org diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..f489eec --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +evaluator: ruby bin/evaluator --host=$HOST --api-token=$API_TOKEN --api-user-email=$API_USER_EMAIL diff --git a/README.md b/README.md index 4ea4f6c..0f042b4 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,24 @@ [![Code Climate](https://codeclimate.com/github/Coursemology/evaluator-slave/badges/gpa.svg)](https://codeclimate.com/github/Coursemology/evaluator-slave) [![Coverage Status](https://coveralls.io/repos/Coursemology/evaluator-slave/badge.svg?branch=master&service=github)](https://coveralls.io/github/Coursemology/evaluator-slave?branch=master) [![Security](https://hakiri.io/github/Coursemology/evaluator-slave/master.svg)](https://hakiri.io/github/Coursemology/evaluator-slave/master) [![Inline docs](http://inch-ci.org/github/coursemology/evaluator-slave.svg?branch=master)](http://inch-ci.org/github/coursemology/evaluator-slave) This is the evaluator program which will query Coursemology for pending evaluation jobs. + +## Setting up the Evaluator Slave + +### System Requirements + +1. Ruby (>= 2.1.0) +2. Linux (tested on Ubuntu 14.04) + +### Getting Started + +1. Install the gem + + ```sh + $ gem install coursemology-evaluator + ``` + +2. Modify `.env` to suit your environment. Point to the host to your Coursemology instance, and + specify the API email and API key. + +3. Start the evaluator using the Procfile. You can use [foreman](https://github.com/ddollar/foreman) + or any similar tool to generate system scripts for boot.