Shrinking CentOS and RHEL stemcell images

Tracker story: https://www.pivotaltracker.com/story/show/91294022
parent a13077be
......@@ -44,7 +44,6 @@ rpm --rebuilddb
"
pkg_mgr install kernel
pkg_mgr groupinstall Base
pkg_mgr groupinstall 'Development Tools'
touch ${chroot}/etc/sysconfig/network # must be present for network to be configured
......
......@@ -26,21 +26,67 @@ esac
pkg_mgr install ${init_package_name}
# Install base packages needed by both the warden and bosh
packages="openssl-devel lsof \
strace bind9-host dnsutils tcpdump iputils-arping \
curl wget libcurl3 libcurl3-dev bison \
readline-devel \
libxml2 libxml2-devel libxslt libxslt-devel \
dhclient \
zip unzip \
nfs-common flex psmisc apparmor-utils iptables sysstat \
rsync openssh-server traceroute libncurses5-dev quota \
libaio1 gdb libcap2-bin libcap-devel bzip2-devel \
cmake sudo libuuid-devel parted NetworkManager e2fsprogs"
packages="
apparmor-utils
bash
bind-utils
bind9-host
bison
bzip2-devel
cmake
cronie-anacron
curl
dhclient
dnsutils
e2fsprogs
flex
gdb
glibc-static
iptables
iputils-arping
libaio1
libcap-devel
libcap2-bin
libcurl3
libcurl3-dev
libncurses5-dev
libuuid-devel
libxml2
libxml2-devel
libxslt
libxslt-devel
lsof
NetworkManager
nfs-common
nmap-ncat
openssh-server
openssl-devel
parted
psmisc
quota
readline-devel
rpm-build
rpmdevtools
rsync
rsyslog
rsyslog-gnutls
rsyslog-mmjsonparse
rsyslog-relp
runit
strace
sudo
sysstat
systemd
tcpdump
traceroute
unzip
wget
which
zip
"
pkg_mgr install ${packages} ${version_specific_packages}
# Install runit
pkg_mgr install "rpm-build rpmdevtools glibc-static"
cookbook_release=1.2.0
runit_version=runit-2.1.1
run_in_chroot $chroot "
......
......@@ -54,11 +54,9 @@ rpm --rebuilddb
if [ ! -f $chroot/custom_rhel_yum.conf ]; then
cp /bosh/stemcell_builder/etc/custom_rhel_yum.conf $chroot/
fi
run_in_chroot $chroot "yum -c /custom_rhel_yum.conf update --assumeyes"
run_in_chroot $chroot "yum -c /custom_rhel_yum.conf --verbose --assumeyes groupinstall Base"
run_in_chroot $chroot "yum -c /custom_rhel_yum.conf --verbose --assumeyes groupinstall 'Development Tools'"
run_in_chroot $chroot "yum -c /custom_rhel_yum.conf clean all"
pkg_mgr -c /custom_rhel_yum.conf install subscription-manager
pkg_mgr -c /custom_rhel_yum.conf groupinstall 'Development Tools'
# subscription-manager allows access to the Red Hat update server. It detects which repos
# it should allow access to based on the contents of 69.pem.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment