The Interface service building block enables ELEVATE capabilities such as Mentoring, Projects, and Survey to be easily deployed into existing platforms with no changes needed in the respective core services. In any deployment of ELEVATE capabilities, all the components i.e. backend micro-services and portal talk to each other via the Interface service only, hence any one of them can be replaced with other similar blocks making it easy to integrate these capabilities into existing implementations. Changes, if any are done in isolated npm packages specific to each installation thereby leaving the rest of the services untouched and out of the risk of any issues being introduced.
- Operating System: Ubuntu 22
- Node.js: v20
- Apache Kafka®: 3.5.0
Elevate interface-service 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.
Coming soon...
Local Service with local dependencies(Hardest)
Expectation: Run single service with existing local dependencies in host (Non-Docker Implementation).
Refer to the NodeSource distributions installation scripts for Node.js installation.
$ curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
$ sudo apt-get install build-essential
Refer to How To Set Up a Node.js Application for Production on Ubuntu 22.04.
Run the following command
$ sudo npm install pm2@latest -g
opt/backend$ git clone -b develop-2.5 --single-branch "https://github.com/ELEVATE-Project/interface-service.git"
backend/interface-service/src$ sudo npm i
interface-service/src$ sudo nano .env
APPLICATION_PORT=3569
API_DOC_URL= /interface/api-doc
APPLICATION_ENV= development
MENTORING_SERVICE_BASE_URL= http://localhost:3000
NOTIFICATION_SERVICE_BASE_URL= http://localhost:7201
REQUIRED_PACKAGES= "[email protected] [email protected] [email protected]"
SCHEDULER_SERVICE_BASE_URL= http://localhost:7401
SUPPORTED_HTTP_TYPES= "GET POST PUT PATCH DELETE"
USER_SERVICE_BASE_URL= http://localhost:3001
created_time= "2024-02-07T04:51:22.789813746Z"
custom_metadata= null
destroyed= false
version= 21
Navigate to the src folder of interface service and run pm2 start command:
interface-service/src$ pm2 start app.js -i 2 --name elevate-interface
$ pm2 ls
Output should look like this (Sample output, might slightly differ in your installation):
┌────┬─────────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼─────────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 1 │ elevate-interface │ default │ 1.0.0 │ cluster │ 79252 │ 2D │ 0 │ online │ 0% │ 79.2mb │ jenkins │ disabled │
│ 2 │ elevate-interface │ default │ 1.0.0 │ cluster │ 79262 │ 2D │ 0 │ online │ 0% │ 78.7mb │ jenkins │ disabled │
└────┴─────────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
This concludes the interface service and dependency setup.
Save and exit.
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, Project Service, Survey Service, User Service.
The frontend/mobile application for Mentoring repo and Projects and Survey repo
You can learn more about the full implementation of various capabilities of ELEVATE here .
Several open source dependencies that have aided Mentoring's development: