Skip to content

Installation

Anand Parthasarathy edited this page May 15, 2018 · 25 revisions

Step 1 - Configure environment variables for authentication

sunbird_sso_publickey = ******
sunbird_sso_realm=sunbird
sunbird_sso_url=https://dev.open-sunbird.org/auth/
sunbird_sso_username=******
sunbird_sso_password=******
sunbird_sso_client_id=admin-cli 

Step 2 - Installing the dependencies

git clone git@github.com:project-sunbird/open-saber.git
cd open-saber/java
mvn clean install

Step 3 - Configurations

3A: Out of the box = Teacher Registry

cd ..
./configure-dependencies.sh
mvn clean test

This should install default configuration, which will run a Teacher Registry on your machine. This step will also run the tests.

3B: Manual configuration (optional)

Edit the configuration files. Read the explanation of configuration in the section below. If you just want to try it out, then skip this section and come back to it later.

Step 4 - Running the Registry

All dependencies are now installed. A sample configuration file is also created and if you don't want to change anything, you may simply follow the following steps to start up an opensaber instance as a Teacher Registry.

cd java/registry
mvn clean install
docker-compose up

Step 5 - Taking Registry for a spin!

Understanding Configuration Files

Below mentioned configuration files should be created in src/main/resources. The script ./configure-dependencies.sh will create the files to startup a full fledged Teacher Registry, but you can edit these files to suit your domain. The sample files contain comments which further explain each property.

  1. application.yml - Create a YAML configuration file which contains various environment specific configurations for the application. The default profile will be development environment. The spring.profiles.active configuration needs to be changed to the environment where the application is deployed. Sample configuration details can be found application.yml.sample.

  2. validations.shex - This file should contain static and declarative validations. For further details on syntax, you can refer to the Shape Expressions Primer(Shex Primer). An example for the validations can be found validation.shex.sample.

  3. schema-configuration.jsonld - This file should contain schema level configurations. Further details can be found schema-configuration.jsonld.sample.

  4. frame.json - This file is useful to frame the JSONLD output so that all the facts are nested instead of being flatly presented. This helps in readability. frame.json.sample contains short-hand names, their namespaces and the the primary type used throughout the JSON-LD document that is issued into the registry.

Understanding the Vocabulary File

Create a domain specific vocabulary file for the application. Sample vocabulary file can be found vocabulary.owl.sample. This file should be placed in src/main/resources/vocabulary, so that it can be served as a static resource. This is useful for machine readability of your registry and also helps in understanding various terms being used in the vocabulary.

Clone this wiki locally