From 1468133003a7f380dc9ae60328d5c187c975ff10 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Thu, 3 Nov 2011 15:52:37 -0500 Subject: [PATCH 1/2] only download - don't install apts - also pip install --- tools/build_libvirt.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/build_libvirt.sh b/tools/build_libvirt.sh index 3de8cc5718..7efabbbad4 100755 --- a/tools/build_libvirt.sh +++ b/tools/build_libvirt.sh @@ -145,9 +145,8 @@ function git_clone { # Make sure that base requirements are installed cp /etc/resolv.conf $COPY_DIR/etc/resolv.conf chroot $COPY_DIR apt-get update -chroot $COPY_DIR apt-get install -y --force-yes `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server|memcached)"` -chroot $COPY_DIR apt-get install -y --download-only rabbitmq-server libvirt-bin mysql-server -chroot $COPY_DIR pip install `cat files/pips/*` +chroot $COPY_DIR apt-get install -y --download-only `cat files/apts/* | cut -d\# -f1` +chroot $COPY_DIR apt-get install -y --force-yes `cat files/apts/general` # Clean out code repos if directed to do so if [ "$CLEAN" = "1" ]; then From ca2c047b6eb28cebba25870f3dda9e6eae2ab1ea Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Thu, 3 Nov 2011 16:29:32 -0700 Subject: [PATCH 2/2] fix caching so that there is the ability to download services without installing them. This is done with a #NOPRIME comment in apts/files/ --- files/apts/nova | 6 +++--- files/apts/swift | 2 +- tools/build_libvirt.sh | 4 ++-- tools/build_lxc.sh | 4 ++-- tools/build_nfs.sh | 5 +++-- tools/build_ramdisk.sh | 3 ++- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/files/apts/nova b/files/apts/nova index 17eb877427..405d53baf3 100644 --- a/files/apts/nova +++ b/files/apts/nova @@ -2,7 +2,7 @@ dnsmasq-base kpartx parted arping # used for send_arp_for_ha option in nova-network -mysql-server +mysql-server # NOPRIME python-mysqldb kvm gawk @@ -11,10 +11,10 @@ ebtables sqlite3 sudo kvm -libvirt-bin +libvirt-bin # NOPRIME vlan curl -rabbitmq-server +rabbitmq-server # NOPRIME socat # used by ajaxterm python-mox python-paste diff --git a/files/apts/swift b/files/apts/swift index c52c68b765..f29837784e 100644 --- a/files/apts/swift +++ b/files/apts/swift @@ -1,6 +1,6 @@ curl gcc -memcached +memcached # NOPRIME python-configobj python-coverage python-dev diff --git a/tools/build_libvirt.sh b/tools/build_libvirt.sh index 3de8cc5718..d192879469 100755 --- a/tools/build_libvirt.sh +++ b/tools/build_libvirt.sh @@ -145,8 +145,8 @@ function git_clone { # Make sure that base requirements are installed cp /etc/resolv.conf $COPY_DIR/etc/resolv.conf chroot $COPY_DIR apt-get update -chroot $COPY_DIR apt-get install -y --force-yes `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server|memcached)"` -chroot $COPY_DIR apt-get install -y --download-only rabbitmq-server libvirt-bin mysql-server +chroot $COPY_DIR apt-get install -y --download-only `cat files/apts/* | grep NOPRIME | cut -d\# -f1` +chroot $COPY_DIR apt-get install -y --force-yes `cat files/apts/* | grep -v NOPRIME | cut -d\# -f1` chroot $COPY_DIR pip install `cat files/pips/*` # Clean out code repos if directed to do so diff --git a/tools/build_lxc.sh b/tools/build_lxc.sh index 13b98df949..9d8ce92613 100755 --- a/tools/build_lxc.sh +++ b/tools/build_lxc.sh @@ -125,8 +125,8 @@ fi # Make sure that base requirements are installed chroot $CACHEDIR apt-get update -chroot $CACHEDIR apt-get install -y --force-yes `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server|memcached)"` -chroot $CACHEDIR apt-get install -y --download-only rabbitmq-server libvirt-bin mysql-server +chroot $CACHEDIR apt-get install -y --download-only `cat files/apts/* | grep NOPRIME | cut -d\# -f1` +chroot $CACHEDIR apt-get install -y --force-yes `cat files/apts/* | grep -v NOPRIME | cut -d\# -f1` chroot $CACHEDIR pip install `cat files/pips/*` # Clean out code repos if directed to do so diff --git a/tools/build_nfs.sh b/tools/build_nfs.sh index 5c591e44e0..39a2cf0889 100755 --- a/tools/build_nfs.sh +++ b/tools/build_nfs.sh @@ -32,8 +32,9 @@ fi # prime natty with as many apt/pips as we can if [ ! -d $CHROOTCACHE/natty-dev ]; then rsync -azH $CHROOTCACHE/natty-base/ $CHROOTCACHE/natty-dev/ - chroot $CHROOTCACHE/natty-dev apt-get install -y `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server)"` - chroot $CHROOTCACHE/natty-dev pip install `cat files/pips/*` + chroot $CHROOTCACHE apt-get install -y --download-only `cat files/apts/* | grep NOPRIME | cut -d\# -f1` + chroot $CHROOTCACHE apt-get install -y --force-yes `cat files/apts/* | grep -v NOPRIME | cut -d\# -f1` + chroot $CHROOTCACHE pip install `cat files/pips/*` # Create a stack user that is a member of the libvirtd group so that stack # is able to interact with libvirt. diff --git a/tools/build_ramdisk.sh b/tools/build_ramdisk.sh index 187112a7a5..2c914dc757 100755 --- a/tools/build_ramdisk.sh +++ b/tools/build_ramdisk.sh @@ -113,7 +113,8 @@ if [ ! -r $DEV_FILE ]; then mount -t ext4 ${NBD}p1 $MNTDIR cp -p /etc/resolv.conf $MNTDIR/etc/resolv.conf - chroot $MNTDIR apt-get install -y `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server)"` + chroot $MNTDIR apt-get install -y --download-only `cat files/apts/* | grep NOPRIME | cut -d\# -f1` + chroot $MNTDIR apt-get install -y --force-yes `cat files/apts/* | grep -v NOPRIME | cut -d\# -f1` chroot $MNTDIR pip install `cat files/pips/*` # Create a stack user that is a member of the libvirtd group so that stack