Advertisement
Guest User

Untitled

a guest
Jun 14th, 2019
212
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
Advertisement
RAW Paste Data Copied
Advertisement