This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
eucalyptus-service-image.ks.in
161 lines (143 loc) · 3.07 KB
/
eucalyptus-service-image.ks.in
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
install
cmdline
reboot
keyboard us
lang en_US.UTF-8
timezone UTC
network --bootproto dhcp --device eth0 --onboot on
rootpw --iscrypted $1$HEVobWzu$6d5IWr.r7Df15XHLFCggW/
auth --useshadow --passalgo=sha512
firewall --disabled
selinux --disabled
services --enabled=network,ntpd,ntpdate
skipx
eula --agreed
bootloader --timeout=1 --append="xen_blkfront.sda_is_xvda=1 serial=tty0 console=ttyS0,115200n8"
clearpart --all
zerombr
part / --size 1536 --grow --fstype ext3
url --url @INSTALL_TREE@
repo --name updates --baseurl=@UPDATES_MIRROR@
repo --name epel --baseurl=@EPEL_MIRROR@
repo --name eucalyptus --baseurl=@EUCALYPTUS_MIRROR@
# Add all the packages after the base packages
%packages --excludedocs --instLangs=en
@core
audit
bash
chkconfig
coreutils
curl
e2fsprogs
ec2-net-utils
openssh-server
passwd
policycoreutils
rootfiles
sudo
system-config-firewall-base
ntp
ntpdate
createrepo
yum-utils
epel-release
cloud-init
eucalyptus-service-image-release
-plymouth
-plymouth-system-theme
-efibootmgr
-acl
-atmel-firmware
-b43-openfwwf
-cyrus-sasl
-postfix
-sysstat
-xorg-x11-drv-ati-firmware
-ipw2100-firmware
-ipw2200-firmware
-ivtv-firmware
-iwl1000-firmware
-iwl3945-firmware
-iwl4965-firmware
-iwl5000-firmware
-iwl5150-firmware
-iwl6000-firmware
-iwl6050-firmware
-libertas-usb8388-firmware
-rt61pci-firmware
-rt73usb-firmware
-mysql-libs
-zd1211-firmware
-ql2100-firmware
-ql2200-firmware
-ql23xx-firmware
-ql2400-firmware
-ql2500-firmware
-aic94xx-firmware
-iwl6000g2a-firmware
-iwl100-firmware
-bfa-firmware
%end
%post --erroronfail --log=/root/kickstart-post.log
set -x
# Setup console
cat > /etc/init/ttyS0.conf <<EOF
stop on runlevel[016]
start on runlevel[345]
respawn
instance /dev/ttyS0
exec /sbin/mingetty /dev/ttyS0
EOF
# Configure sudo
sed -i '/requiretty/s/^/#/' /etc/sudoers
sed -i '/!visiblepw/s/^/#/' /etc/sudoers
echo "cloud-user ALL = NOPASSWD: ALL" >> /etc/sudoers
# Configure cloud-init
sed -i 's/name: fedora/name: cloud-user/' /etc/cloud/cloud.cfg
sed -i 's/gecos: Fedora Cloud User/gecos: Cloud User/' /etc/cloud/cloud.cfg
# Configure networking
echo "NOZEROCONF=yes" >> /etc/sysconfig/network
echo "NETWORKING=yes" >> /etc/sysconfig/network
# Configure sshd
sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
cat >> /etc/ssh/sshd_config <<EOF
UseDNS no
PermitRootLogin without-password
EOF
# Download service packages for installation at runtime
cat >> /tmp/yum-tmp.conf <<EOF
[main]
keepcache=0
exactarch=1
obsoletes=1
plugins=0
distroverpkg=centos-release
debuglevel=2
logfile=/dev/null
reposdir=/dev/null
[base]
name=base
baseurl=@BASE_MIRROR@
enabled=1
[updates]
name=updates
baseurl=@UPDATES_MIRROR@
enabled=1
[epel]
name=epel
baseurl=@EPEL_MIRROR@
enabled=1
[eucalyptus]
name=eucalyptus
baseurl=@EUCALYPTUS_MIRROR@
enabled=1
[euca2ools]
name=euca2ools
baseurl=@EUCA2OOLS_MIRROR@
enabled=1
EOF
yumdownloader --resolve -c /tmp/yum-tmp.conf --destdir /var/lib/eucalyptus-service-image/packages eucalyptus-imaging-worker load-balancer-servo euca2ools
createrepo /var/lib/eucalyptus-service-image/packages
rm /tmp/yum-tmp.conf
%end
#vim: set syntax=kickstart: