Advertisement
cdonohoe

RHEL 6 Template

May 5th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. # Kickstart file for basic Scality servers
  2.  
  3. #version=DEVEL
  4. #########
  5. # Generic Options
  6. ###
  7. install
  8. url --url=http://chrisd.scality.com/RHEL6-7/
  9. lang en_US.UTF-8
  10. keyboard us
  11. rootpw ScalTempP@$$
  12. firstboot --disabled
  13. authconfig --enableshadow --passalgo=sha512
  14. selinux --disabled
  15. bootloader --location=mbr --append="rhgb quiet crashkernel=auto"
  16. #bootloader --location=mbr --driveorder=vda --append="crashkernel=auto console=ttyS0,115200"
  17. firewall --disabled
  18. timezone --utc America/Los_Angeles
  19.  
  20. ##########
  21. # Network Configuration Options
  22. ###
  23. # 1. DHCP for the first interface.
  24. #network --onboot yes --device eth0 --bootproto dhcp
  25. ###
  26. # 2. Static IP for the first interface. HOSTNAME, IP, GATEWAY, DNS are manually assigned.
  27. network --hostname store03 --onboot yes --device eth0 --bootproto static --ip 192.168.122.103 --netmask 255.255.255.0 --gateway 192.168.122.1 --ipv6 auto --nameserver 8.8.8.8
  28. ###
  29. # 3. Bonded interfaces. This may require knowledge of the hardware type.
  30. #
  31. ##########
  32.  
  33. ##########
  34. # Disk Partitioning
  35. ###
  36. clearpart --all --initlabel
  37. zerombr
  38. ###
  39. # The partitioning options will require knowledge of the hardware. The ondisk option will inevitably change between server models.
  40. ###
  41. part / --fstype="ext4" --grow --size=1
  42. part swap --recommended
  43. #part / --fstype=ext4 --size=20480 --ondisk=sdb
  44. #part /boot --asprimary --fstype=ext4 --size=4096 --ondisk=sdb
  45. #part /var --asprimary --fstype=ext4 --grow --size=32768 --ondisk=sdb
  46. #part swap --asprimary --size=16384 --ondisk=sdb
  47.  
  48. repo --name="CentOS" --baseurl=http://chrisd.scality.com/RHEL6-7/ --cost=100
  49.  
  50. reboot
  51.  
  52. %packages
  53. @core
  54. openssh-clients
  55. redhat-lsb-core
  56.  
  57. ##########
  58. # These are the optional packages recommended by Scality Engineering.
  59. # https://docs.scality.com/display/R51/Additional+Recommended+Packages
  60. bc
  61. bind-utils
  62. createrepo
  63. gdb
  64. lsof
  65. mtr
  66. parted
  67. pciutils
  68. rpmdevtools
  69. rsync
  70. screen
  71. vim-enhanced
  72. yum-utils
  73. dstat
  74. iotop
  75. net-snmp
  76. net-snmp-perl
  77. net-snmp-utils
  78. smartmontools
  79. strace
  80. tcpdump
  81. telnet
  82.  
  83. ##########
  84. # These packages added in preparation for the salt-minion installation from the epel repository.
  85. PyYAML
  86. python-crypto
  87. python-babel
  88.  
  89. ##########
  90. # These packages added in preparation for the perl-Net-SNMP installation from the epel repository.
  91. perl-Digest-SHA1
  92. perl-Digest-HMAC
  93.  
  94. ##########
  95. # These packages added in preparation for the fio installation from the epel repository.
  96. librdmacm
  97. perl-TermReadKey
  98. libibverbs
  99. perl-Time-HiRes
  100.  
  101. ##########
  102. # Download these packages individually from RedHat and put them in your repository manually.
  103. # Update the repo index by running the following command from the base directory.
  104. # createrepo --update -g repodata/81c149ffb2267c59a3e6405766b5ff3dc78e0637033e9f5aef564538359ff281-comps-Server.x86_64.xml .
  105. # perl-Config-Tiny is a package recommended by Scality Engineering.
  106. # python-jinja2 is a prerequisite for salt-minion.
  107. perl-Config-Tiny
  108. python-jinja2
  109.  
  110. %end
  111.  
  112. %post --log=/root/ks-post.log
  113. echo "Writing hosts file..."
  114. cat > /etc/hosts << EOF
  115. 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
  116. ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
  117. 192.168.122.100 super01 supervisor salt
  118. 192.168.122.101 store01
  119. 192.168.122.102 store02
  120. 192.168.122.103 store03
  121. 192.168.122.104 store04
  122. 192.168.122.105 store05
  123. 192.168.122.106 store06
  124. EOF
  125. echo "done with hosts file"
  126. echo "turning on salt"
  127. rpm -ivh https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm;
  128. yum -y install salt-minion;
  129. chkconfig salt-minion on;
  130. service salt-minion restart;
  131. echo "done with salt"
  132. # More Packages recommended by Scality Engineering that come from the epel repository that was just installed above.
  133. yum -y install ibmonitor htop iperf nsca-client jnettop perl-Crypt-Rijndael iperf3 iftop nrpe perl-Net-SNMP fio bonnie++ nagios-plugins-all
  134. chkconfig ntpd on;
  135. service ntpd start;
  136. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement