-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode-base.cfg
More file actions
239 lines (180 loc) · 6.68 KB
/
Copy pathnode-base.cfg
File metadata and controls
239 lines (180 loc) · 6.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use network installation
url --url="http://mirror.vcu.edu/pub/gnu_linux/centos/7/os/x86_64/"
repo --name="CentOS" --baseurl="https://mirror.vcu.edu/pub/gnu_linux/centos/7/os/x86_64/" --cost=100
repo --name="updates7" --baseurl="http://mirror.vcu.edu/pub/gnu_linux/centos/7/updates/x86_64/" --cost=100
repo --name="extras" --baseurl="https://mirror.vcu.edu/pub/gnu_linux/centos/7/extras/x86_64/" --cost=100
repo --name="sclo" --baseurl="https://mirror.vcu.edu/pub/gnu_linux/centos/7/sclo/x86_64/sclo/" --cost=100
repo --name="sclrh" --baseurl="https://mirror.vcu.edu/pub/gnu_linux/centos/7/sclo/x86_64/rh" --cost=100
repo --name="cr" --baseurl="https://mirror.vcu.edu/pub/gnu_linux/centos/7/cr/x86_64/" --cost=100
repo --name="epel" --baseurl="https://mirror.vcu.edu/pub/linux/epel/7/x86_64/" --cost=100
#NOTE : Enabling elrepo on virtual machines may have unexpected results
# Enable elrepo on Sun systems
##repo --name="elrepo" --baseurl="https://mirror.vcu.edu/pub/linux/elrepo/elrepo/el7/x86_64/" --cost=30
# Use graphical install
graphical
# Run the Setup Agent on first boot
firstboot --enable
# Partition clearing information
ignoredisk --only-use=sda,sdb
zerombr
clearpart --all --initlabel --drives=sda,sdb
# Disk partitioning information
part raid.01 --fstype="mdmember" --size=1024 --ondrive=sda --asprimary
part raid.02 --fstype="mdmember" --size=5000 --ondrive=sda --grow
part swap --fstype="swap" --size=4096 --ondisk=sda --fsoptions="pri=1"
part swap --fstype="swap" --size=4096 --ondisk=sdb --fsoptions="pri=1"
part raid.03 --fstype="mdmember" --size=1024 --ondrive=sdb --asprimary
part raid.04 --fstype="mdmember" --size=5000 --ondrive=sdb --grow
raid /boot --device=md0 --fstype="ext4" --level=RAID1 raid.01 raid.03
raid pv.01 --device=md1 --fstype="lvmpv" --level=RAID1 raid.02 raid.04
volgroup mirror pv.01
logvol / --fstype="ext4" --size=25600 --name=root --vgname=mirror
# CCE-26557-9: Ensure /home Located On Separate Partition
logvol /home --fstype="ext4" --size=10240 --name=home --vgname=mirror --fsoptions="nodev"
# CCE-26639-5: Ensure /var Located On Separate Partition
logvol /var --fstype="ext4" --size=40960 --name=var --vgname=mirror --fsoptions="nodev"
# CCE-26215-4: Ensure /var/log Located On Separate Partition
logvol /var/log --fstype="ext4" --size=10240 --name=log --vgname=mirror --fsoptions="nodev"
# CCE-26436-6: Ensure /var/log/audit Located On Separate Partition
logvol /var/log/audit --fstype="ext4" --size=1024 --name=audit --vgname=mirror --fsoptions="nodev"
# CCE-26435-8: Ensure /tmp Located On Separate Partition
logvol /tmp --fstype="ext4" --size=1024 --name=tmp --vgname=mirror --fsoptions="nodev,nosuid,noexec"
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Network information
network --bootproto=dhcp --device=enp6s4f0 --ipv6=auto --activate
network --bootproto=dhcp --device=enp6s4f1 --onboot=off --ipv6=auto
network --hostname=ouroboros1
# System services
services --enabled="chronyd"
# System timezone
timezone America/New_York --isUtc --ntpservers=gateway
# System bootloader configuration
bootloader --append="rhgb quiet crashkernel=auto" --location=mbr --driveorder="sda,sdb" --boot-drive=sda
# Root password
rootpw --plaintext linuxisfun
# User accounts
user --name=yuriprym --gecos="Yuri Glasglow" --password=linuxisfun --groups="wheel"
user --name=quandre --gecos="Happy Wheels" --password=linuxisfun --groups="wheel"
user --name=glaed --gecos="J-Dog Mizzle" --password=linuxisfun --groups="wheel"
user --name=millerjm24 --gecos="Justin Miller" --password=linuxisfun
user --name=holtqj --gecos="Quinn Holt" --password=linuxisfun
user --name=cgchildr --gecos="Carlisle " --password=linuxisfun
reboot
%packages
#@^compute-node-environment
@base
@compat-libraries
@core
#@debugging
#@development
@hardware-monitoring
@infiniband
@network-file-system-client
#@performance
#@scientific
@security-tools
chrony
kexec-tools
#hardware util
memtest86+
smartmontools
bonnie++
stress
stress-ng
lm_sensors
hddtemp
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
#################
## Post-Installation Stuff
#################
%post --logfile /root/install.ks-postinstall.log
cat /proc/cmdline > /root/install.ks-boot_parameters
if grep -i -q "node=[a-zA-Z0-9]" /proc/cmdline
then
THIS_NODE=`cat /proc/cmdline | sed 's/.*node=\([^ ]*\).*/\1/'`
fi
BACKUPDIR=/root/Backups
# Varibles
THIS_CLUSTER=ouroboros
IPADDR=$THIS_NODE
THIS_SUBNET=192.168.200
THIS_NETMASK=255.255.255.0
THIS_NETWORK=$THIS_SUBNET.0
THIS_BROADCAST=$THIS_SUBNET.255
THIS_GATEWAY=192.168.200.1
THIS_IPADDR=$THIS_SUBNET.$IPADDR
THIS_HOSTNAME=$THIS_CLUSTER$THIS_NODE
DNS1=128.172.1.2
DNS2=128.172.1.1
#########################
## BACKUP CONFIGURATION
#########################
if [ ! -d "${BACKUPDIR}" ]; then mkdir ${BACKUPDIR}; fi
/bin/cp -LRipd /etc ${BACKUPDIR}/etc-BACKUP
#############################
# NEW NETWORK CONFIGURATION
#############################
cat > ${BACKUPDIR}/network << EOFNETWORK
NETWORKING=yes
HOSTNAME=${THIS_HOSTNAME}
EOFNETWORK
cat > ${BACKUPDIR}/ifcfg-eth0 << EOFETH0
DEVICE=eth0
BOOTPROTO=none
HWADDR=${ETH0_HWADDR}
IPV6INIT=no
MTU=1500
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
UUID=${ETH0_UUID}
IPADDR=${THIS_IPADDR}
NETMASK=${THIS_NETMASK}
DNS2=${DNS2}
GATEWAY=${THIS_GATEWAY}
DNS1=${DNS1}
USERCTL=no
EOFETH0
## DEPLOY
#/bin/cp -f ${BACKUPDIR}/network /etc/sysconfig/network
#/bin/chown root:root /etc/sysconfig/network
#/bin/chmod 644 /etc/sysconfig/network
#/bin/cp -f ${BACKUPDIR}/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0
#/bin/chown root:root /etc/sysconfig/network-scripts/ifcfg-eth0
#/bin/chmod 644 /etc/sysconfig/network-scripts/ifcfg-eth0
##############################
# TURN OFF UNNEEDED SERVICES
##############################
# CCE-RHEL7-CCE-TBD Disable the CUPS Service
systemctl disable cups.service
systemctl stop cups.service
systemctl disable cups.path
systemctl disable cups.socket
###########################
# TURN ON NEEDED SERVICES
###########################
systemctl enable rsyslog.service
##############
## Post Boot
##############
cat > ${BACKUPDIR}/postboot-reminders.txt << 'EOFREM'
Add post install reminders here
EOFREM
############################
# Send email when complete
############################
/bin/mail -s Kickstart_Installation_Complete holtqj@vcu.edu,millerjm24@vcu.edu,youngse7@vcu.edu,raynorj@vcu.edu < /dev/null
%end