-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompute-node-base.cfg
More file actions
222 lines (163 loc) · 6 KB
/
compute-node-base.cfg
File metadata and controls
222 lines (163 loc) · 6 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
#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 /boot --fstype="ext4" --ondisk=sda --size=1024
part pv.353 --fstype="lvmpv" --ondisk=sda --size=200 --grow
volgroup node --pesize=4096 pv.353
logvol / --fstype="ext4" --size=25600 --name=root --vgname=node
logvol swap --fstype="swap" --size=26624 --name=swap --vgname=node --fsoptions="swap,pri=1"
# CCE-26639-5: Ensure /var Located On Separate Partition
logvol /var --fstype="ext4" --size=61440 --name=var --vgname=node --fsoptions="nodev"
# CCE-26435-8: Ensure /tmp Located On Separate Partition
part /tmp --fstype="ext4" --ondisk=sdb --size=1024 --grow --fsoptions="nodev,noexec,nosuid"
# 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
# Root password
rootpw --plaintext abc123
# 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
# User accounts
user --name=millerjm24 --password=abc123 --gecos="Justin Miller"
user --name=raynorj --gecos="Jesse Raynor" --password=cfd23808729afefbcaa0c4df3474e1c2492246670894c0fe2aa38a48e70430500bb031675612a516c34066b5a92a606302bc9928df5ea4d066c18e98cdb01b8 --iscrypted
user --name=youngse7 --gecos="Samuel Young" --password=linuxisfun
user --name=holtqj --gecos="Quinn Holt" --password=abc123
user --name=cgchildr --gecos="Carlisle Childress" --password=abc123
user --name=yuriprym --gecos="Samuel Young" --password=abc123 --groups="wheel"
user --name=quandre --password=abc123 --gecos="Quinn Holt" --groups="wheel"
user --name=glaed --password=abc123 --gecos="Justin Miller" --groups="wheel"
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
%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