| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,219 +0,0 @@ |
| 1 |
-# based on debootstrap/scripts/natty |
|
| 2 |
- |
|
| 3 |
-case $ARCH in |
|
| 4 |
- amd64|i386) |
|
| 5 |
- default_mirror http://archive.ubuntu.com/ubuntu |
|
| 6 |
- ;; |
|
| 7 |
- sparc) |
|
| 8 |
- case $SUITE in |
|
| 9 |
- gutsy) |
|
| 10 |
- default_mirror http://archive.ubuntu.com/ubuntu |
|
| 11 |
- ;; |
|
| 12 |
- *) |
|
| 13 |
- default_mirror http://ports.ubuntu.com/ubuntu-ports |
|
| 14 |
- ;; |
|
| 15 |
- esac |
|
| 16 |
- ;; |
|
| 17 |
- *) |
|
| 18 |
- default_mirror http://ports.ubuntu.com/ubuntu-ports |
|
| 19 |
- ;; |
|
| 20 |
-esac |
|
| 21 |
-mirror_style release |
|
| 22 |
-download_style apt |
|
| 23 |
-finddebs_style from-indices |
|
| 24 |
-variants - buildd fakechroot minbase |
|
| 25 |
- |
|
| 26 |
-if doing_variant fakechroot; then |
|
| 27 |
- test "$FAKECHROOT" = "true" || error 1 FAKECHROOTREQ "This variant requires fakechroot environment to be started" |
|
| 28 |
-fi |
|
| 29 |
- |
|
| 30 |
-case $ARCH in |
|
| 31 |
- alpha|ia64) LIBC="libc6.1" ;; |
|
| 32 |
- *) LIBC="libc6" ;; |
|
| 33 |
-esac |
|
| 34 |
- |
|
| 35 |
-work_out_debs () {
|
|
| 36 |
- required="$(get_debs Priority: required) openssh-server" |
|
| 37 |
- |
|
| 38 |
- if doing_variant -; then |
|
| 39 |
- #required="$required $(get_debs Priority: important)" |
|
| 40 |
- # ^^ should be getting debconf here somehow maybe |
|
| 41 |
- base="$(get_debs Priority: important)" |
|
| 42 |
- elif doing_variant buildd; then |
|
| 43 |
- base="$(get_debs Build-Essential: yes)" |
|
| 44 |
- elif doing_variant fakechroot || doing_variant minbase; then |
|
| 45 |
- base="apt" |
|
| 46 |
- fi |
|
| 47 |
-} |
|
| 48 |
- |
|
| 49 |
-first_stage_install () {
|
|
| 50 |
- extract $required |
|
| 51 |
- |
|
| 52 |
- mkdir -p "$TARGET/var/lib/dpkg" |
|
| 53 |
- : >"$TARGET/var/lib/dpkg/status" |
|
| 54 |
- : >"$TARGET/var/lib/dpkg/available" |
|
| 55 |
- |
|
| 56 |
- setup_etc |
|
| 57 |
- if [ ! -e "$TARGET/etc/fstab" ]; then |
|
| 58 |
- echo '# UNCONFIGURED FSTAB FOR BASE SYSTEM' > "$TARGET/etc/fstab" |
|
| 59 |
- chown 0:0 "$TARGET/etc/fstab"; chmod 644 "$TARGET/etc/fstab" |
|
| 60 |
- fi |
|
| 61 |
- |
|
| 62 |
- if doing_variant fakechroot; then |
|
| 63 |
- setup_devices_fakechroot |
|
| 64 |
- else |
|
| 65 |
- setup_devices |
|
| 66 |
- fi |
|
| 67 |
- |
|
| 68 |
- x_feign_install () {
|
|
| 69 |
- local pkg="$1" |
|
| 70 |
- local deb="$(debfor $pkg)" |
|
| 71 |
- local ver="$(extract_deb_field "$TARGET/$deb" Version)" |
|
| 72 |
- |
|
| 73 |
- mkdir -p "$TARGET/var/lib/dpkg/info" |
|
| 74 |
- |
|
| 75 |
- echo \ |
|
| 76 |
-"Package: $pkg |
|
| 77 |
-Version: $ver |
|
| 78 |
-Status: install ok installed" >> "$TARGET/var/lib/dpkg/status" |
|
| 79 |
- |
|
| 80 |
- touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
|
|
| 81 |
- } |
|
| 82 |
- |
|
| 83 |
- x_feign_install dpkg |
|
| 84 |
-} |
|
| 85 |
- |
|
| 86 |
-second_stage_install () {
|
|
| 87 |
- x_core_install () {
|
|
| 88 |
- smallyes '' | in_target dpkg --force-depends --install $(debfor "$@") |
|
| 89 |
- } |
|
| 90 |
- |
|
| 91 |
- p () {
|
|
| 92 |
- baseprog="$(($baseprog + ${1:-1}))"
|
|
| 93 |
- } |
|
| 94 |
- |
|
| 95 |
- if doing_variant fakechroot; then |
|
| 96 |
- setup_proc_fakechroot |
|
| 97 |
- else |
|
| 98 |
- setup_proc |
|
| 99 |
- in_target /sbin/ldconfig |
|
| 100 |
- fi |
|
| 101 |
- |
|
| 102 |
- DEBIAN_FRONTEND=noninteractive |
|
| 103 |
- DEBCONF_NONINTERACTIVE_SEEN=true |
|
| 104 |
- export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN |
|
| 105 |
- |
|
| 106 |
- baseprog=0 |
|
| 107 |
- bases=7 |
|
| 108 |
- |
|
| 109 |
- p; progress $baseprog $bases INSTCORE "Installing core packages" #1 |
|
| 110 |
- info INSTCORE "Installing core packages..." |
|
| 111 |
- |
|
| 112 |
- p; progress $baseprog $bases INSTCORE "Installing core packages" #2 |
|
| 113 |
- ln -sf mawk "$TARGET/usr/bin/awk" |
|
| 114 |
- x_core_install base-files base-passwd |
|
| 115 |
- p; progress $baseprog $bases INSTCORE "Installing core packages" #3 |
|
| 116 |
- x_core_install dpkg |
|
| 117 |
- |
|
| 118 |
- if [ ! -e "$TARGET/etc/localtime" ]; then |
|
| 119 |
- ln -sf /usr/share/zoneinfo/Etc/UTC "$TARGET/etc/localtime" |
|
| 120 |
- fi |
|
| 121 |
- |
|
| 122 |
- if doing_variant fakechroot; then |
|
| 123 |
- install_fakechroot_tools |
|
| 124 |
- fi |
|
| 125 |
- |
|
| 126 |
- p; progress $baseprog $bases INSTCORE "Installing core packages" #4 |
|
| 127 |
- x_core_install $LIBC |
|
| 128 |
- |
|
| 129 |
- p; progress $baseprog $bases INSTCORE "Installing core packages" #5 |
|
| 130 |
- x_core_install perl-base |
|
| 131 |
- |
|
| 132 |
- p; progress $baseprog $bases INSTCORE "Installing core packages" #6 |
|
| 133 |
- rm "$TARGET/usr/bin/awk" |
|
| 134 |
- x_core_install mawk |
|
| 135 |
- |
|
| 136 |
- p; progress $baseprog $bases INSTCORE "Installing core packages" #7 |
|
| 137 |
- if doing_variant -; then |
|
| 138 |
- x_core_install debconf |
|
| 139 |
- fi |
|
| 140 |
- |
|
| 141 |
- baseprog=0 |
|
| 142 |
- bases=$(set -- $required; echo $#) |
|
| 143 |
- |
|
| 144 |
- info UNPACKREQ "Unpacking required packages..." |
|
| 145 |
- |
|
| 146 |
- smallyes '' | |
|
| 147 |
- (repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages. This will be attempted up to five times." "" \ |
|
| 148 |
- dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 | |
|
| 149 |
- dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1 |
|
| 150 |
- |
|
| 151 |
- info CONFREQ "Configuring required packages..." |
|
| 152 |
- |
|
| 153 |
- if doing_variant fakechroot; then |
|
| 154 |
- # fix initscripts postinst (no mounting possible, and wrong if condition) |
|
| 155 |
- sed -i '/dpkg.*--compare-versions/ s/\<lt\>/lt-nl/' "$TARGET/var/lib/dpkg/info/initscripts.postinst" |
|
| 156 |
- fi |
|
| 157 |
- |
|
| 158 |
- mv "$TARGET/sbin/start-stop-daemon" "$TARGET/sbin/start-stop-daemon.REAL" |
|
| 159 |
- echo \ |
|
| 160 |
-"#!/bin/sh |
|
| 161 |
-echo |
|
| 162 |
-echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon" |
|
| 163 |
- chmod 755 "$TARGET/sbin/start-stop-daemon" |
|
| 164 |
- |
|
| 165 |
- if [ -x "$TARGET/sbin/initctl" ]; then |
|
| 166 |
- mv "$TARGET/sbin/initctl" "$TARGET/sbin/initctl.REAL" |
|
| 167 |
- echo \ |
|
| 168 |
-"#!/bin/sh |
|
| 169 |
-echo |
|
| 170 |
-echo \"Warning: Fake initctl called, doing nothing\"" > "$TARGET/sbin/initctl" |
|
| 171 |
- chmod 755 "$TARGET/sbin/initctl" |
|
| 172 |
- fi |
|
| 173 |
- |
|
| 174 |
- setup_dselect_method apt |
|
| 175 |
- |
|
| 176 |
- smallyes '' | |
|
| 177 |
- (in_target_failmsg CONF_REQ_FAIL "Failure while configuring required packages." "" \ |
|
| 178 |
- dpkg --status-fd 8 --configure --pending --force-configure-any --force-depends 8>&1 1>&7 | |
|
| 179 |
- dpkg_progress $baseprog $bases CONFREQ "Configuring required packages" CONFIGURING) 7>&1 |
|
| 180 |
- |
|
| 181 |
- baseprog=0 |
|
| 182 |
- bases="$(set -- $base; echo $#)" |
|
| 183 |
- |
|
| 184 |
- info UNPACKBASE "Unpacking the base system..." |
|
| 185 |
- |
|
| 186 |
- setup_available $required $base |
|
| 187 |
- done_predeps= |
|
| 188 |
- while predep=$(get_next_predep); do |
|
| 189 |
- # We have to resolve dependencies of pre-dependencies manually because |
|
| 190 |
- # dpkg --predep-package doesn't handle this. |
|
| 191 |
- predep=$(without "$(without "$(resolve_deps $predep)" "$required")" "$done_predeps") |
|
| 192 |
- # XXX: progress is tricky due to how dpkg_progress works |
|
| 193 |
- # -- cjwatson 2009-07-29 |
|
| 194 |
- p; smallyes '' | |
|
| 195 |
- in_target dpkg --force-overwrite --force-confold --skip-same-version --install $(debfor $predep) |
|
| 196 |
- base=$(without "$base" "$predep") |
|
| 197 |
- done_predeps="$done_predeps $predep" |
|
| 198 |
- done |
|
| 199 |
- |
|
| 200 |
- smallyes '' | |
|
| 201 |
- (repeatn 5 in_target_failmsg INST_BASE_FAIL_FIVE "Failure while installing base packages. This will be re-attempted up to five times." "" \ |
|
| 202 |
- dpkg --status-fd 8 --force-overwrite --force-confold --skip-same-version --unpack $(debfor $base) 8>&1 1>&7 | |
|
| 203 |
- dpkg_progress $baseprog $bases UNPACKBASE "Unpacking base system" UNPACKING) 7>&1 |
|
| 204 |
- |
|
| 205 |
- info CONFBASE "Configuring the base system..." |
|
| 206 |
- |
|
| 207 |
- smallyes '' | |
|
| 208 |
- (repeatn 5 in_target_failmsg CONF_BASE_FAIL_FIVE "Failure while configuring base packages. This will be re-attempted up to five times." "" \ |
|
| 209 |
- dpkg --status-fd 8 --force-confold --skip-same-version --configure -a 8>&1 1>&7 | |
|
| 210 |
- dpkg_progress $baseprog $bases CONFBASE "Configuring base system" CONFIGURING) 7>&1 |
|
| 211 |
- |
|
| 212 |
- if [ -x "$TARGET/sbin/initctl.REAL" ]; then |
|
| 213 |
- mv "$TARGET/sbin/initctl.REAL" "$TARGET/sbin/initctl" |
|
| 214 |
- fi |
|
| 215 |
- mv "$TARGET/sbin/start-stop-daemon.REAL" "$TARGET/sbin/start-stop-daemon" |
|
| 216 |
- |
|
| 217 |
- progress $bases $bases CONFBASE "Configuring base system" |
|
| 218 |
- info BASESUCCESS "Base system installed successfully." |
|
| 219 |
-} |
| ... | ... |
@@ -53,12 +53,7 @@ function clone_or_up {
|
| 53 | 53 |
|
| 54 | 54 |
# You should only have to run this once |
| 55 | 55 |
if [ "$CMD" == "install" ]; then |
| 56 |
- #apt-get install -y python-software-properties |
|
| 57 |
- # FIXME: do we still need this? |
|
| 58 |
- # DELETEME: add-apt-repository ppa:nova-core/trunk |
|
| 59 |
- # DELETEME: apt-get update -qq |
|
| 60 |
- |
|
| 61 |
- # fixme: do we need: python-boto |
|
| 56 |
+ # install apt requirements |
|
| 62 | 57 |
apt-get install -y -q `cat $DIR/apts/*` |
| 63 | 58 |
|
| 64 | 59 |
# install python requirements |
| ... | ... |
@@ -83,13 +78,12 @@ if [ "$CMD" == "install" ]; then |
| 83 | 83 |
cd $API_DIR; python setup.py develop |
| 84 | 84 |
cd $DASH_DIR/django-openstack; python setup.py develop |
| 85 | 85 |
cd $DASH_DIR/openstack-dashboard; python setup.py develop |
| 86 |
- # dash currently imports quantum even if you aren't using it |
|
| 86 |
+ # HACK: dash currently imports quantum even if you aren't using it |
|
| 87 | 87 |
cd $DASH_DIR/openstack-dashboard |
| 88 | 88 |
mkdir quantum |
| 89 | 89 |
touch quantum/__init__.py |
| 90 | 90 |
touch quantum/client.py |
| 91 | 91 |
|
| 92 |
- |
|
| 93 | 92 |
# attempt to load kvm and nbd modules |
| 94 | 93 |
modprobe kvm || true |
| 95 | 94 |
modprobe nbd || true |
| ... | ... |
@@ -98,26 +92,13 @@ if [ "$CMD" == "install" ]; then |
| 98 | 98 |
# install dashboard |
| 99 | 99 |
cd $DASH_DIR/openstack-dashboard |
| 100 | 100 |
cp local/local_settings.py.example local/local_settings.py |
| 101 |
-# python tools/install_venv.py |
|
| 102 | 101 |
dashboard/manage.py syncdb |
| 103 | 102 |
# setup apache |
| 104 | 103 |
mkdir $DASH_DIR/.blackhole |
| 105 | 104 |
|
| 106 |
-# cat > $DASH_DIR/openstack-dashboard/dashboard/wsgi/local.wsgi <<EOF |
|
| 107 |
-#import sys |
|
| 108 |
-#sys.path.append('/$DASH_DIR/openstack-dashboard/.dashboard-venv/lib/python2.6/site-packages/')
|
|
| 109 |
-#sys.path.append('/$DASH_DIR/openstack-dashboard/.dashboard-venv/lib/python2.7/site-packages/')
|
|
| 110 |
-#sys.path.append('/$DASH_DIR/openstack-dashboard/')
|
|
| 111 |
-#sys.path.append('/$DASH_DIR/django-openstack/')
|
|
| 112 |
-#sys.path.append('/$API_DIR')
|
|
| 113 |
-#sys.path.append('/$DASH_DIR/openstack-dashboard/.dashboard-venv/src/openstack')
|
|
| 114 |
-# |
|
| 115 |
-#EOF |
|
| 116 |
- cat $DASH_DIR/openstack-dashboard/dashboard/wsgi/django.wsgi >> $DASH_DIR/openstack-dashboard/dashboard/wsgi/local.wsgi |
|
| 117 |
- |
|
| 118 | 105 |
cat > /etc/apache2/sites-enabled/000-default <<EOF |
| 119 | 106 |
<VirtualHost *:80> |
| 120 |
- WSGIScriptAlias / $DASH_DIR/openstack-dashboard/dashboard/wsgi/local.wsgi |
|
| 107 |
+ WSGIScriptAlias / $DASH_DIR/openstack-dashboard/dashboard/wsgi/django.wsgi |
|
| 121 | 108 |
WSGIDaemonProcess dashboard user=www-data group=www-data processes=3 threads=10 |
| 122 | 109 |
WSGIProcessGroup dashboard |
| 123 | 110 |
|
| ... | ... |
@@ -234,9 +215,8 @@ if [ "$CMD" == "run" ] || [ "$CMD" == "run_detached" ]; then |
| 234 | 234 |
screen_it net "$NOVA_DIR/bin/nova-network" |
| 235 | 235 |
screen_it sched "$NOVA_DIR/bin/nova-scheduler" |
| 236 | 236 |
screen_it key "$KEYSTONE_DIR/bin/keystone --config-file $KEYSTONE_DIR/etc/keystone.conf" |
| 237 |
- screen_it dash "/etc/init.d/apache2 restart; tail -f /var/log/apache2/error.log" |
|
| 238 | 237 |
screen_it vnc "$NOVA_DIR/bin/nova-vncproxy" |
| 239 |
- screen_it test "" |
|
| 238 |
+ screen_it dash "/etc/init.d/apache2 restart; tail -f /var/log/apache2/error.log" |
|
| 240 | 239 |
|
| 241 | 240 |
# FIXME: switch to just importing images |
| 242 | 241 |
# remove previously converted images |