❔
Sunbird inQuiry
  • LEARN
    • Overview
    • Capabilities
    • Components
    • Technical Architecture
    • Product & Developer Guide
      • Quick Starter Guide
        • inQuiry Components
          • Editor
          • Player
          • inQuiry Service
      • Question & Question Set Editor
        • Architecture
        • Features
        • Configuration
        • Source Code
        • APIs
        • FAQ's
      • Question & Question Set Service
        • Architecture
        • Features
        • Schema
          • Question Schema
          • QuestionSet Schema
        • APIs
          • V1
            • Question API's
              • Create Question
              • Read Question
              • Read Private Question
              • Update Question
              • Submit for Review Question
              • Publish Question
              • Retire Question
              • Question List
              • Import Question
              • Copy Question
              • Reject Question
            • QuestionSet API's
              • Create QuestionSet
              • Update QuestionSet
              • Read QuestionSet
              • Read Private QuestionSet
              • Review QuestionSet
              • Reject QuestionSet
              • Publish QuestionSet
              • Retire QuestionSet
              • Update Hierarchy QuestionSet
              • Read QuestionSet Hierarchy
              • Import QuestionSet
              • Copy QuestionSet
          • V2
            • Question API's
              • Create Question
              • Read Question
              • Read Private Question
              • Update Question
              • Submit for Review Question
              • Reject Question
              • Publish Question
              • Copy Question
              • Import Question
              • Question List
              • Retire Question
            • QuestionSet API's
              • Create QuestionSet
              • Read QuestionSet
              • Read Private QuestionSet
              • Update QuestionSet
              • Review QuestionSet
              • Reject QuestionSet
              • Publish QuestionSet
              • Update Hierarchy QuestionSet
              • Read QuestionSet Hierarchy
              • Import QuestionSet
              • Copy QuestionSet
              • Retire QuestionSet
        • Configuration
        • Source Code
        • FAQs
      • Question Set Player
        • Architecture
        • Configuration
        • Source Code
        • APIs
        • FAQ's
      • Analytics
      • Code Coverage Stats
    • 🚀Product Roadmap
  • ENGAGE
    • Discuss
  • Use
    • Overview
    • Developer Installation
      • Question & Question Set Service
        • Installation
        • Configuration
      • Question Set Editor
        • Installation
          • Object Category Definition
          • Sample Form Configuration
      • Question set Player
        • Installation
    • Release Plan & Calendar
      • Release calendar 5.2.0, 5.3.0, 5.4.0, 5.5.0, 5.6.0
      • Release calendar 5.7.0, 6.0.0,6.1.0 and 6.2.0
    • Release notes
      • inQuiry - Release v8.0.0 (Ongoing)
      • inQuiry - Release v7.0.0 (Latest)
      • inQuiry - Release v6.2.0
      • inQuiry - Release v6.1.0
      • inQuiry - Release v6.0.0
      • inQuiry - Release v5.7.0
      • inQuiry - Release v5.6.0
      • inQuiry - Release v5.5.0
      • inQuiry - Release v5.4.0
      • inQuiry - Release v5.3.0
      • inQuiry - Release v5.2.0
      • inQuiry - Release v5.1.0
      • inQuiry - Release v5.0.0
      • inQuiry - Release V 4.10.0
      • inQuiry - Release V 4.9.0
      • inQuiry - Release V 4.8.0
      • inQuiry - Release V 4.7.0
    • Deprecations
      • Release-5.6.0 (upcoming)
      • Release-5.5.0
    • Learn More
      • Dependencies
      • Delete User Functionality
        • User PII Cleanup
        • Asset Ownership Transfer
  • Guidelines or Best practices
    • Testing QA guidelines
    • Developer coding guidelines
  • Archived
    • Use Cases
    • Components
    • Server Installation
    • Capabilities
Powered by GitBook
On this page
  • Prerequisite
  • Installation Steps
  • Api Specification
  • Dependencies

Was this helpful?

Edit on GitHub
  1. Use
  2. Developer Installation
  3. Question & Question Set Service

Installation

This Page Explains Steps For Local Installation of Assessment Service

PreviousQuestion & Question Set ServiceNextConfiguration

Last updated 1 year ago

Was this helpful?

Prerequisite

Runtime Environment:

  • Java: Java 8 (for Neo4j & Cassandra)& Java 11 (for Service)

  • Scala: 2.11

Databases:

  • Neo4j : 3.3.0

By default, Neo4j requires authentication (user_name & password). Authentication should be disabled.

  • Apache Cassandra: 3.9

  • Redis: 4.0+

Build Tool:

  • Maven: 3.3.0+

Source Code Management Tool:

  • Git

Installation Steps

Step 1:

  • Create a directory with name inquiry-service and switch to the directory.

  • Question & QuestionSet Service uses knowlg-core module from Knowlg BB. So we need to clone two repo's inside folder created above

  • Clone the Repository () using the below command.

git clone https://github.com/Sunbird-Knowlg/knowledge-platform.git
  • Based on release version, Please checkout to specific tag for knowlg-core module. For Tag information, Please refer to Core Release Tag Section of Assessment Service under Release Notes.

git checkout <BRANCH-NAME/Tag>
git clone https://github.com/Sunbird-inQuiry/inquiry-api-service.git
  • Based on release version, Please checkout to specific branch or tag using below command

git checkout <BRANCH-NAME/Tag>

Step 2:

  • Navigate to inquiry-service/knowledge-platform folder and build knowlg-core module using below command

mvn clean install -DskipTests -Pknowlg-core
  • Navigate to the inquiry-service/inquiry-api-service folder and build the entire code base from the location

mvn clean install -DskipTests

  1. You need to build entire code base, if installing for first time.

  2. Assessment Service can be located in path (inquiry-api-service/assessment-api) and you can build the service only from 2nd time onwards.

Step 3:

  • Create Required Cassandra DB Schemas using cqlsh. Assessment Service Requires below Keyspaces and Tables:

Keyspace
Table

hierarchy_store

questionset_hierarchy

question_store

question_data

category_store

category_definition_data

  • To create above keyspaces and tables, Please use below scripts:

CREATE KEYSPACE IF NOT EXISTS hierarchy_store WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '1'
};

CREATE KEYSPACE IF NOT EXISTS question_store WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '1'
};

CREATE KEYSPACE IF NOT EXISTS category_store WITH replication = {
  'class': 'SimpleStrategy',
  'replication_factor': '1'
};


CREATE TABLE IF NOT EXISTS hierarchy_store.questionset_hierarchy (
  identifier text,
  hierarchy text,
  instructions text,
  outcomeDeclaration text,
  PRIMARY KEY (identifier)
);

CREATE TABLE IF NOT EXISTS question_store.question_data (
  identifier text,
  body blob,
  editorState text,
  answer blob,
  solutions text,
  instructions text,
  hints text,
  media text,
  responseDeclaration text,
  interactions text,
  PRIMARY KEY (identifier)
);

CREATE TABLE IF NOT EXISTS category_store.category_definition_data (
    identifier text PRIMARY KEY,
    forms map<text, text>,
    objectmetadata map<text, text>
);
  • For DB Schema/Script, You can also visit below link:

Step 4:

  • Create required Primary Category (e.g: Practice Question Set, Multiple Choice Question) & Its corresponding category definition using taxonomy-service.

  • Primary Category is a mandatory property for creating any object (Question, QuestionSet) using assessment-service. Sunbird has a set of predefined Primary Categories and its definitions. Users can also create their own Primary Category and its definition using taxonomy-service.

  • For Question & QuestionSet below Primary Categories can be used:

Primary Category
Target Object Type

Practice Question Set

QuestionSet

Curiosity Question Set

QuestionSet

Multiple Choice Question

Question

Subjective Question

Question

FTB Question

Question

  • Sunbird Primary Category Curls can be found here:

  • Sunbird Primary Category Definition Curls can be found here:

Step 5:

  • Modify the application configuration (inquiry-api-service/assessment-api/assessment-service/conf/application.conf) and do the maven build using maven command (mvn clean install -DskipTests) from assessment-service folder location.

Step 6:

  • Update Object Schema If Required. Object Level Schema is available under path inquiry-api-service/schemas

Step 7:

  • Run the service from assessment-service folder location using below command:

mvn play2:run
  • Above command will make service available at default port (9000) but won’t be initialised.

  • In order to initialize the service, we should make the 1st call to the service. For Example, health api can be invoked for the same.

  • Curl for Health API is as below

curl --location --request GET 'http://localhost:9000/health'
  • Now Service is Up and Running. You can try available endpoints.

  • Available endpoints can be checked in inquiry-api-service/assessment-api/assessment-service/conf/routes file.

  • To Run Service in Debug Mode, below command can be used

mvnDebug play2:run
  • Above command will make service available at default port (8000) but won’t be initialized. Service initialization starts when the remote debugger starts and gets connected at 8000 port.

  • Assessment Service depends upon an async job async-questionset-publish for completion of publish operation of the object.

  • For local setup and try out api’s, it's not mandatory to have this flink job because publish api just sends the event to the configured kafka topic and the backend job takes events from kafka topic and performs further operation in async mode. So even if the job is not available, publish api sends the event and returns 200 response.

  • async-questionset-publish code base is available in below repository.

Clone the Repository () using the below command.

is a micro-service from Knowlg BB.

For Configuration details, Please Refer to Page.

For Detailed Schema, Please Refer to Page.

Api Specification

API’s Specification is available

Dependencies

🏷️
🏷️
🏷️
🏷️
https://github.com/Sunbird-Knowlg/knowledge-platform.git
https://github.com/Sunbird-inQuiry/inquiry-api-service.git
taxonomy-service
Configuration
Schema
here
sunbird-learning-platform/data.cql.j2 at master · project-sunbird/sunbird-learning-platformGitHub
https://github.com/Sunbird-inQuiry/inquiry-api-service/blob/master/scripts/definition-scripts/master_category_create
https://github.com/Sunbird-inQuiry/inquiry-api-service/tree/master/scripts/definition-scripts
GitHub - Sunbird-inQuiry/data-pipelineGitHub
Logo
Logo