From 2485906042be35d3c40506df1a28f5c407fbec29 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Thu, 15 Sep 2011 21:28:23 -0700 Subject: [PATCH 1/2] update docs / moving mysql higher --- stack.sh | 55 +++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/stack.sh b/stack.sh index 13b750a..aed5615 100755 --- a/stack.sh +++ b/stack.sh @@ -2,6 +2,11 @@ # **stack.sh** is rackspace cloudbuilder's opinionated openstack dev installation. +# To keep this script simple we assume you are running on an **Ubuntu 11.04 i +# Natty** machine. It should work in a VM or physical server. Additionally we +# put the list of *apt* and *pip* dependencies and other configuration files in +# this repo. So start by grabbing this script and the dependencies. + # Settings/Options # ================ @@ -23,6 +28,7 @@ set -o errexit set -o xtrace # Warn users who aren't on natty +## TODO: alter flow to exit unless the user sets environment FORCE=true if ! grep -q natty /etc/lsb-release; then echo "WARNING: this script has only been tested on natty" fi @@ -141,15 +147,29 @@ cp $DIR/files/screenrc ~/.screenrc # TODO: update current user to allow sudo for all commands in files/sudo/* +# Mysql +# --------- +# +if [[ "$ENABLED_SERVICES" =~ "mysql" ]]; then + # Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases: + sudo mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' identified by '$MYSQL_PASS';" + + # 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: + sudo sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf + sudo service mysql restart +fi + + # Dashboard # --------- # # Setup the django application to serve via apache/wsgi -# Dash currently imports quantum even if you aren't using it. Instead -# of installing quantum we can create a simple module that will pass the -# initial imports if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then + + # Dash currently imports quantum even if you aren't using it. Instead + # of installing quantum we can create a simple module that will pass the + # initial imports sudo mkdir -p $DASH_DIR/openstack-dashboard/quantum || true sudo touch $DASH_DIR/openstack-dashboard/quantum/__init__.py sudo touch $DASH_DIR/openstack-dashboard/quantum/client.py @@ -172,22 +192,10 @@ if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then fi -# Mysql -# --------- -# -if [[ "$ENABLED_SERVICES" =~ "mysql" ]]; then - # Update the DB to give user ‘$MYSQL_USER’@’%’ full control of the all databases: - sudo mysql -uroot -p$MYSQL_PASS -e "GRANT ALL PRIVILEGES ON *.* TO '$MYSQL_USER'@'%' identified by '$MYSQL_PASS';" - - # 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: - sudo sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf - sudo service mysql restart -fi - - # Munin # ----- +# Munin is accessable via apache and was configured in the dashboard section. if [[ "$ENABLED_SERVICES" =~ "munin" ]]; then # allow connections from other hosts @@ -381,3 +389,18 @@ if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then glance add name="tty-ramdisk" is_public=true container_format=ari disk_format=ari < ari-tty/image glance add name="tty" is_public=true container_format=ami disk_format=ami kernel_id=1 ramdisk_id=2 < ami-tty/image fi + +# Using the cloud +# =============== + +# If you installed the dashboard on this server, then you should be able +# to access the site using your browser. +if [[ "$ENABLED_SERVICES" =~ "dash" ]]; then + echo "dashboard is now available at http://$HOST_IP/" +fi + +# If keystone is present, you can point nova cli to this server +if [[ "$ENABLED_SERVICES" =~ "key" ]]; then + echo "keystone is serving at http://$HOST_IP:5000/v2.0/" + echo "examples on using novaclient command line is in exercise.sh" +fi From 7dd13d03f1b13693012ac84b8be6183f6765e779 Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Thu, 15 Sep 2011 21:29:15 -0700 Subject: [PATCH 2/2] add note that we need to make sure people grab more than just stack.sh --- stack.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stack.sh b/stack.sh index aed5615..0519fbc 100755 --- a/stack.sh +++ b/stack.sh @@ -29,6 +29,8 @@ set -o xtrace # Warn users who aren't on natty ## TODO: alter flow to exit unless the user sets environment FORCE=true +## TODO: warn user if apts, pips and other files don't exist that they +## need more than just this script if ! grep -q natty /etc/lsb-release; then echo "WARNING: this script has only been tested on natty" fi