Advertisement
cdonohoe

RHEL 7 Template

May 5th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.01 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/RHEL7-2/
  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 store04 --onboot yes --device eth0 --bootproto static --ip 192.168.122.104 --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/RHEL7-2/ --cost=100
  49.  
  50. reboot
  51.  
  52. %packages
  53. @core
  54. openssh-clients
  55. ntp
  56. sos
  57. redhat-lsb-core
  58.  
  59. ##########
  60. # These are the optional packages recommended by Scality Engineering.
  61. # https://docs.scality.com/display/R51/Additional+Recommended+Packages
  62. bc
  63. bind-utils
  64. createrepo
  65. gdb
  66. lsof
  67. mtr
  68. parted
  69. pciutils
  70. rpmdevtools
  71. rsync
  72. screen
  73. vim-enhanced
  74. yum-utils
  75. dstat
  76. iotop
  77. net-snmp
  78. net-snmp-utils
  79. smartmontools
  80. strace
  81. tcpdump
  82. telnet
  83.  
  84. ##########
  85. # These packages added in preparation for the salt-minion installation from the epel repository.
  86. python-requests
  87. python-jinja2
  88. PyYAML
  89. systemd-python
  90. python-babel
  91.  
  92. ##########
  93. # These packages added in preparation for the perl-Net-SNMP installation from the epel repository.
  94. perl-Digest-SHA1
  95. perl-Digest-HMAC
  96. perl-Socket6
  97.  
  98. ##########
  99. # These packages added in preparation for the fio installation from the epel repository.
  100. libaio
  101. librdmacm
  102. perl-TermReadKey
  103. libibverbs
  104. perl-Time-HiRes
  105. librados2
  106.  
  107. ##########
  108. # Download these packages individually from RedHat and put them in your repository manually.
  109. # net-snmp-perl and perl-Config-Tiny are packages recommended by Scality Engineering.
  110. # createrepo --update -g repodata/81c149ffb2267c59a3e6405766b5ff3dc78e0637033e9f5aef564538359ff281-comps-Server.x86_64.xml .
  111. net-snmp-perl
  112. perl-Config-Tiny
  113. perl-Crypt-DES
  114.  
  115. %end
  116.  
  117. %post --log=/root/ks-post.log
  118. echo "Writing hosts file..."
  119. cat > /etc/hosts << EOF
  120. 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
  121. ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
  122. 192.168.122.100 super01 supervisor salt
  123. 192.168.122.101 store01
  124. 192.168.122.102 store02
  125. 192.168.122.103 store03
  126. 192.168.122.104 store04
  127. 192.168.122.105 store05
  128. 192.168.122.106 store06
  129. EOF
  130. echo "done with hosts file"
  131. echo "turning on salt"
  132. rpm -ivh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm;
  133. yum -y install salt-minion;
  134. systemctl enable salt-minion.service;
  135. systemctl start salt-minion.service;
  136. echo "done with salt"
  137. # More Packages recommended by Scality Engineering that come from the epel repository that was just installed above.
  138. # ibmonitor and jnettop appear in the CentOS6/RHEL6 epel repository. They are not yet in the CENTOS7/RHEL7 epel repository.
  139. yum -y install htop iperf nsca-client perl-Crypt-Rijndael iperf3 iftop nrpe perl-Net-SNMP fio bonnie++ nagios-plugins-all
  140. systemctl enable ntpd.service;
  141. systemctl start ntpd.service;
  142.  
  143. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement