Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/bin/bash
- #run regen command on all servers
- ###PDSH
- export PDSH_RCMD_TYPE=ssh
- export WCOLL=~/cluster/cluster_shortnames.txt
- #################
- #on all servers install - jdk8, python, disable thp, nsswitch config, disable ipv6
- pdsh 'sudo apt-get install -y openjdk-8-jdk python libmysql-java'
- #THP & IPv6
- pdsh 'echo "#!/bin/sh
- if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
- echo never > /sys/kernel/mm/transparent_hugepage/enabled
- fi
- if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
- echo never > /sys/kernel/mm/transparent_hugepage/defrag
- fi
- sysctl -w net.ipv6.conf.all.disable_ipv6=1
- exit 0" > /tmp/rc.local'
- pdsh sudo cp /tmp/rc.local /etc/rc.local
- #nsswitch fix hosts files do 127.0.1.1 doesnt point to FQDN
- pdsh 'echo "
- passwd: compat
- group: compat
- shadow: compat
- gshadow: files
- hosts: dns files
- networks: files
- protocols: db files
- services: db files
- ethers: db files
- rpc: db files
- netgroup: nis
- " > /tmp/nsswitch.conf'
- #pdsh sed 's/files dns/dns files/' /etc/nsswitch.conf > /tmp/nsswitch.conf
- pdsh sudo cp /tmp/nsswitch.conf /etc/nsswitch.conf
- #ssh relays on the ssh_config settings to work with shortnames properly
- #MySQL Script
- ssh mysql1 'wget http://ad-cameron.aegisdoctrine.local/mysql56-install-basic.sh'
- ssh mysql1 'sudo bash mysql56-install-basic.sh'
- #KDC Script
- #Ambari Script
- ssh master1 'wget http://ad-cameron.aegisdoctrine.local/ambariserver_install.sh'
- ssh master1 'sudo bash ambariserver_install.sh'
- #Ambari Agents
- pdsh 'wget http://ad-cameron.aegisdoctrine.local/ambariagent_install.sh'
- pdsh 'sudo bash ambariagent_install.sh'
- #ALL DONE
- pdsh sudo reboot
- #blueprint
- ssh master1 'wget http://ad-cameron.aegisdoctrine.local/blueprint_installer.sh'
- ssh master1 'bash blueprint_installer.sh'
Add Comment
Please, Sign In to add comment