🧒
Sunbird ED
new release -7.0.0 (Jun 2024)Askdot
Older versions
Older versions
  • Learn
    • Overview for Sunbird ED
    • Functional Capabilities
      • Learning Apps
      • Asset Sourcing
      • Organised Collections
      • Discover Content - Digital & Phygital
      • User Engagement
      • Rich and diverse content
      • Versatile Question Bank
      • Observability
      • Launch Course
      • Verifiable Credentials
      • Multi-Channel Chatbot
      • Targeted Programs
      • Manage Learn
        • Overview
        • What is an entity?
        • What is a Program?
        • What is a Project?
        • What is Observation?
        • What is a Survey?
        • What is Observation as a task inside a Project?
    • Product and Developer's Guide
      • Learning apps
        • Workflows
          • Onboarding of Users
          • Discovery of Content
          • Play content
          • Track progress and Earn credentials
          • Interacting / Collaborating
      • Asset Sourcing
      • Organised Collections
      • Discover Content - Digital & Phygital
      • User Engagement
      • Rich and Diverse Content
      • Versatile Question Bank
      • Observability
      • Launch Courses
      • Verifiable Credentials
      • Multi-Channel Chatbot
      • Targeted Programs
      • Manage Learn
        • Overview
        • Component Diagram
        • ML Core Service
        • ML Project Service
        • ML Survey Service
        • ML Report Service
        • ML Analytics Service
    • Adopters
      • DIKSHA
    • Technical Architecture
      • Design Principles
      • Technical Architecture Diagram
      • Tech Stack
    • Roadmap
  • USE
    • Deployment Diagram
    • Deployment Artifacts
      • 4.10
      • 4.10.1, 4.10.2, 4.10.3, & 5.0
    • Installing ED Platform
      • release-5.2.0
        • Prerequisites for your own Sunbird ED Instance
        • Infra Provisioning
        • Jenkins Setup
        • Ansible Variables
        • Build
        • Post Install Steps
      • release-5.1.0
        • Prerequisites for your own Sunbird ED Instance
        • Infra Provisioning
        • Jenkins Setup
        • Ansible Variables
        • Build
        • Post Install Steps
      • release-5.0.0
        • Prerequisites for your own Sunbird ED Instance
        • Infra Provisioning
        • Jenkins Setup
        • Ansible Variables
        • Build
        • Post Install Steps
      • release-4.10.0
        • Prerequisites for your own Sunbird ED Instance
        • Infra Provisioning
        • Jenkins Setup
        • Ansible Variables
        • Build
        • Post Install Steps
      • Sunbird ED Portal
      • Sunbird ED Mobile
      • Easy installer (Draft)
    • Updating Sunbird Releases
      • 5.1.0 to 5.2.0
      • 5.0.0 to 5.1.0
      • 4.10.1, 4.10.2, 4.10.3, & 5.0
    • Releases
      • Release calendars
        • Release Calendar 4.9, 4.10, 5.0
        • Release calendar 5.0.1, 5.0.2, 5.0.3, 5.1.0 (major), 5.1.1, 5.1.2, 5.1.3 &5.2.0 (major)
        • Release Calendar 6.0.0
        • Release Calendar 7.0.0
      • Planned items
        • 4.9, 4.9.1, & 4.10(major)
        • 4.10.1, 4.10.2, 4.10.3, & 5.0(major)
        • 5.0.1, 5.0.2, 5.0.3 & 5.1 (major)
      • Release notes
        • 5.2.0
          • Release-5.1.2
          • Release-5.1.1
        • 5.1.0
        • 5.0.0
        • 4.9.0, 4.9.1, 4.10.0
        • 4.7.0, 4.8.0
      • Release Artifacts
        • 5.0.1, 5.0.2, 5.0.3, & 5.1
        • 4.10.1, 4.10.2, 4.10.3, & 5.0
      • Demo of released items
    • Telemetry
      • Trackable Collection
    • Minimal forms
    • API's
    • Learn More
      • Dependencies
      • Specifications
        • SOFIE
        • SOFIE Implementation
  • Engage
    • Discuss
  • Contribute
    • Extend / Contribute to Sunbird
    • System Requirements
      • Learning Apps
    • Source Code
      • Architecture - Component Diagram
      • Developer Guide
        • Portal
          • Component Diagram
        • Desktop
          • Component Diagram
        • Mobile
          • Component Diagram
          • sunbird-mobile-sdk
          • Sunbird-mobile-app plugins
          • Configurations to setup mobile app
        • Form service
          • Component Diagram
          • Data model
          • API's
        • Manage Learn
          • ML Core Service
            • Overview
            • User Flow Diagram
            • Component Diagram
            • Data Model
            • Folder Structure
            • API's
            • Deployment Overview
            • Local Service Setup Guide
          • ML Project Service
            • Overview
            • User Flow Diagram
            • Component Diagram
            • Data Model
            • Folder Structure
            • API's
            • Deployment Overview
            • Local Service Setup Guide
          • ML Survey Service
            • Overview
            • User Flow Diagram
            • Component Diagram
            • Data Model
            • Folder Structure
            • API's
            • Deployment Overview
            • Local Service Setup Guide
          • ML Report Service
            • Overview
            • User Flow Diagram
            • Component Diagram
            • Data Model
            • Folder Structure
            • API's
            • Deployment Overview
            • Local Service Setup Guide
          • ML Analytics Service
            • Overview
            • Component Diagram
            • Data Model
            • Setup Guide
              • ENV Variables ( Config.ini)
            • Ingestions
            • Folder Structure
            • Report creation and Updation Scripts
            • Deployment Overview
        • UI (User interface) Sunbird-Ed portal
          • Angular Material
          • Component Style Guide Version 1
            • Accordion
            • Buttons
            • Cards
            • Forms
            • Grid & Layout
            • Labels
            • Modals
            • Pagination
            • Rating
            • Search Box
            • Select Box
            • Tables
            • Tabs
            • Toast messages
            • Tooltip
            • Typography
          • SB-Styles: A Comprehensive Design Resource
          • SB-Themes Repository: Unifying Design Across Platforms
            • Classical Theme in Sunbird-Ed portal
            • Joyful Theme in Sunbird-Ed portal:
      • Reference Apps
      • Platform
    • Install Locally
      • SunbirdED Mobile
      • SunbirdED Portal
    • Configuration
      • SunbirdEd Portal
      • Sunbird Mobile
    • Independent Libraries
      • Common Consumption Components
      • SunbirdEd Forms
      • Sunbird Client Services
      • Sunbird Styles
      • Sunbird Themes
      • Sunbird Tag Manager
    • Issue tracker/ Create Issue
    • Contribute to ED
  • Misc
    • Templates
      • Upgrade Sunbird release document
      • Release Notes
    • Archived
      • High Level Capabilities
      • Workflows
      • Where Sunbird ED helps you
      • ED - Mobile App (going to archive)
        • 4.10.3 to 5.0.0
        • 5.0.0 to 5.1.0
      • Setting up Sunbird ED
      • Developer Documentation
      • API Reference Documentation
      • Detailed Documentation
      • Source Code
      • Actors & Actions
      • Detailed Capabilities
      • Data
      • Terminology
      • 5.1.0-hotfix (OCI )
  • Development Resources
    • Misc Pages
      • Portal - Manage Learn - Reports
      • App - Manage Learn - component diagram
        • Projects
        • Observation & Survey
        • Program
      • Portal - Manage Learn - component diagram
      • Mobile form configurations
      • Content Indexing Flow
      • What are multiple databases used for
      • Course completion, reports and certificate issue
      • How to access Flink UI
      • What are all the flink jobs for
      • How does data flow into Druid
      • Minimal build properties
  • Page 1
Powered by GitBook
On this page
  • Pre-requisites
  • Clone the service repository onto your system
  • Create .env file
  • Install Dependencies
  • Setting the keycloak
  • Setup Database
  1. Contribute
  2. Source Code
  3. Developer Guide
  4. Manage Learn
  5. ML Core Service

Local Service Setup Guide

Last updated 1 year ago

Pre-requisites

  • All resources under Introduction to Manage Learn Category

  • NodeJS - v12

  • MongoDB - v4.4.0

  • Basics of Cloud Storage

  • Basics of Kafka

Clone the service repository onto your system

Create a new folder where you want to clone the repository.

  • Navigate to that directory using the terminal.

  • Execute the git commands to clone the repository using the provided link from the code tab.

Git link

https://github.com/shikshalokam/ml-core-service.git

command to clone

git clone https://github.com/shikshalokam/ml-core-service.git

Create .env file

Create a file named .env and copy the environment-specific data corresponding to that service into the .env file.

# Environment configurations file
APPLICATION_PORT = "3000"                                                       // Application port number
APPLICATION_ENV = "development"                                                 // Application running enviornment 

# Mongo DB Configuration
MONGODB_URL = "mongodb://localhost:27017/sl-prod"                               // Mongo DB URL

INTERNAL_ACCESS_TOKEN = "Fg*************yr"                                     // Internal access token for accessing Internal services APIs

#Cloud Storage Configuration
CLOUD_STORAGE = "AWS/GC/AZURE"                                                  // Cloud storage provider.

# Google Cloud Configuration
GCP_PATH = "./generics/helpers/credentials/storage.json"                        // Path to the the Google cloud authentication key
GCP_BUCKET_NAME = "gcp bucket name"                                             // Google cloud bucket name 

# Azure Cloud Configuration
AZURE_ACCOUNT_NAME = "AZURE_KEY"                                                // Azure account name
AZURE_ACCOUNT_KEY = "Ih..............NBN"                                       // Azure account key
AZURE_STORAGE_CONTAINER = "Azure_bucket"                                        // Azure container/bucket name 

# AWS Cloud Configuration
AWS_ACCESS_KEY_ID = "AK...........WA"                                           // Aws cloud storage access key id
AWS_SECRET_ACCESS_KEY = "QB......................9sB"                           // Aws cloud storage access key 
AWS_BUCKET_NAME = "aws bucket name"                                             // Aws cloud storage bucket name
AWS_BUCKET_REGION = "ap-south-1"                                                // Aws cloud storgae region
AWS_BUCKET_ENDPOINT = "s3.ap-south-1.amazonaws.com"                             // Aws cloud storage api's endpoint

# OFFLINE TOKEN VALIDATION
KEYCLOAK_PUBLIC_KEY_PATH = "keycloak-public-keys"                               // Path to Offline token public key

# ML Survey Service
ML_SURVEY_SERVICE_URL = "http://ml-survey-service:3000"                         // ML Survey service url

# ML Project Service Service
ML_PROJECT_SERVICE_URL = "http://ml-project-service:3000"                            // ML Project service url

#USER service
USER_SERVICE_URL = "http://user-service:3000"                                   // Base url of the sunbird enviornment

CSV_REPORTS_PATH = "public/report"                                              // Report path

APP_PORTAL_BASE_URL = "https://dev.sunbirded.org"

FORM_SERVICE_URL = "http://player:3000"                                         // Base url for form search

# Oracle Cloud Configuration                                                    
OCI_ACCESS_KEY_ID = '23b90..............d01d'                                   // Oracle cloud storage access key Id
OCI_SECRET_ACCESS_KEY = '22levMw5Ci............SmNE='                           // Oracle cloud storage secret access key 
OCI_BUCKET_NAME = 'oracle cloud bucket name'                                    // Oracle cloud bucket name
OCI_BUCKET_REGION = 'ap-hyderabad-1'                                            // Oracle cloud bucket region
OCI_BUCKET_ENDPOINT = 'https://pmt5.compat.storage.ap-h1.oraclecloud.com'       // Oracle cloud bucket endPoint 

# KAFKA Configurations
KAFKA_COMMUNICATIONS_ON_OFF = "ON/OFF"                                               // Kafka enable or disable communication flag
KAFKA_URL = "100.0.0.1:9092"                                                 // IP address of kafka server with port without HTTP
KAFKA_GROUP_ID = "mlcore"                                                       // Kafka group id 
PROGRAM_USERS_JOINED_TOPIC = "dev.programuser.info"                              // Kafka submission topic for pushing program joined user's data

TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC = +05:30                           //Time zone diffrenece between local and UTC

Install Dependencies

To install dependencies from a package.json file in Visual Studio Code, you can use the integrated terminal. Here are the steps:

  • Open the integrated terminal by going to View > Terminal or using the shortcut Ctrl+` (backtick).

  • In the terminal, navigate to the directory where the package.json file is located.

  • Run the command npm install or yarn install, depending on your preferred package manager.

  • The package manager will read the package.json file and install all the dependencies specified in it.

  • Wait for the installation process to complete. You should see progress indicators or a success message for each installed dependency.

  • Once the installation is finished, the dependencies listed in the package.json file will be installed in a node_modules directory in your project.

Setting the keycloak

  • Create a folder on service directory named: keycloak-public-keys

  • Inside that folder create a file GRxxx....................xxxxx60fA

for keycloak file please contact Backend Team

Setup Database

Before proceeding with these steps, ensure that you have MongoDB installed on your computer. For a graphical user interface (GUI) for MongoDB, you can choose to install Robo 3T.

  • Obtain the latest database dump from the backend team.

  • Restore the database in your local environment using the following command:

    For Windows/Linux: mongorestore <name you want to give the db> <directory or file to restore>

    For macOS: mongorestore -d <name you want to give the db> <directory or file to restore>

Note: Add <name you want to give the db> to mongoDB url in .env file.

GitHub - shikshalokam/ml-core-serviceGitHub
Logo