| ... | ... |
@@ -34,8 +34,8 @@ echo "127.0.0.1 localhost $NAME" > $DEST/etc/hosts |
| 34 | 34 |
# copy kernel modules |
| 35 | 35 |
cp -pr /lib/modules/`uname -r` $DEST/lib/modules |
| 36 | 36 |
|
| 37 |
-# helpful screenrc |
|
| 38 |
-cp files/screenrc $DEST/root/.screenrc |
|
| 37 |
+# inject stack.sh files |
|
| 38 |
+cp -r files $DEST/opt/files |
|
| 39 | 39 |
|
| 40 | 40 |
# copy openstack installer and requirement lists to a new directory. |
| 41 | 41 |
mkdir -p $DEST/opt |
| 42 | 42 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,25 @@ |
| 0 |
+<VirtualHost *:80> |
|
| 1 |
+ WSGIScriptAlias / %DASH_DIR%/openstack-dashboard/dashboard/wsgi/django.wsgi |
|
| 2 |
+ WSGIDaemonProcess dashboard user=www-data group=www-data processes=3 threads=10 |
|
| 3 |
+ WSGIProcessGroup dashboard |
|
| 4 |
+ |
|
| 5 |
+ DocumentRoot %DASH_DIR%/.blackhole/ |
|
| 6 |
+ Alias /media %DASH_DIR%/openstack-dashboard/media |
|
| 7 |
+ |
|
| 8 |
+ <Directory /> |
|
| 9 |
+ Options FollowSymLinks |
|
| 10 |
+ AllowOverride None |
|
| 11 |
+ </Directory> |
|
| 12 |
+ |
|
| 13 |
+ <Directory %DASH_DIR%/> |
|
| 14 |
+ Options Indexes FollowSymLinks MultiViews |
|
| 15 |
+ AllowOverride None |
|
| 16 |
+ Order allow,deny |
|
| 17 |
+ allow from all |
|
| 18 |
+ </Directory> |
|
| 19 |
+ |
|
| 20 |
+ ErrorLog /var/log/apache2/error.log |
|
| 21 |
+ LogLevel warn |
|
| 22 |
+ CustomLog /var/log/apache2/access.log combined |
|
| 23 |
+</VirtualHost> |
|
| 24 |
+ |
| ... | ... |
@@ -97,32 +97,8 @@ if [ "$CMD" == "install" ]; then |
| 97 | 97 |
# setup apache |
| 98 | 98 |
mkdir $DASH_DIR/.blackhole |
| 99 | 99 |
|
| 100 |
- cat > /etc/apache2/sites-enabled/000-default <<EOF |
|
| 101 |
-<VirtualHost *:80> |
|
| 102 |
- WSGIScriptAlias / $DASH_DIR/openstack-dashboard/dashboard/wsgi/django.wsgi |
|
| 103 |
- WSGIDaemonProcess dashboard user=www-data group=www-data processes=3 threads=10 |
|
| 104 |
- WSGIProcessGroup dashboard |
|
| 105 |
- |
|
| 106 |
- DocumentRoot $DASH_DIR/.blackhole/ |
|
| 107 |
- Alias /media $DASH_DIR/openstack-dashboard/media |
|
| 108 |
- |
|
| 109 |
- <Directory /> |
|
| 110 |
- Options FollowSymLinks |
|
| 111 |
- AllowOverride None |
|
| 112 |
- </Directory> |
|
| 113 |
- |
|
| 114 |
- <Directory $DASH_DIR/> |
|
| 115 |
- Options Indexes FollowSymLinks MultiViews |
|
| 116 |
- AllowOverride None |
|
| 117 |
- Order allow,deny |
|
| 118 |
- allow from all |
|
| 119 |
- </Directory> |
|
| 120 |
- |
|
| 121 |
- ErrorLog /var/log/apache2/error.log |
|
| 122 |
- LogLevel warn |
|
| 123 |
- CustomLog /var/log/apache2/access.log combined |
|
| 124 |
-</VirtualHost> |
|
| 125 |
-EOF |
|
| 100 |
+ # FIXME(ja): can't figure out how to make $DASH_DIR work in sed, also install to available/a2e it |
|
| 101 |
+ cat $DIR/files/000-default.template | sed "s/%DASH_DIR%/\/opt\/dash/g" > /etc/apache2/sites-enabled/000-default |
|
| 126 | 102 |
|
| 127 | 103 |
chown -R www-data:www-data $DASH_DIR |
| 128 | 104 |
|
| ... | ... |
@@ -134,6 +110,9 @@ EOF |
| 134 | 134 |
|
| 135 | 135 |
mkdir -p $DEST/images |
| 136 | 136 |
tar -C $DEST/images -zxf $DEST/tty.tgz |
| 137 |
+ |
|
| 138 |
+ # add useful screenrc |
|
| 139 |
+ cp $DIR/files/screenrc ~/.screenrc |
|
| 137 | 140 |
exit |
| 138 | 141 |
fi |
| 139 | 142 |
|