Browse code

fix caching so that there is the ability to download services without installing them. This is done with a #NOPRIME comment in apts/files/

Anthony Young authored on 2011/11/04 08:29:32
Showing 6 changed files
... ...
@@ -2,7 +2,7 @@ dnsmasq-base
2 2
 kpartx
3 3
 parted
4 4
 arping # used for send_arp_for_ha option in nova-network
5
-mysql-server
5
+mysql-server # NOPRIME
6 6
 python-mysqldb
7 7
 kvm
8 8
 gawk
... ...
@@ -11,10 +11,10 @@ ebtables
11 11
 sqlite3
12 12
 sudo
13 13
 kvm
14
-libvirt-bin
14
+libvirt-bin # NOPRIME
15 15
 vlan
16 16
 curl
17
-rabbitmq-server
17
+rabbitmq-server # NOPRIME
18 18
 socat # used by ajaxterm
19 19
 python-mox
20 20
 python-paste
... ...
@@ -1,6 +1,6 @@
1 1
 curl
2 2
 gcc
3
-memcached
3
+memcached # NOPRIME
4 4
 python-configobj
5 5
 python-coverage
6 6
 python-dev
... ...
@@ -145,8 +145,8 @@ function git_clone {
145 145
 # Make sure that base requirements are installed
146 146
 cp /etc/resolv.conf $COPY_DIR/etc/resolv.conf
147 147
 chroot $COPY_DIR apt-get update
148
-chroot $COPY_DIR apt-get install -y --force-yes `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server|memcached)"`
149
-chroot $COPY_DIR apt-get install -y --download-only rabbitmq-server libvirt-bin mysql-server
148
+chroot $COPY_DIR apt-get install -y --download-only `cat files/apts/* | grep NOPRIME | cut -d\# -f1`
149
+chroot $COPY_DIR apt-get install -y --force-yes `cat files/apts/* | grep -v NOPRIME | cut -d\# -f1`
150 150
 chroot $COPY_DIR pip install `cat files/pips/*`
151 151
 
152 152
 # Clean out code repos if directed to do so
... ...
@@ -125,8 +125,8 @@ fi
125 125
 
126 126
 # Make sure that base requirements are installed
127 127
 chroot $CACHEDIR apt-get update
128
-chroot $CACHEDIR apt-get install -y --force-yes `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server|memcached)"`
129
-chroot $CACHEDIR apt-get install -y --download-only rabbitmq-server libvirt-bin mysql-server
128
+chroot $CACHEDIR apt-get install -y --download-only `cat files/apts/* | grep NOPRIME | cut -d\# -f1`
129
+chroot $CACHEDIR apt-get install -y --force-yes `cat files/apts/* | grep -v NOPRIME | cut -d\# -f1`
130 130
 chroot $CACHEDIR pip install `cat files/pips/*`
131 131
 
132 132
 # Clean out code repos if directed to do so
... ...
@@ -32,8 +32,9 @@ fi
32 32
 # prime natty with as many apt/pips as we can
33 33
 if [ ! -d $CHROOTCACHE/natty-dev ]; then
34 34
     rsync -azH $CHROOTCACHE/natty-base/ $CHROOTCACHE/natty-dev/
35
-    chroot $CHROOTCACHE/natty-dev apt-get install -y `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server)"`
36
-    chroot $CHROOTCACHE/natty-dev pip install `cat files/pips/*`
35
+    chroot $CHROOTCACHE apt-get install -y --download-only `cat files/apts/* | grep NOPRIME | cut -d\# -f1`
36
+    chroot $CHROOTCACHE apt-get install -y --force-yes `cat files/apts/* | grep -v NOPRIME | cut -d\# -f1`
37
+    chroot $CHROOTCACHE pip install `cat files/pips/*`
37 38
 
38 39
     # Create a stack user that is a member of the libvirtd group so that stack
39 40
     # is able to interact with libvirt.
... ...
@@ -113,7 +113,8 @@ if [ ! -r $DEV_FILE ]; then
113 113
     mount -t ext4 ${NBD}p1 $MNTDIR
114 114
     cp -p /etc/resolv.conf $MNTDIR/etc/resolv.conf
115 115
 
116
-    chroot $MNTDIR apt-get install -y `cat files/apts/* | cut -d\# -f1 | egrep -v "(rabbitmq|libvirt-bin|mysql-server)"`
116
+    chroot $MNTDIR apt-get install -y --download-only `cat files/apts/* | grep NOPRIME | cut -d\# -f1`
117
+    chroot $MNTDIR apt-get install -y --force-yes `cat files/apts/* | grep -v NOPRIME | cut -d\# -f1`
117 118
     chroot $MNTDIR pip install `cat files/pips/*`
118 119
 
119 120
     # Create a stack user that is a member of the libvirtd group so that stack