Project Milestone 1 - airavata-courses/ABC GitHub Wiki
Welcome to the ABC wiki!
You can access the app here http://149.165.169.38:3000/login
Initial concept (Napkin diagram):
Architecture:
- User will be able to create Tweets once logged in
- One will be able to search for other users and follow them
- Tweets will appear in the feed based on the users they follow.
- Current news trends will be displayed to user
These requirements are necessary for the whole set of micro-services to run
Mac:
1. MongoDB: brew install mongodb
2. Maven: brew install maven
3. Java: brew cask install java
4. MySql: brew install mysql
Debian:
1. MongoDB:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4
echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
2. Maven:
sudo apt install maven
3. Java:
sudo apt install openjdk-8-jdk
4. MySql:
sudo apt-get install mysql-server
Windows:
- MongoDB
- Download and Install MongoDB community server from https://www.mongodb.com/download-center/community
- Install MongoDB as a local service. Provide windows credentials.
- Maven
- Follow instruction on https://maven.apache.org/install.html to setup Maven
- Java
- Download and Install Java JDK from https://www.oracle.com/technetwork/java/javase/downloads/index.html
- MySQL server
- Install MySQL server if you don't have it already.
- Update config/connection.json with appropriate data (host, port, username, and password). You can find this file in the branch: develop-user-management-service
- Start MySQL server
- Create database with name=”node_mysql”
- Node.js
- Download and Install from https://nodejs.org/en/download/
- Uses: Java 8, Maven, MongoDB
- Run Strategy:
Once mongo is up and running create DB and required collections using:
git clone --single-branch --branch develop-feed-service https://github.com/airavata-courses/ABC.git cd ABC/
Mac:mongo feed-db --eval 'db.createCollection("tweets"); db.createCollection("tweetLikes");'
Debian:1. brew services start mongodb 2. cd ABC/FeedService 3. mvn package 4. java -jar ABC/FeedService/target/feedservice-*.jar
1. sudo service mongod start 2. cd ABC/FeedService 3. mvn package 4. java -jar ABC/FeedService/target/feedservice-*.jar
Note: If you get any error for * in step 4, navigate to ABC/FeedService/target/ and use the name ending with .jar
- Uses: Nodejs, MySQL
- Run Strategy:
- Start Apache and MySQL services and setup database as mentioned above.
- Then run following commands.
git clone --single-branch --branch develop-user-management-service https://github.com/airavata-courses/ABC.git cd ABC/ npm install npm start
-
You can run unit tests using
npm test
-
Note: In case if you're using dedicated MySql on any OS you'll need to change the port to 3306 in config/connection.js file
Following are the requirements for the News Service
- Python: 3.x
-
- Installing pip
- MacOS:
brew install pip
- Debain Linux:
sudo apt-get install python-pip
/sudo apt-get install python3-pip
(Python3.x) - RHEL Linux:
sudo yum install python-pip python-wheel
/sudo yum install python3 python3-wheel
(Python3.x) - Windows: pip comes pre-installed with Python 3.x
- MacOS:
- Installing pip
- Cloning Repo
- git clone --single-branch --branch develop-news-service https://github.com/airavata-courses/ABC.git
- cd ABC/
Steps to run the news service:
1. pip install virtualenv
2. python -m virtualenv flask_env
3. source flask_env/bin/activate
Windows : ./flask_env/Scripts/activate
4. pip install -r requirement.txt
5. export NEWS_API_KEY="<<API_KEY>>" (Please contact us for the key)
Windows : SET NEWS_API_KEY="<<API_KEY>>"
6. python news-application.py
Once you have all of the three services up and running, kindly proceed with the UI part.
Requirements:
- npm/node
Steps to start the UI:
- git clone --single-branch --branch develop-web-ui https://github.com/airavata-courses/ABC.git
- cd ABC/web-ui
- npm install
- npm start
NOTE: If you are deploying services on different machines, you may have to update web-ui/src/_constants/project.constants.js
with appropriate hostnames (no need to change the ports).
If you are stuck anywhere, please let us know. :)
Akash B. Sheth: [email protected]
Bhushan Malgaonkar: [email protected]
Chetan Patil: [email protected]