Sunbird RC (Registry & Credential)
  • Learn
    • Introduction
    • Sunbird RC Overview
      • Why do we need Sunbird RC?
      • Core Capabilities
      • Core Registry Verbs
      • Workflows
      • What Sunbird RC is and what it's not? (WIP)
      • Possibilities
      • Demo Links
    • Technical Overview
      • High level architecture
      • Technical Specification Draft
      • Tech Stack and Requirements
    • Adopters
    • Roadmap
  • Use
    • Getting started
      • Pre-requisites
      • Installation Guide
        • Registry CLI
          • Setup A Registry Instance
        • Manual installation through docker-compose
        • Production setup through Helm
    • Developer's Guide
      • Configurations
        • Frontend Configurations
        • Frontend - Proxy configuration
        • Audit Configuration
        • Notifications Configuration
        • View Templates Configuration
      • Schema Setup
        • Introduction To Schemas
        • Creating Your Own Schemas
        • Schema Configuration
        • Create Schemas With Custom Password
      • Setup the Backend
      • Setup the Frontend
      • Backup and Restore
        • PostgreSQL
          • SQL Dump
          • File System Level Backup
          • Continuous Archiving and Point-in-Time Recovery (PITR)
        • Cassandra
          • Snapshot-based backup method
          • Incremental backup method
          • Data Restore
      • Generic Identity And Access Management
      • Metrics
      • Custom Keycloak Build
      • Custom QR Code design
      • VC Verification Module
    • Integrations
      • SSO with existing systems
      • Digilocker Meripehchaan SSO
      • Digilocker Integration
    • Release Notes
      • Latest Release - v1.0.0
    • Admin Portal
      • Login
      • Get Started
        • Create Schema
        • Attestation Workflows (WIP)
        • VC Template
          • Custom VC Template (WIP)
        • Ownership (WIP)
        • Publish (WIP)
      • Dashboard
  • API Reference
    • Registry
      • Using The APIs
      • Create An Entity
      • Invite An Entity
      • Generate token
      • Generate admin token
      • Get An Entity
      • Get An Entity By Id
      • Update An Entity
      • Create A Property Of An Entity
      • Update A Property Of An Entity
      • Revoke a Credential
      • Delete An Entity
    • Schema
      • Create Schema
      • Get Schema
      • Update Schema
      • Delete Schema
      • Publish A Schema
    • Attestation API
      • Raise An Attestation
      • Get Attestation Certificate
    • Claims API
      • Get All Claims
      • Get Claim by ID
      • Attest A Claim
    • Discovery API
      • Search An Entity
    • File Storage API
      • Upload A File
      • Get Uploaded File
      • Delete A File/ Multiple Files
    • Bulk Issuance API
      • Get Sample Template
      • Upload CSV
      • Get all uploaded Files
      • Download a Report File
    • Metrics APIs
      • Get Count
      • Get Aggregates
    • Other APIs
      • Sign API
      • Verify API
      • Swagger JSON API
      • Health API
  • Reference Solutions for Functional Registries
    • Education
      • Education Ecosystem
        • Installation
      • Education Registries
        • Installation
    • Health Registries
      • Organ Registries
        • Frontend Setup
        • Backend Setup
        • User Guide
      • Health Facility Registry
    • Govt to Person (G2P)
  • Reference Solution for Digital Credentials
    • Certificate Issuance
      • Installation(WIP)
      • User Guide
    • Vaccination Platform
    • Unified Learners Passport (ULP)
      • ULP Capabilities
      • Example Scenario
      • Technical Components (WIP)
      • Demo/Sandbox Links (WIP)
      • Installation Guide (WIP)
        • Frontend Setup
        • Installation through docker-compose
        • Dummy records setup for refrence
    • eLocker
      • High Level Diagram
      • Installation (WIP)
        • Frontend Setup E-locker
      • User Guide
    • Skills & Work Credentials
  • Links
    • Source Code
    • Releases & Changelogs
    • Website
    • Roadmap
    • Reference links
    • Design
  • Community
    • Discussion Forum
    • Contributors
    • Contributing
    • Contribution Guidebook
    • Code of Conduct
    • Community Events
    • Status By Track
  • HELP
    • Roadmap
    • FAQs
    • Glossary
    • Guide to Electronic Registries and Verifiable Credentials
      • Verifiable Credentials
        • What issues will Verifiable Credentials address?
        • What are the key roles in Verifiable Credentials?
        • What are the components of Verifiable Credentials?
        • What are the benefits of Verifiable Credentials?
        • Digital Credentials vs Verifiable Credentials
        • QR code vs Verifiable QR code
        • Use Cases
      • Electronic Registries
        • Evolution of Electronic Registries
        • What issues will Electronic Registries address?
        • Benefits of Electronic Registries
        • Registry vs Database
        • Design Principles
        • Use Cases
      • Leveraging Existing data stores
    • External Open Source Software Attributions
Powered by GitBook
On this page
  • Prerequisites
  • Terminal emulator
  • Git
  • Java
  • NodeJS (Only needed for the Registry CLI)
  • Docker
  • Docker Compose
  • Downloading The Source Code
  • Compiling The Registry
  • Configuring Schemas
  • Configure And Start Dependent Services
  • Configuring The Registry
  • Running The Registry

Was this helpful?

Edit on GitHub
  1. Use
  2. Getting started

Pre-requisites

PreviousGetting startedNextInstallation Guide

Last updated 1 year ago

Was this helpful?

Prerequisites

Terminal emulator

Linux and MacOS will have a terminal installed already. For Windows, it is recommended that you use git-bash, which you can install from .

Type echo Hi in the terminal once it is installed. If installed correctly, you should see Hi appear when you hit enter.

Git

Installation instructions for Git can be found .

Run git --version in the terminal to check if git has been installed correctly:

$ git --version
git version 2.33.0

Java

Installation instructions for Java 8 can be found .

Run java in the terminal to check if java has been installed correctly:

$ java
Usage: java [-options] class [args...]
...

NodeJS (Only needed for the Registry CLI)

Run node -v in the terminal to check if node has been installed correctly:

$ node -v
v16.11.0

Docker

Run docker -v in terminal to check if docker has been installed correctly:

$ docker -v
Docker version 20.10.9, build c2ea9bc90b

Docker Compose

Run docker-compose -v in terminal to check if docker-compose has been installed correctly:

$ docker-compose -v
Docker Compose version 2.0.1

Downloading The Source Code

Run the following in terminal to download the registry's source code:

$ git clone https://github.com/sunbird-rc/sunbird-rc-core.git sunbird-rc/core

Move into the folder by typing:

$ cd sunbird-rc/core

Compiling The Registry

Run the configure-dependencies.sh script in the root of the repo as follows:

$ sh configure-dependencies.sh

Then compile the registry (this will take some time when you are running it for the first time):

$ cd java
$ ./mvnw clean install -DskipTests
$ cd ..

This should create a JAR file in the java/registry/target folder.

Configuring Schemas

Create _schemas/ folder in java/registry/src/main/resources/public/

Place all your schema files in the java/registry/src/main/resources/public/_schemas/ folder.

Configure And Start Dependent Services

$ curl https://raw.githubusercontent.com/sunbird-rc/sunbird-rc-core/main/tools/cli/src/templates/examples/student-teacher/docker-compose.yaml > docker-compose.yml

To download a minimal keycloak configuration, run the following:

$ curl https://raw.githubusercontent.com/sunbird-rc/sunbird-rc-core/main/tools/cli/src/templates/examples/student-teacher/imports/realm-export.json > imports/realm-export.json

Then start Keycloak (kc), Postgres (db), Elastic Search (es) and the Claims Service (cs) by running the following command:

$ docker-compose up kc db es cs

Configuring The Registry

Before we can start the registry, we need to regenerate and retrieve the client secret for the admin-api client in Keycloak. To do that, follow these steps:

  • Go to http://localhost:8080/auth/admin/master/console/#/realms.

  • Login using the username admin and password admin.

  • Click Sunbird RC.

  • Click Clients in the panel on the left.

  • Click admin-api.

  • Click the Credentials tab.

  • Under Client Secret, click Regenerate Secret. Copy the secret that you see in the box and paste it in the docker-compose.yml file in place of INSERT_SECRET_HERE on line 42.

Running The Registry

Once you have completed all the above steps, run the registry using the following command:

$ java -jar java/registry/target/registry.jar

Installation instructions for NodeJS can be found .

Installation instructions for Docker can be found .

Installation instructions can be found .

A sample set of schemas for a simple student-teacher registry can be found . You can learn how to write your own schemas by following .

Run the following in terminal to download Docker Compose file:

here
here
here
here
here
here
here
this guide
this