Merge "xenapi: Extract plugin installation functions"
diff --git a/README.md b/README.md
index a738554..d8538c2 100644
--- a/README.md
+++ b/README.md
@@ -103,3 +103,51 @@
 If you are enabling `swift3` in `ENABLED_SERVICES` devstack will install the swift3 middleware emulation. Swift will be configured to act as a S3 endpoint for Keystone so effectively replacing the `nova-objectstore`.
 
 Only Swift proxy server is launched in the screen session all other services are started in background and managed by `swift-init` tool.
+
+# Quantum
+
+Basic Setup
+
+In order to enable Quantum a single node setup, you'll need the following settings in your `localrc` :
+
+    disable_service n-net
+    enable_service q-svc
+    enable_service q-agt
+    enable_service q-dhcp
+    enable_service q-l3
+    enable_service q-meta
+    enable_service quantum
+    # Optional, to enable tempest configuration as part of devstack
+    enable_service tempest
+
+Then run stack.sh as normal.
+
+If tempest has been successfully configured, a basic set of smoke tests can be run as follows:
+
+    $ cd /opt/stack/tempest
+    $ nosetests tempest/tests/network/test_network_basic_ops.py
+
+Multi-Node Setup
+
+A more interesting setup involves running multiple compute nodes, with Quantum networks connecting VMs on different compute nodes.
+You should run at least one "controller node", which should have a `stackrc` that includes at least:
+
+    disable_service n-net
+    enable_service q-svc
+    enable_service q-agt
+    enable_service q-dhcp
+    enable_service q-l3
+    enable_service q-meta
+    enable_service quantum
+
+You likely want to change your `localrc` to run a scheduler that will balance VMs across hosts:
+
+    SCHEDULER=nova.scheduler.simple.SimpleScheduler
+
+You can then run many compute nodes, each of which should have a `stackrc` which includes the following, with the IP address of the above controller node:
+
+    ENABLED_SERVICES=n-cpu,rabbit,g-api,quantum,q-agt
+    SERVICE_HOST=[IP of controller node]
+    MYSQL_HOST=$SERVICE_HOST
+    RABBIT_HOST=$SERVICE_HOST
+    Q_HOST=$SERVICE_HOST
diff --git a/lib/nova b/lib/nova
index 9809e62..4449f81 100644
--- a/lib/nova
+++ b/lib/nova
@@ -224,9 +224,9 @@
         # Get the sample configuration file in place
         cp $NOVA_DIR/etc/nova/api-paste.ini $NOVA_CONF_DIR
 
-        iniset $NOVA_API_PASTE_INI filter:authtoken auth_host $SERVICE_HOST
+        iniset $NOVA_API_PASTE_INI filter:authtoken auth_host $KEYSTONE_AUTH_HOST
         if is_service_enabled tls-proxy; then
-            iniset $NOVA_API_PASTE_INI filter:authtoken auth_protocol $SERVICE_PROTOCOL
+            iniset $NOVA_API_PASTE_INI filter:authtoken auth_protocol $KEYSTONE_AUTH_PROTOCOL
         fi
         iniset $NOVA_API_PASTE_INI filter:authtoken admin_tenant_name $SERVICE_TENANT_NAME
         iniset $NOVA_API_PASTE_INI filter:authtoken admin_user nova
@@ -355,7 +355,8 @@
         # ----------------
 
         # Nova stores each instance in its own directory.
-        mkdir -p $NOVA_INSTANCES_PATH
+        sudo mkdir -p $NOVA_INSTANCES_PATH
+        sudo chown -R $STACK_USER $NOVA_INSTANCES_PATH
 
         # You can specify a different disk to be mounted and used for backing the
         # virtual machines.  If there is a partition labeled nova-instances we
diff --git a/stackrc b/stackrc
index 34ccfa2..f35cdc0 100644
--- a/stackrc
+++ b/stackrc
@@ -20,7 +20,18 @@
 # screen tabs. To change the default list, use the ``enable_service`` and
 # ``disable_service`` functions in ``localrc``.
 # For example, to enable Swift add this to ``localrc``:
-# enable_service swift
+#  enable_service swift
+# In order to enable Quantum (a single node setup) add the following
+# settings in `` localrc``:
+#  disable_service n-net
+#  enable_service q-svc
+#  enable_service q-agt
+#  enable_service q-dhcp
+#  enable_service q-l3
+#  enable_service q-meta
+#  enable_service quantum
+#  # Optional, to enable tempest configuration as part of devstack
+#  enable_service tempest
 ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,rabbit,tempest,mysql
 
 # Set the default Nova APIs to enable