some tweaks and doc improvements
diff --git a/tools/xen/README.md b/tools/xen/README.md
index fd32cff..a11c972 100644
--- a/tools/xen/README.md
+++ b/tools/xen/README.md
@@ -4,8 +4,8 @@
a XenServer 5.6 + Openstack development environment. This file gives
some pointers on how to get started.
-Install Xenserver
------------------
+Step 1: Install Xenserver
+------------------------
Install XenServer 5.6 on a clean box.
Here are some sample Xenserver network settings for when you are just
getting started (I used settings like this using a lappy + cheap wifi router):
@@ -15,20 +15,22 @@
* XenServer Gateway: 192.168.1.1
* XenServer DNS: 192.168.1.1
-Prepare DOM0
-------------
+Step 2: Prepare DOM0
+-------------------
At this point, your server is missing some critical software that you will
need to run devstack (like git). Do this to install required software:
+ wget https://github.com/cloudbuilders/devstack/raw/xen/tools/xen/prepare_dom0.sh
+ chmod 755 prepare_dom0.sh
./prepare_dom0.sh
This script will also clone devstack in /root/devstack
-Configure your localrc
-----------------------
-Devstack uses a localrc for user-specific configuration. Note that while
-the first 4 passwords are arbitrary, the XENAPI_PASSWORD must be your dom0
-root password. And of course, use a real password if this machine is exposed.
+Step 3: Configure your localrc
+-----------------------------
+Devstack uses a localrc for user-specific configuration. Note that
+the XENAPI_PASSWORD must be your dom0 root password.
+Of course, use real passwords if this machine is exposed.
cd /root/devstack
@@ -37,15 +39,25 @@
SERVICE_TOKEN=my_super_secret
ADMIN_PASSWORD=my_super_secret
RABBIT_PASSWORD=my_super_secret
+ # This is the password for your guest (for both stack and root users)
+ GUEST_PASSWORD=my_super_secret
# IMPORTANT: The following must be set to your dom0 root password!
XENAPI_PASSWORD=my_super_secret
+ # Do not download the usual images yet!
+ IMAGE_URLS=""
EOF
-Run ./build_domU.sh
-------------------
+Step 4: Run ./build_domU.sh
+--------------------------
This script does a lot of stuff, it is probably best to read it in its entirety.
But in a nutshell, it performs the following:
* Configures bridges and vlans for public, private, and management nets
* Creates and installs a OpenStack all-in-one domU in an HA-FlatDHCP configuration
-** A script to create a multi-domU (ie. head node separated from compute) configuration is coming soon!
+* A script to create a multi-domU (ie. head node separated from compute) configuration is coming soon!
+
+Step 5: Do cloudy stuff!
+--------------------------
+* Play with dashboard
+* Play with the CLI
+* Log bugs to devstack and core projects, and submit fixes!
diff --git a/tools/xen/build_domU.sh b/tools/xen/build_domU.sh
index 97d2a27..24209c5 100755
--- a/tools/xen/build_domU.sh
+++ b/tools/xen/build_domU.sh
@@ -143,6 +143,7 @@
# Directory where our conf files are stored
FILES_DIR=$TOP_DIR/files
+TEMPLATES_DIR=$TOP_DIR/templates
# Directory for supporting script files
SCRIPT_DIR=$TOP_DIR/scripts
@@ -154,7 +155,7 @@
# Setup fake grub
rm -rf $STAGING_DIR/boot/grub/
mkdir -p $STAGING_DIR/boot/grub/
-cp $FILES_DIR/menu.lst.in $STAGING_DIR/boot/grub/menu.lst
+cp $TEMPLATES_DIR/menu.lst.in $STAGING_DIR/boot/grub/menu.lst
sed -e "s,@KERNEL_VERSION@,$KERNEL_VERSION,g" -i $STAGING_DIR/boot/grub/menu.lst
# Setup fstab, tty, and other system stuff
@@ -197,7 +198,7 @@
BUILD_NUMBER=${BUILD_NUMBER:-001}
LABEL="$PRODUCT_BRAND $PRODUCT_VERSION-$BUILD_NUMBER"
OVA=$STAGING_DIR/tmp/ova.xml
-cp templates/ova.xml.in $OVA
+cp $TEMPLATES_DIR/ova.xml.in $OVA
sed -e "s,@VDI_SIZE@,$VDI_SIZE,g" -i $OVA
sed -e "s,@PRODUCT_BRAND@,$PRODUCT_BRAND,g" -i $OVA
sed -e "s,@PRODUCT_VERSION@,$PRODUCT_VERSION,g" -i $OVA
@@ -222,8 +223,7 @@
# Run devstack on launch
cat <<EOF >$STAGING_DIR/etc/rc.local
-STAGING_DIR=/ DO_TGZ=0 bash /opt/stack/devstack/tools/xen/prepare_guest.sh
-STAGING_DIR=/ DO_TGZ=0 bash /opt/stack/devstack/tools/xen/prepare_guest.sh
+GUEST_PASSWORD=$GUEST_PASSWORD $STAGING_DIR=/ DO_TGZ=0 bash /opt/stack/devstack/tools/xen/prepare_guest.sh
su -c "/opt/stack/run.sh > /opt/stack/run.sh.log" stack
exit 0
EOF
@@ -262,7 +262,7 @@
# Configure the network
set_hostname $GUEST_NAME
INTERFACES=$STAGING_DIR/etc/network/interfaces
-cp templates/interfaces.in $INTERFACES
+cp $TEMPLATES_DIR/interfaces.in $INTERFACES
sed -e "s,@ETH1_NETMASK@,$VM_NETMASK,g" -i $INTERFACES
sed -e "s,@ETH2_IP@,$MGT_IP,g" -i $INTERFACES
sed -e "s,@ETH2_NETMASK@,$MGT_NETMASK,g" -i $INTERFACES
@@ -286,3 +286,15 @@
# Start guest
$TOP_DIR/scripts/install-os-vpx.sh -f $XVA -v $VM_BR -m $MGT_BR -p $PUB_BR
+
+echo "################################################################################"
+echo ""
+echo "All Finished!"
+echo "Now, you can monitor the progress of the stack.sh installation by "
+echo "tailing /opt/stack/run.sh.log from within your domU."
+echo ""
+echo "ssh into your domU now: 'ssh stack@$PUB_IP' using your password"
+echo "and then do: 'tail -f /opt/stack/run.sh.log'"
+echo ""
+echo "When the script completes, you can then visit the OpenStack Dashboard"
+echo "at http://$PUB_IP, and contact other services at the usual ports."
diff --git a/tools/xen/prepare_guest.sh b/tools/xen/prepare_guest.sh
index 41c5725..2f19b9d 100644
--- a/tools/xen/prepare_guest.sh
+++ b/tools/xen/prepare_guest.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# Configurable nuggets
-PASSWORD=${PASSWORD:-secrete}
+GUEST_PASSWORD=${GUEST_PASSWORD:-secrete}
STAGING_DIR=${STAGING_DIR:-stage}
DO_TGZ=${DO_TGZ:-1}
KERNEL_VERSION=3.0.0-12-virtual
@@ -46,7 +46,7 @@
# Make /etc/shadow, and set the root password
chroot $STAGING_DIR "pwconv"
-echo "root:$PASSWORD" | chroot $STAGING_DIR chpasswd
+echo "root:$GUEST_PASSWORD" | chroot $STAGING_DIR chpasswd
# Put the VPX into UTC.
rm -f $STAGING_DIR/etc/localtime
@@ -54,7 +54,7 @@
# Add stack user
chroot $STAGING_DIR groupadd libvirtd
chroot $STAGING_DIR useradd stack -s /bin/bash -d /opt/stack -G libvirtd
-echo stack:$PASSWORD | chroot $STAGING_DIR chpasswd
+echo stack:$GUEST_PASSWORD | chroot $STAGING_DIR chpasswd
echo "stack ALL=(ALL) NOPASSWD: ALL" >> $STAGING_DIR/etc/sudoers
# Give ownership of /opt/stack to stack user