SHARE
TWEET

Untitled

a guest Jun 14th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. #store ip
  4. export nodeManagerIp=999.999.99.999
  5.  
  6. #install tools
  7. sudo apt-get update
  8. sudo apt-get --assume-yes install sshpass
  9. sudo apt-get --assume-yes install openjdk-11-jre-headless
  10.  
  11. #add node manager to known hosts
  12. ssh-keyscan $nodeManagerIp >> ~/.ssh/known_hosts
  13.  
  14. #get resources
  15. sshpass -p 'thePassword' scp root@$nodeManagerIp:/opt/* /opt/
  16.  
  17. ##start server##
  18. #as many threads as cores
  19. threads=$(cat /proc/cpuinfo | grep processor | wc -l)
  20. #start server
  21. java -cp app-1.0.0-SNAPSHOT-jar-with-dependencies.jar de.wipj.application.Server threads=$threads
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top