-
Notifications
You must be signed in to change notification settings - Fork 55
/
base.ks.erb
109 lines (79 loc) · 2.79 KB
/
base.ks.erb
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
# Kickstart file automatically generated by anaconda.
# Run the text based installer to see dependency info in screenshots
logging --level=debug
#version=DEVEL
install
cdrom
<%= render_partial "main/repos" %>
lang en_US.UTF-8
keyboard us
<%= render_partial "main/network" %>
rootpw --iscrypted $1$DZprqvCu$mhqFBjfLTH/PVvZIompVP/
authconfig --enableshadow --passalgo=sha512
selinux --enforcing
timezone --utc America/New_York
device mptbase
device mptscsih
device mptspi
<%= render_partial "main/bootloader" %>
<%= render_partial "main/disk_layout" %>
<%= render_partial "main/db_fs" %>
reboot
%packages
@base --nodefaults
@server-policy --nodefaults
@development tools
<%= render_partial "packages/includes" %>
<%= render_partial "packages/excludes" %>
%end
%post --log=/root/anaconda-post.log
(
# Redirect stdin to be /dev/tty3
exec < /dev/tty3
chvt 3
set -x
# For some reason, DEBUG is set but empty in the kickstart.
# Unset it so ruby_parser doesn't print LOTS of output.
unset DEBUG
# We don't need a session store in anaconda so force Rails to use memory store
# since rails 5 mem_cache_store tries to connect to a not running memcached.
# See: https://github.com/ManageIQ/manageiq/pull/6751
export RAILS_USE_MEMORY_STORE="true"
<%= render_partial "post/firewalld" %>
<%= render_partial "post/source_setup" %>
<%= render_partial "post/repos" %>
<%= render_partial "post/ruby_install" %>
<%= render_partial "post/bundler" %>
# needs to run *after* post/bundler
<%= render_partial "post/ui_compile" %>
# appliance_root="/opt/manageiq/manageiq-appliance" -- in post/source_setup partial
$appliance_root/manageiq-setup.sh
<%= render_partial "post/systemd" %>
<%= render_partial "post/db_init" %>
# make sure we have the device name in all ifcfg-* files
ls /etc/sysconfig/network-scripts/ifcfg-* | while read FILE
do
# parse the device name from FILE
DEVICE=${FILE##*-}
grep -q 'DEVICE=' $FILE || echo "DEVICE=$DEVICE" >> $FILE
done
# Disable zeroconfig to allow access to meta-data service by cloud-init
cat >> /etc/sysconfig/network << EOF
NETWORKING=yes
NOZEROCONF=yes
EOF
# Let's rebuild the ramfs with with base scsi drivers we need
kversion=$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n')
ramfsfile="/boot/initramfs-$kversion.img"
/sbin/dracut --force --add-drivers "mptbase mptscsih mptspi<%= " hv_storvsc hid_hyperv hv_netvsc hv_vmbus" if @target == "hyperv" || @target == "azure" %>" $ramfsfile $kversion
<%= render_partial "post/aws-ec2" if @target == "aws-ec2" %>
<%= render_partial "post/azure" if @target == "azure" %>
<%= render_partial "post/gce" if @target == "gce" %>
<%= render_partial "post/vagrant" if @target == "vagrant" %>
# make sure there is a new line at the end of sshd_config
echo "" >> /etc/ssh/sshd_config
# Clean the logs
rm -rf "$vmdb_root/log/*"
chvt 1
) 2>&1 | tee /dev/tty3
%end