|
...
|
...
|
@@ -24,10 +24,10 @@ fi
|
|
24
|
24
|
# stack.sh keeps the list of **apt** and **pip** dependencies in external
|
|
25
|
25
|
# files, along with config templates and other useful files. You can find these
|
|
26
|
26
|
# in the ``files`` directory (next to this script). We will reference this
|
|
27
|
|
-# directory using the ``DEVSTACK`` variable in this script.
|
|
28
|
|
-DEVSTACK=`pwd`/files
|
|
29
|
|
-if [ ! -d $DEVSTACK ]; then
|
|
30
|
|
- echo "ERROR: missing devstack files - did you grab more than just stack.sh?"
|
|
|
27
|
+# directory using the ``FILES`` variable in this script.
|
|
|
28
|
+FILES=`pwd`/files
|
|
|
29
|
+if [ ! -d $FILES ]; then
|
|
|
30
|
+ echo "ERROR: missing devstack/files - did you grab more than just stack.sh?"
|
|
31
|
31
|
exit 1
|
|
32
|
32
|
fi
|
|
33
|
33
|
|
|
...
|
...
|
@@ -117,10 +117,10 @@ mysql-server-5.1 mysql-server/start_on_boot boolean true
|
|
117
|
117
|
MYSQL_PRESEED
|
|
118
|
118
|
|
|
119
|
119
|
# install apt requirements
|
|
120
|
|
-sudo apt-get install -y -q `cat $DEVSTACK/apts/* | cut -d\# -f1 | grep -Ev "mysql-server|rabbitmq-server"`
|
|
|
120
|
+sudo apt-get install -y -q `cat $FILES/apts/* | cut -d\# -f1 | grep -Ev "mysql-server|rabbitmq-server"`
|
|
121
|
121
|
|
|
122
|
122
|
# install python requirements
|
|
123
|
|
-sudo PIP_DOWNLOAD_CACHE=/var/cache/pip pip install `cat $DEVSTACK/pips/*`
|
|
|
123
|
+sudo PIP_DOWNLOAD_CACHE=/var/cache/pip pip install `cat $FILES/pips/*`
|
|
124
|
124
|
|
|
125
|
125
|
# git clone only if directory doesn't exist already
|
|
126
|
126
|
function git_clone {
|
|
...
|
...
|
@@ -164,7 +164,7 @@ cd $DASH_DIR/openstack-dashboard; sudo python setup.py develop
|
|
164
|
164
|
|
|
165
|
165
|
# Add a useful screenrc. This isn't required to run openstack but is we do
|
|
166
|
166
|
# it since we are going to run the services in screen for simple
|
|
167
|
|
-cp $DEVSTACK/screenrc ~/.screenrc
|
|
|
167
|
+cp $FILES/screenrc ~/.screenrc
|
|
168
|
168
|
|
|
169
|
169
|
## TODO: update current user to allow sudo for all commands in files/sudo/*
|
|
170
|
170
|
|
|
...
|
...
|
@@ -208,7 +208,7 @@ if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then
|
|
208
|
208
|
cd $DASH_DIR/openstack-dashboard
|
|
209
|
209
|
|
|
210
|
210
|
# Includes settings for Nixon, to expose munin charts.
|
|
211
|
|
- sudo cp $DEVSTACK/dash_settings.py local/local_settings.py
|
|
|
211
|
+ sudo cp $FILES/dash_settings.py local/local_settings.py
|
|
212
|
212
|
|
|
213
|
213
|
dashboard/manage.py syncdb
|
|
214
|
214
|
|
|
...
|
...
|
@@ -216,7 +216,7 @@ if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then
|
|
216
|
216
|
sudo mkdir -p $DASH_DIR/.blackhole
|
|
217
|
217
|
|
|
218
|
218
|
## Configure apache's 000-default to run dashboard
|
|
219
|
|
- sudo cp $DEVSTACK/000-default.template /etc/apache2/sites-enabled/000-default
|
|
|
219
|
+ sudo cp $FILES/000-default.template /etc/apache2/sites-enabled/000-default
|
|
220
|
220
|
sudo sed -e "s,%DASH_DIR%,$DASH_DIR,g" -i /etc/apache2/sites-enabled/000-default
|
|
221
|
221
|
|
|
222
|
222
|
# ``python setup.py develop`` left some files owned by root in ``DASH_DIR``
|
|
...
|
...
|
@@ -271,7 +271,7 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then
|
|
271
|
271
|
mysql -u$MYSQL_USER -p$MYSQL_PASS -e 'CREATE DATABASE glance;'
|
|
272
|
272
|
# Copy over our glance-registry.conf
|
|
273
|
273
|
GLANCE_CONF=$GLANCE_DIR/etc/glance-registry.conf
|
|
274
|
|
- cp $DEVSTACK/glance-registry.conf $GLANCE_CONF
|
|
|
274
|
+ cp $FILES/glance-registry.conf $GLANCE_CONF
|
|
275
|
275
|
sudo sed -e "s,%SQL_CONN%,$BASE_SQL_CONN/glance,g" -i $GLANCE_CONF
|
|
276
|
276
|
fi
|
|
277
|
277
|
|
|
...
|
...
|
@@ -367,11 +367,11 @@ if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
|
|
367
|
367
|
|
|
368
|
368
|
# FIXME (anthony) keystone should use keystone.conf.example
|
|
369
|
369
|
KEYSTONE_CONF=$KEYSTONE_DIR/etc/keystone.conf
|
|
370
|
|
- cp $DEVSTACK/keystone.conf $KEYSTONE_CONF
|
|
|
370
|
+ cp $FILES/keystone.conf $KEYSTONE_CONF
|
|
371
|
371
|
sudo sed -e "s,%SQL_CONN%,$BASE_SQL_CONN/keystone,g" -i $KEYSTONE_CONF
|
|
372
|
372
|
|
|
373
|
373
|
# initialize keystone with default users/endpoints
|
|
374
|
|
- BIN_DIR=$KEYSTONE_DIR/bin bash $DEVSTACK/keystone_data.sh
|
|
|
374
|
+ BIN_DIR=$KEYSTONE_DIR/bin bash $FILES/keystone_data.sh
|
|
375
|
375
|
fi
|
|
376
|
376
|
|
|
377
|
377
|
|