Browse code

only install mysql-server and rabbitmq-server if needed

Anthony Young authored on 2011/09/16 15:11:29
Showing 1 changed files
... ...
@@ -117,7 +117,7 @@ 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`
120
+sudo apt-get install -y -q `cat $DEVSTACK/apts/* | cut -d\# -f1 | grep -Ev "mysql-server|rabbitmq-server"`
121 121
 
122 122
 # install python requirements
123 123
 sudo PIP_DOWNLOAD_CACHE=/var/cache/pip pip install `cat $DEVSTACK/pips/*`
... ...
@@ -166,11 +166,20 @@ cp $DEVSTACK/files/screenrc ~/.screenrc
166 166
 
167 167
 ## TODO: update current user to allow sudo for all commands in files/sudo/*
168 168
 
169
+# Rabbit
170
+# ---------
171
+#
172
+if [[ "$ENABLED_SERVICES" =~ "rabbit" ]]; then
173
+    # Install and start rabbitmq-server
174
+    sudo apt-get install rabbitmq-server
175
+fi
169 176
 
170 177
 # Mysql
171 178
 # ---------
172 179
 #
173 180
 if [[ "$ENABLED_SERVICES" =~ "mysql" ]]; then
181
+    # Install and start mysql-server
182
+    sudo apt-get install mysql-server
174 183
     # Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases:
175 184
     sudo mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' identified by '$MYSQL_PASS';"
176 185