-
Notifications
You must be signed in to change notification settings - Fork 4
Task Assignment1
This wiki is the main source of documentation for developers working with this project.
You can clone our project using the command below:
git clone https://github.com/airavata-courses/NSA.git
We will be using the following ports in our application. They are:
- 8081 : api-gateway
- 8082 : user-management
- 3000 : UI
- 9092 : Kafka broker
- 3036 : MySQL
- 27017 : MongoDB
For Kafka, we would need JDK. To install JDK on your system, you can refer here.
You would also need Docker and can be installed from Docker.
Start Kafka and Zookeper servers by running the command
docker-compose up -d
this should create a kafka broker listening on localhost:9092
Each micro service should run on a different terminal. This service data-retrieval is in python. Install python from here. Go to this folder using cd command.
cd data-retrieval
Then Execute
pip3 install -r ./requirements.txt
Then run
python3 dataretrieval.py
Open a different terminal to run this service. This service postprocessing is in python. Install python from here. Go to this folder using cd command.
cd postprocessing
Then Execute
pip3 install -r ./requirements.txt
You need to install pyart in a special way using the commands below:
python3 /pyart-master/setup.py build
python3 /pyart-master/setup.py install --user
Then run
python3 postprocessing.py
-
Install MongoDB from official website based on your OS https://docs.mongodb.com/manual/administration/install-community/
-
Once the setup is done, create database using command:
mongo>
use user_session_history
- To list if the database is created:
show dbs
-
Install Nodejs and npm package (can be installed from https://nodejs.org/en/ any version greater than 9. Follow the instructions to download nodejs and npm)
-
Go to session-management folder:
cd session-management
- And run the commands below:
npm install
npm install nodemon --save-dev
npm install uuid
npm start
Database Setup :
-
Install MYSQL database from here
-
Create database using the command below:
CREATE DATABASE newdb;
- Run the User-management-service jar file
java -jar user_management.jar
If you get an error saying access denied to [email protected] then execute the command below:
sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
-
Navigate to nwp_ui folder using cd.
-
Run the below commands
npm install --save-dev
npm start
- Go to the browser and hit
localhost:3000
Run the API-Gateway-Service jar file using the command below. It is in the root folder of our project.
api_gateway.jar