Skip to content

Developer Guide Zero to Build and Run

Ian Ibbotson edited this page Feb 24, 2016 · 4 revisions

Prerequisites

  • Java 8
  • Grails [Preferably installed using gvm install grails 2.3.11]
  • Local Elasticsearch
  • Local MySQL

Checking Out

git clone [email protected]:k-int/gokb-phase1.git

Minimum Viable Configuration

Config files

gokb uses a grails config file in ~/.grails/gokb-config.groovy, an example config follows

kuali.analytics.code="none"
grails.plugins.springsecurity.ui.forgotPassword.emailFrom='[email protected]'
grails.plugins.springsecurity.ui.register.emailFrom = '[email protected]'
grails.plugins.springsecurity.ui.forgotPassword.emailSubject = 'Test GoKB Forgotten Password'
logSql = true
formatSql = true
sysid='YOULocalTest'
gokb.es.cluster='elasticsearch'
serverUrl='https://localhost:8080/gokb'
project_dir="/home/ibbo/gokbProjectFiles"
baseUrl="https://localhost:8080/gokb"

Database Setup

The default dev DataSource accesses a local mysql database called gokb. The following statements can set up a mysql - these need to be run as the mysql root user - one time only operation

create database GoKB default charset utf8 default collate utf8_general_ci;
grant all on GoKB.* to 'k-int'@'localhost' identified by 'yourlocalpw';

Automated Tests

grails test-app

Running

grails run-app

Manual Testing

Default accounts

By default the test setup will create an admin account.

Loading some test data

Look in /testdata/ebooks at the file ebooks_ingest.sh for a script that will ingest a package of ebook titles into the system via the bulk load interface.