Browse code

Merge branch 'master' into nixon

Jake Dahn authored on 2011/09/16 13:46:59
Showing 1 changed files
... ...
@@ -2,6 +2,11 @@
2 2
 
3 3
 # **stack.sh** is rackspace cloudbuilder's opinionated openstack dev installation.
4 4
 
5
+# To keep this script simple we assume you are running on an **Ubuntu 11.04 i
6
+# Natty** machine.  It should work in a VM or physical server.  Additionally we
7
+# put the list of *apt* and *pip* dependencies and other configuration files in
8
+# this repo.  So start by grabbing this script and the dependencies.
9
+
5 10
 # Settings/Options
6 11
 # ================
7 12
 
... ...
@@ -23,6 +28,9 @@ set -o errexit
23 23
 set -o xtrace
24 24
 
25 25
 # Warn users who aren't on natty
26
+## TODO: alter flow to exit unless the user sets environment FORCE=true
27
+## TODO: warn user if apts, pips and other files don't exist that they
28
+## need more than just this script
26 29
 if ! grep -q natty /etc/lsb-release; then
27 30
     echo "WARNING: this script has only been tested on natty"
28 31
 fi
... ...
@@ -144,15 +152,29 @@ cp $DIR/files/screenrc ~/.screenrc
144 144
 # TODO: update current user to allow sudo for all commands in files/sudo/*
145 145
 
146 146
 
147
+# Mysql
148
+# ---------
149
+#
150
+if [[ "$ENABLED_SERVICES" =~ "mysql" ]]; then
151
+    # Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases:
152
+    sudo mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' identified by '$MYSQL_PASS';"
153
+
154
+    # Edit /etc/mysql/my.cnf to change ‘bind-address’ from localhost (127.0.0.1) to any (0.0.0.0) and restart the mysql service:
155
+    sudo sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
156
+    sudo service mysql restart
157
+fi
158
+
159
+
147 160
 # Dashboard
148 161
 # ---------
149 162
 #
150 163
 # Setup the django application to serve via apache/wsgi
151 164
 
152
-# Dash currently imports quantum even if you aren't using it.  Instead 
153
-# of installing quantum we can create a simple module that will pass the 
154
-# initial imports
155 165
 if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then
166
+
167
+    # Dash currently imports quantum even if you aren't using it.  Instead 
168
+    # of installing quantum we can create a simple module that will pass the 
169
+    # initial imports
156 170
     sudo mkdir -p  $DASH_DIR/openstack-dashboard/quantum || true
157 171
     sudo touch $DASH_DIR/openstack-dashboard/quantum/__init__.py
158 172
     sudo touch $DASH_DIR/openstack-dashboard/quantum/client.py
... ...
@@ -176,22 +198,10 @@ if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then
176 176
 fi
177 177
 
178 178
 
179
-# Mysql
180
-# ---------
181
-#
182
-if [[ "$ENABLED_SERVICES" =~ "mysql" ]]; then
183
-    # Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases:
184
-    sudo mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' identified by '$MYSQL_PASS';"
185
-
186
-    # Edit /etc/mysql/my.cnf to change ‘bind-address’ from localhost (127.0.0.1) to any (0.0.0.0) and restart the mysql service:
187
-    sudo sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
188
-    sudo service mysql restart
189
-fi
190
-
191
-
192 179
 # Munin
193 180
 # -----
194 181
 
182
+# Munin is accessable via apache and was configured in the dashboard section.
195 183
 
196 184
 if [[ "$ENABLED_SERVICES" =~ "munin" ]]; then
197 185
     # allow connections from other hosts
... ...
@@ -385,3 +395,18 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then
385 385
     glance add name="tty-ramdisk" is_public=true container_format=ari disk_format=ari < ari-tty/image 
386 386
     glance add name="tty" is_public=true container_format=ami disk_format=ami kernel_id=1 ramdisk_id=2 < ami-tty/image
387 387
 fi
388
+
389
+# Using the cloud
390
+# ===============
391
+
392
+# If you installed the dashboard on this server, then you should be able
393
+# to access the site using your browser.  
394
+if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then
395
+    echo "dashboard is now available at http://$HOST_IP/"
396
+fi
397
+
398
+# If keystone is present, you can point nova cli to this server
399
+if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
400
+    echo "keystone is serving at http://$HOST_IP:5000/v2.0/"
401
+    echo "examples on using novaclient command line is in exercise.sh"
402
+fi