This project uses Intellij Idea IDE settings and configurations
- Redis: Install Docker, pull the redis image and run its container. It should be running on port
6379
. - ActiveMQ: Install Docker and run this command in powershell
docker run -p 61616:61616 -p 8161:8161 rmohr/activemq
or pull the image rmohr/activemq and run its conatiner using Docker Desktop. - PostgreSQL: Install PostgreSQL from here and make sure its server is running, then edit/create
postgres.conf
file with the next format and make sure you have cteated the database with the required insertion using postgresSQL
username = [database user-name]
database = [database name]
pass = [password]
host = [database host]
port = [postgresSQL port]
- You might need to run the file
all_insertions.pl6
to make the database insertions. - Edit
config.conf
file as follows
# config attributes
instance_user = [username of the host]
instance_host = [ip address]
instance_pass = [password]
main_host = [ip address of the main host that has the loadbalancer and controller]
- Edit
IPs.properties
file to include the info about the other hosts in the system in the following manner:
# config attributes
ip1= 123.123.123.123
user1=host1
password1=password1
ip2= 123.123.123.123
user2=host2
password2=password2
- You should have Maven installed. move to the directory of the project and run the command
mvn package
to create the jar file. - After that, open 5 shells and execute the following seven commands, each command in a shell. These commands are required to run the 4 micro-services and the Netty Main server.
java -jar target/TwitterBackend-1.0.jar user 1
java -jar target/TwitterBackend-1.0.jar tweet 1
java -jar target/TwitterBackend-1.0.jar dm 1
java -jar target/TwitterBackend-1.0.jar list 1
java -jar target/TwitterBackend-1.0.jar server 1
In case you need quick testing, you will find a file calledTest.java
in teNodeManager
package that will run these instances in seperate threads. - In another shell run the command
java -jar target/TwitterBackend-1.0.jar admin
to start the admin CLI. - In
controller
package, runEduMsgController.java
. This step must be done through intellij. - In
loadbalancer
package, runloadBalancerServer.java
. This step must be done through intellij. - Clone the front end repo and open it in a browser to interact with the website. However, configure the urls and port numbers so that it can communicate with the backend.