The Mentoring building block enables effective mentoring interactions between mentors and mentees. The capability aims to create a transparent eco-system to learn, connect, solve, and share within communities.MentorED is an open source mentoring application that facilitates peer learning and professional development by creating a community of mentors and mentees.
Elevate scheduler services can be setup in local using two methods:
Dockerized service with local dependencies(Intermediate)
Expectation: Run single docker containerized service with existing local (in host) or remote dependencies.
-
Update dependency (Mongo v4.1.4, Kafka etc) IP addresses in .env with "host.docker.internal".
Eg:
#MongoDb Connectivity Url MONGODB_URL = mongodb://host.docker.internal:27017/elevate-scheduler #Kafka Host Server URL KAFKA_URL = host.docker.external:9092
-
Find host.docker.internal IP address and added it to mongod.conf file in host.
Eg: If host.docker.internal is 172.17.0.1, mongod.conf:
# network interfaces net: port: 27017 bindIp: "127.0.0.1,172.17.0.1"
Note: Steps to find host.docker.internal IP address & location of mongod.conf is operating system specific. Refer this for more information.
-
Build the docker image.
/ELEVATE/scheduler$ docker build -t elevate/scheduler:1.0 .
-
Run the docker container.
-
For Mac & Windows with docker v18.03+:
$ docker run --name user elevate/scheduler:1.0
-
For Linux:
$ docker run --name user --add-host=host.docker.internal:host-gateway elevate/scheduler:1.0`
Refer this for more information.
-
-
Update dependency (Mongo v4.1.4, Kafka etc) Ip addresses in .env with respective remote server IPs.
Eg:
#MongoDb Connectivity Url MONGODB_URL = mongodb://10.1.2.34:27017/elevate-scheduler #Kafka Host Server URL KAFKA_URL = 11.2.3.45:9092
-
Add Bind IP to mongod.conf in host:
Follow instructions given here.
Note: Instructions might differ based on MongoDB version and operating system.
-
Build the docker image.
/ELEVATE/scheduler$ docker build -t elevate/scheduler:1.0 .
-
Run the docker container.
$ docker run --name scheduler elevate/scheduler:1.0
Local Service with local dependencies(Hardest)
Expectation: Run single service with existing local dependencies in host (Non-Docker Implementation).
-
Install required tools & dependencies
Install any IDE (eg: VScode)
Install Nodejs: https://nodejs.org/en/download/
Install MongoDB: https://docs.mongodb.com/manual/installation/
Install Robo-3T: https://robomongo.org/
-
Clone the Scheduler service repository.
git clone https://github.com/ELEVATE-Project/scheduler.git
-
Add .env file to the project directory
Create a .env file in src directory of the project and copy these environment variables into it.
#Scheduler Service Config #Application Base url APPLICATION_BASE_URL = /scheduler/ # Kafka hosted server url KAFKA_URL = localhost:9092 # Kafka topic to push notification data NOTIFICATION_KAFKA_TOPIC = 'notificationtopic' # MONGODB_URL MONGODB_URL = mongodb://localhost:27017/tl-cron-rest # App running port APPLICATION_PORT = 4000 # Api doc url API_DOC_URL = '/api-doc'
-
Start MongoDB locally
Based on your host operating system and method used, start MongoDB.
-
Install Npm packages
ELEVATE/scheduler/src$ npm install
-
Start Scheduler server
``` ELEVATE/scheduler/src$ npm start ```
- Node - 16.0.0
- Kafka - 3.1.0
- Jest - 28.1.1
- MongoDB - 4.1.4
npm run test:integration
To know more about integration tests and their implementation refer to the project Wiki.
npm test
This project was built to be used with Mentoring Service and User Service.
The frontend/mobile application repo.
You can learn more about the full implementation of MentorEd here .
Several open source dependencies that have aided Mentoring's development: