Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time

Open Educational Resources (OER) World Map

Travis CI

For inital background information about this project please refer to the Request for Proposals.

Setup project

Get Source

$ git clone

Create configuration

$ cp conf/application.example.conf conf/application.conf

Setup Elasticsearch

Download and install elasticsearch

$ cd third-party
$ wget
$ unzip
$ cd elasticsearch-6.2.1
$ bin/elasticsearch-plugin install analysis-icu
$ bin/elasticsearch

Check with curl -X GET http://localhost:9200/ if all is well.

Optionally, you may want to use the head plugin. This basically comes down to

$ cd .. # back to oerworldmap/third-party or choose any directory outside this project
$ git clone git://
$ cd elasticsearch-head
$ npm install
$ npm run start
$ open http://localhost:9100/

Configure elasticsearch

If you are in an environment where your instance of elasticsearch won't be the only one on the network, you might want to configure your cluster name to be different from the default elasticsearch. To do so, shut down elasticsearch and edit in third-party/elasticsearch-2.4.1/config/elasticsearch.yml and in conf/application.conf before restarting.

Create and configure oerworldmap index (as specified in in conf/application.conf)

$ curl -H "Content-type: application/json" -X PUT http://localhost:9200/oerworldmap/ -d @conf/index-config.json

If you're caught with some kind of buggy index during development, simply delete the index and re-create:

$ curl -X DELETE http://localhost:9200/oerworldmap/
$ curl -X PUT http://localhost:9200/oerworldmap/ -d @conf/index-config.json

Set up Keycloak

Download Keykloak 4.8.3:

$ curl | tar xvz
  • Add X-Forwarded-For and X-Forwarded-Proto headers to proxy vhost.conf
  • Modify standalone.xml file and add the proxy-address-forwarding="true" attribute to <http-listener> element under <server>

Create the admin user:

$ bin/ -u admin

Start the server:

$ bin/ -Dkeycloak.profile.feature.scripts=enabled
  • Create realm oerworldmap
  • Enable user registration, email as username, edit username, forgot password
  • Configure "account" client:
  • Configure Valid Redirect URIs
    • /auth/realms/oerworldmap/account/*
    • /oauth2callback
    • /.login
    • /resource/*
  • Configure Base URL in "account" client to /.login
  • For ReCaptcha support, configure Realm Security Defenses:
    • frame-src 'self'; frame-ancestors 'self'; object-src 'none';
  • Install & configure theme from
  • Configure default actions
  • Configure admin credentials in application.conf
  • Copy create profile script to registration flow
  • Copy create profile script to first-broker-login flow
  • Set up Mappers for profile_id and groups

Install mod_auth_openidc, if not on a supported system build from source:

$ git clone
$ cd mod_auth_openidc
$ ./
$ zypper in apache2-devel
$ zypper in libcurl-devel
$ wget
$ rpm -i jansson-2.10-1.el7.x86_64.rpm
$ wget
$ rpm -i jansson-devel-2.10-1.el7.x86_64.rpm
$ ln -s /lib64/ /usr/lib64/
$ wget
$ rpm -iv cjose-0.5.1-1.el7.centos.x86_64.rpm --nodeps
$ zypper in pcre-devel
$ ./configure --with-apxs2=/usr/bin/apxs2
$ make
$ make install
$ a2enmod auth_openidc

Finally, configure client secret in vhost.conf

Set up Apache

$ sudo apt-get install apache2 libapache2-mod-auth-openidc
$ sudo a2enmod proxy proxy_html proxy_http rewrite auth_openidc ssl headers

$ mkdir data/auth
$ cd data/auth
$ touch htpasswd htgroups htprofiles

Edit sudo visudo and add permission to the user

username  ALL = NOPASSWD: /usr/sbin/apache2ctl

Configure variables for conf/vhost.conf

Define PUBLIC_HOST oerworldmap.localhost
Define PUBLIC_EMAIL webmaster@oerworldmap.localhost
Define AUTH_DIR /home/fo/local/src/oerworldmap/data
Define API_HOST http://localhost:9000
Define UI_HOST http://localhost:3000
Define KIBANA_HOST http://localhost:5601
Define PAGES_HOST http://localhost:4000

Enable the site

$ sudo ln -s /home/username/oerworldmap/conf/vhost.conf /etc/apache2/sites-available/oerworldmap.conf
$ sudo a2ensite oerworldmap.conf
$ sudo apache2ctl graceful

Modify the path in data/permissions/.system

AuthUserFile /home/username/oerworldmap/data/auth/htpasswd
AuthGroupFile /home/username/oerworldmap/data/auth/htgroups

Set up the hostname in /etc/hosts	localhost oerworldmap.local

Create database histories

$ mkdir -p data/consents/objects
$ touch data/consents/history
$ mkdir -p data/commits/objects/
$ touch data/commits/history

Setup Play! Application

Download sbt, then

$ sbt run

Install UI

UI Components are available at

Running services

  • copy scripts/services/services.example.conf to scripts/services/services.conf and update vars
  • copy scripts/services/*.service to /etc/systemd/system and update EnvironmentFile, User and Group in each service
  • run sudo systemctl daemon-reload

Work with IDEs

Using activator, integration to Eclipse and IDEA IntelliJ is provided by running eclipse or idea from within activator. To run the OER World Map JUnit tests inside IntelliJ, it is necessary to set the test's working directory to the root directory of this project (i. e. oerworldmap):

Run | Edit configurations... | JUnit | <MyTest> | Configuration | Working directory:


Coding conventions

Indent blocks by two spaces and wrap lines at 100 characters. For more details, refer to the Google Java Style Guide.

Bug reports

Please file bugs as an issue labeled "Bug" here. Include browser information and screenshot(s) when applicable.


This product includes GeoLite2 data created by MaxMind, available from

You can’t perform that action at this time.