summaryrefslogtreecommitdiffstats
path: root/genome-respin/repo/conf.d/cloud-ks.cfg
blob: 2492662837a94d3d768c201b7d9cc55b6f7705ac (plain)
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
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth  --useshadow  --enablemd5
# System bootloader configuration
bootloader --location=mbr
# Use text install
text
# Firewall configuration
firewall --disabled
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# Use CDROM installation media
cdrom
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# Reboot after installation
reboot --eject
# Root password
rootpw password

# SELinux configuration
selinux --disabled
# Skip X Configuration
skipx
# System timezone
timezone  America/New_York
# Install OS instead of upgrade
install

# Clear the Master Boot Record
zerombr
# Setup LVM for the Cloud machines
clearpart --all --initlabel
partition /boot --fstype=ext3 --size=200
partition pv.01 --size=10240
partition pv.02 --size=10240 --grow
volgroup HostVolGroup00 pv.01
volgroup HostVolGroupImages pv.02
logvol swap --fstype swap --name=Swap --vgname=HostVolGroup00 --size=2048
logvol / --fstype ext3 --name=Root --vgname=HostVolGroup00 --size=10240 --grow
logvol /images --fstype ext3 --name=Images --vgname=HostVolGroupImages --size=10240 --grow

%packages
kernel-PAE
kvm
bridge-utils
vim-enhanced
yum
-yum-updatesd
httpd-cloudmasterd
httpd-cloudmasterd-redirect
rubygem-cloudmasterd
genome-bridge

%post
# Identify this machine as a cloud respin
/bin/touch /etc/sysconfig/cloud-respin

# Extend the number of loopback devices allowed
echo "options loop max_loop=255" >> /etc/modules.conf

# Set the certmaster in the minion configuration
sed -i "s/certmaster = certmaster/certmaster = localhost/g" /etc/certmaster/minion.conf

# Turn on autosigning
sed -i "s/autosign = no/autosign = yes/g" /etc/certmaster/certmaster.conf

# Chkconfig the cloudmasterd and httpd services
/sbin/chkconfig --add cloudmasterd
/sbin/chkconfig cloudmasterd on
/sbin/chkconfig --add httpd
/sbin/chkconfig httpd on

/sbin/chkconfig NetworkManager off
/sbin/chkconfig network on
/sbin/chkconfig genome-bridge on

# Determine the operating system release and version
if [ "`grep 'Red Hat' /etc/redhat-release`" != "" ]; then
  export RELEASE="RHEL"
elif [ "`grep 'CentOS' /etc/redhat-release`" != "" ]; then
  export RELEASE="CentOS"
else
  export RELEASE="Fedora"
fi

echo """
[genome-noarch]
name=genome-noarch
baseurl=http://ftp.redhat.com/pub/redhat/genome/yum/$RELEASE-\$releasever-genome-noarch
enabled=1
priority=99
gpgcheck=0

[genome-\$basearch]
name=genome-\$basearch
baseurl=http://ftp.redhat.com/pub/redhat/genome/yum/$RELEASE-\$releasever-genome-\$basearch
enabled=1
priority=99
gpgcheck=0
""" > /etc/yum.repos.d/genome.repo

%end