Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #store ip
- export nodeManagerIp=999.999.99.999
- #install tools
- sudo apt-get update
- sudo apt-get --assume-yes install sshpass
- sudo apt-get --assume-yes install openjdk-11-jre-headless
- #add node manager to known hosts
- ssh-keyscan $nodeManagerIp >> ~/.ssh/known_hosts
- #get resources
- sshpass -p 'thePassword' scp root@$nodeManagerIp:/opt/* /opt/
- ##start server##
- #as many threads as cores
- threads=$(cat /proc/cpuinfo | grep processor | wc -l)
- #start server
- java -cp app-1.0.0-SNAPSHOT-jar-with-dependencies.jar de.wipj.application.Server threads=$threads
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement