Browse Source

added aws user data

master
Sebastian Rieger 7 years ago
parent
commit
38b4fbc894
  1. 38
      VerteilteSysteme-Examples/src/verteiltesysteme/aws/user-data.txt

38
VerteilteSysteme-Examples/src/verteiltesysteme/aws/user-data.txt

@ -0,0 +1,38 @@
#!/bin/bash
VERTSYS_PATH="/home/ec2-user/verteilte-systeme-bsc-ai-examples/VerteilteSysteme-Examples/build/"
#JARS = "TCPServer.jar TCPServerMulti.jar UDPServer.jar UDPServerMulti.jar UDPTimeCounterServer.jar TCPPerfServer.jar"
JARS="TCPServer.jar TCPPerfServer.jar UDPServer.jar UDPTimeCounterServer.jar"
REPO="https://gogs.informatik.hs-fulda.de/srieger/verteilte-systeme-bsc-ai-examples.git"
echo "Installing packages..."
sudo yum update -y
sudo yum install -y java git
#rm -rf verteilte-systeme-bsc-ai-examples
if [ ! -d $VERTSYS_PATH ]; then
echo "Cloning repo..."
git clone $REPO
fi
# Example for path and contents:
#
#/home/ec2-user/verteilte-systeme-bsc-ai-examples/VerteilteSysteme-Examples/build/
#
#build-server-jars.xml TCPServerMulti.jar
#RMIEchoServer.jar UDPServer.jar
#RMIMandelbrotCalculationsServer.jar UDPServerMulti.jar
#TCPPerfServer.jar UDPTimeCounterServer.jar
#TCPServer.jar
killall screen
echo "Starting JARS: ${JARS}..."
for JAR in $JARS; do
echo "Starting ${JAR}..."
sudo screen -dmS $JAR java -jar $VERTSYS_PATH/$JAR
done
sleep 5
echo "Status:"
sudo netstat -taupen | grep 36[0,1][0-9][0-9]
sudo ps aux | grep java
Loading…
Cancel
Save