josephxsxn

platform-config.sh

Aug 23rd, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.86 KB | None | 0 0
  1. #/bin/bash
  2. #run regen command on all servers
  3. ###PDSH
  4. export PDSH_RCMD_TYPE=ssh
  5. export WCOLL=~/cluster/cluster_shortnames.txt
  6.  
  7. #################
  8. #on all servers install - jdk8, python, disable thp, nsswitch config, disable ipv6
  9.  
  10. pdsh 'sudo apt-get install -y openjdk-8-jdk python libmysql-java'
  11.  
  12. #THP & IPv6
  13. pdsh 'echo "#!/bin/sh
  14. if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
  15.  echo never > /sys/kernel/mm/transparent_hugepage/enabled
  16. fi
  17.  
  18. if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
  19.   echo never > /sys/kernel/mm/transparent_hugepage/defrag
  20. fi
  21. sysctl -w net.ipv6.conf.all.disable_ipv6=1
  22. exit 0" > /tmp/rc.local'
  23.  
  24. pdsh sudo cp /tmp/rc.local /etc/rc.local
  25.  
  26. #nsswitch fix hosts files do 127.0.1.1 doesnt point to FQDN
  27. pdsh 'echo "
  28. passwd:         compat
  29. group:          compat
  30. shadow:         compat
  31. gshadow:        files
  32.  
  33. hosts:          dns files
  34. networks:       files
  35.  
  36. protocols:      db files
  37. services:       db files
  38. ethers:         db files
  39. rpc:            db files
  40.  
  41. netgroup:       nis
  42. " > /tmp/nsswitch.conf'
  43.  
  44. #pdsh sed 's/files dns/dns files/' /etc/nsswitch.conf > /tmp/nsswitch.conf
  45. pdsh sudo cp /tmp/nsswitch.conf /etc/nsswitch.conf
  46.  
  47. #ssh relays on the ssh_config settings to work with shortnames properly
  48. #MySQL Script
  49. ssh mysql1 'wget http://ad-cameron.aegisdoctrine.local/mysql56-install-basic.sh'
  50. ssh mysql1 'sudo bash mysql56-install-basic.sh'
  51.  
  52.  
  53. #KDC Script
  54.  
  55. #Ambari Script
  56. ssh master1 'wget http://ad-cameron.aegisdoctrine.local/ambariserver_install.sh'
  57. ssh master1 'sudo bash ambariserver_install.sh'
  58.  
  59. #Ambari Agents
  60. pdsh 'wget http://ad-cameron.aegisdoctrine.local/ambariagent_install.sh'
  61. pdsh 'sudo bash ambariagent_install.sh'
  62.  
  63. #ALL DONE
  64. pdsh sudo reboot
  65.  
  66. #blueprint
  67. ssh master1 'wget http://ad-cameron.aegisdoctrine.local/blueprint_installer.sh'
  68. ssh master1 'bash blueprint_installer.sh'
Add Comment
Please, Sign In to add comment