For demenstration : https://www.youtube.com/watch?v=Wd_fusG8-GI
git clone https://github.com/ridaghoul/LOG8415_Final_Project.git
- Ensure your AWS CLI credentials are added to the
~/.aws/credentials file
- In the
main.py
file, replace thedefault_subnet_id
with the subnet that has ip range of '172.31.16.0/20' - Replace the content of the
vockey.pem
with your private key, make sure to leave the name asvockey.pem
. in the main folder and inside the proxy_setup folder
To create the necessary infrastuctures for this solution, you can initiate the process by executing the script named python3 main.py
, this will create all the infrastructure needed for the project.
Copy the standalone_benchmark.sh to the standalone server using this command 'scp -i "vockey.pem" standalone_benchmark.sh ubuntu@"replace with the standalones public IP":/home/ubuntu'
To benchamrk the MySQL Standalone server, connect to the server "Standalone" as a root, and:
- run
cd /home/ubuntu
- run
chmod +x standalone_benchmark.sh
- run
./standalone_benchmark.sh
- run
cat standalone_results.txt
to see the results
Copy the master_setup folder to the master server using this command
scp -i "vockey.pem" -r master_setup ubuntu@"replace with the masters public IP":/home/ubuntu
- run
cd /home/ubuntu/master_setup
- run
chmod +x master_setup.sh
- run
chmod +x mysql_cluster_benchmark.sh
- run
./master_setup.sh
copy the slave_setup.sh to the slave1 slave2 and slave3 servers using this command
scp -i "vockey.pem" slave_setup.sh ubuntu@"replace with the salve (1, 2 or 3) public IP":/home/ubuntu
Connect to each slave server as root and:
- run
cd /home/ubuntu
- run
chmod +x slave_setup.sh
- run
./slave_setup.sh
Finaly, back on the master server:
run cd /home/ubuntu/master_setup
run ./mysql_cluster_benchmark.sh
run cat cluster_results.txt
to see the results`
copy the proxy_setup folder to the proxy server using this command
scp -i "vockey.pem" -r proxy_setup ubuntu@"replace with the proyxs public IP":/home/ubuntu
-
connect to master server as root
-
run
mysql -u root -p
-
run
CREATE USER 'root'@'ip-172-31-17-6.ec2.internal' IDENTIFIED BY 'root';
-
run
GRANT ALL PRIVILEGES ON *.* TO 'root'@'ip-172-31-17-6.ec2.internal';
-
run
FLUSH PRIVILEGES;
-
connect to the proxy server as root:
-
run
cd /home/ubuntu/proxy_setup
-
run
chmod +x proxy_setup.sh
-
run
./proxy_setup.sh
-
Run
python3 proxy.py
.
copy the gatekeeper_setup folder to the gatekeeper server using this command
scp -i "vockey.pem" -r gatekeeper_setup ubuntu@"replace with the gatekeepers public IP":/home/ubuntu
- connect to the gatekeeper server as root:
- run
cd /home/ubuntu/gatekeeper_setup
- run
chmod +x gatekeeper_setup.sh
- run
./gatekeeper_setup.sh
- Run
python3 gatekeeper.py
.