Linux and MacOS will have a terminal installed already. For Windows, it is recommended that you use
git-bash, which you can install from here.
echo Hiin the terminal once it is installed. If installed correctly, you should see
Hiappear when you hit enter.
git --versionin the terminal to check if
githas been installed correctly:
$ git --version
git version 2.33.0
javain the terminal to check if
javahas been installed correctly:
Usage: java [-options] class [args...]
node -vin the terminal to check if
nodehas been installed correctly:
$ node -v
docker -vin terminal to check if
dockerhas been installed correctly:
$ docker -v
Docker version 20.10.9, build c2ea9bc90b
docker-compose -vin terminal to check if
docker-composehas been installed correctly:
$ docker-compose -v
Docker Compose version 2.0.1
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
configure-dependencies.shscript 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
Place all your schema files in the
A sample set of schemas for a simple student-teacher registry can be found here. You can learn how to write your own schemas by following this guide.
$ 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 > import/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
Before we can start the registry, we need to regenerate and retrieve the client secret for the
admin-apiclient in Keycloak. To do that, follow these steps:
- Go to http://localhost:8080/auth/admin/master/console/#/realms.
- Login using the username
Clientsin the panel on the left.
- Click the
Client Secret, click
Regenerate Secret. Copy the secret that you see in the box and paste it in the
docker-compose.ymlfile in place of
INSERT_SECRET_HEREon line 42.
Once you have completed all the above steps, run the registry using the following command:
$ java -jar java/registry/target/registry.jar