Skip to content

Commit da6d4c8

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Improve devstack docs for Xenserver"
2 parents 770cec7 + c56885a commit da6d4c8

File tree

5 files changed

+48
-11
lines changed

5 files changed

+48
-11
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Read more at http://devstack.org (built from the gh-pages branch)
1212

1313
IMPORTANT: Be sure to carefully read stack.sh and any other scripts you execute before you run them, as they install software and may alter your networking configuration. We strongly recommend that you run stack.sh in a clean and disposable vm when you are first getting started.
1414

15+
# Devstack on Xenserver
16+
17+
If you would like to use Xenserver as the hypervisor, please refer to the instructions in ./tools/xen/README.md.
18+
1519
# Versions
1620

1721
The devstack master branch generally points to trunk versions of OpenStack components. For older, stable versions, look for branches named stable/[release]. For example, you can do the following to create a diablo OpenStack cloud:

tools/xen/README.md

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ The purpose of the code in this directory it to help developers bootstrap
44
a XenServer 5.6 + Openstack development environment. This file gives
55
some pointers on how to get started.
66

7+
Xenserver is a Type 1 hypervisor, so it needs to be installed on bare metal.
8+
The Openstack services are configured to run within a "privileged" virtual
9+
machine on the Xenserver host (called OS domU). The VM uses the XAPI toolstack
10+
to communicate with the host.
11+
712
Step 1: Install Xenserver
813
------------------------
9-
Install XenServer 5.6 on a clean box. You can get XenServer by signing
14+
Install XenServer 5.6+ on a clean box. You can get XenServer by signing
1015
up for an account on citrix.com, and then visiting:
1116
https://www.citrix.com/English/ss/downloads/details.asp?downloadId=2311504&productId=683148
1217

18+
For details on installation, see: http://wiki.openstack.org/XenServer/Install
19+
1320
Here are some sample Xenserver network settings for when you are just
1421
getting started (I use settings like this with a lappy + cheap wifi router):
1522

@@ -18,24 +25,33 @@ getting started (I use settings like this with a lappy + cheap wifi router):
1825
* XenServer Gateway: 192.168.1.1
1926
* XenServer DNS: 192.168.1.1
2027

28+
Note:
29+
------
30+
It is advisable (and necessary if you are using Xenserver 6.0, due to space
31+
limitations), to create the above mentioned OS domU, on a separate dev machine.
32+
To do this, you will need to run Steps 2 on the dev machine (if required) as
33+
well as the Xenserver host. Steps 3 and 4 should be run on the dev machine.
34+
This process requires you to be root on the dev machine.
35+
2136
Step 2: Prepare DOM0
2237
-------------------
23-
At this point, your server is missing some critical software that you will
38+
At this point, your host is missing some critical software that you will
2439
need to run devstack (like git). Do this to install required software:
2540

26-
wget --no-check-certificate https://github.com/cloudbuilders/devstack/raw/xen/tools/xen/prepare_dom0.sh
41+
wget --no-check-certificate https://raw.github.com/openstack-dev/devstack/master/tools/xen/prepare_dom0.sh
2742
chmod 755 prepare_dom0.sh
2843
./prepare_dom0.sh
2944

30-
This script will also clone devstack in /root/devstack
45+
This step will also clone devstack in $DEVSTACKSRCROOT/devstack.
46+
$DEVSTACKSRCROOT=/root by default.
3147

3248
Step 3: Configure your localrc
3349
-----------------------------
3450
Devstack uses a localrc for user-specific configuration. Note that
3551
the XENAPI_PASSWORD must be your dom0 root password.
3652
Of course, use real passwords if this machine is exposed.
3753

38-
cat > /root/devstack/localrc <<EOF
54+
cat > $DEVSTACKSRCROOT/devstack/localrc <<EOF
3955
MYSQL_PASSWORD=my_super_secret
4056
SERVICE_TOKEN=my_super_secret
4157
ADMIN_PASSWORD=my_super_secret
@@ -52,16 +68,20 @@ Of course, use real passwords if this machine is exposed.
5268
MULTI_HOST=1
5369
# Give extra time for boot
5470
ACTIVE_TIMEOUT=45
71+
# Interface on which you would like to access services
72+
HOST_IP_IFACE=ethX
5573
EOF
5674

5775
Step 4: Run ./build_xva.sh
5876
--------------------------
59-
This script prpares your nova xva image. This script can be run on a separate machine
60-
and copied to dom0. If you run this on a different machine, copy the resulting xva
61-
file to tools/xen/xvas/[GUEST_NAME].xva (by default tools/xen/xvas/ALLINONE.xva)
77+
This script prepares your nova xva image. If you run this on a different machine,
78+
copy the resulting xva file to tools/xen/xvas/[GUEST_NAME].xva
79+
(by default tools/xen/xvas/ALLINONE.xva) on the Xenserver host.
6280

63-
It is likely that for XS6 you will need to build_xva.sh on a separate machine due
64-
to dom0 space constraints.
81+
cd $DEVSTACKSRCROOT/devstack/tools/xen
82+
./build_xva.sh
83+
84+
You will also need to copy your localrc to the Xenserver host.
6585

6686
Step 5: Run ./build_domU.sh
6787
--------------------------
@@ -72,6 +92,9 @@ But in a nutshell, it performs the following:
7292
* Creates and installs a OpenStack all-in-one domU in an HA-FlatDHCP configuration
7393
* A script to create a multi-domU (ie. head node separated from compute) configuration is coming soon!
7494

95+
cd $DEVSTACKSRCROOT/devstack/tools/xen
96+
./build_domU.sh
97+
7598
Step 6: Do cloudy stuff!
7699
--------------------------
77100
* Play with horizon

tools/xen/build_domU.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ if [ -z $PUB_BR ]; then
184184
fi
185185
$TOP_DIR/scripts/install-os-vpx.sh -f $XVA -v $VM_BR -m $MGT_BR -p $PUB_BR -l $GUEST_NAME -w -k "flat_network_bridge=${VM_BR}"
186186

187+
if [ $PUB_IP == "dhcp" ]; then
188+
PUB_IP=$(xe vm-list --minimal name-label=$GUEST_NAME params=networks | sed -ne 's,^.*3/ip: \([0-9.]*\).*$,\1,p')
189+
fi
190+
187191
# If we have copied our ssh credentials, use ssh to monitor while the installation runs
188192
WAIT_TILL_LAUNCH=${WAIT_TILL_LAUNCH:-1}
189193
if [ "$WAIT_TILL_LAUNCH" = "1" ] && [ -e ~/.ssh/id_rsa.pub ] && [ "$COPYENV" = "1" ]; then

tools/xen/build_xva.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,5 @@ if [ ! -e $XVA ]; then
187187
UID=0 $SCRIPT_DIR/mkxva -o $XVA -t xva -x $OVA $STAGING_DIR $VDI_MB /tmp/
188188
fi
189189

190-
echo "Built $XVA. If your dom0 is on a different machine, copy this to [devstackdir]/tools/xen/$XVA"
190+
echo "Built $(basename $XVA). If your dom0 is on a different machine, copy this to [devstackdir]/tools/xen/$(basename $XVA)"
191+
echo "Also copy your localrc to [devstackdir]"

tools/xen/prepare_dom0.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,8 @@ if ! which git; then
3434
make install
3535
fi
3636

37+
# Clone devstack
38+
DEVSTACK=${DEVSTACKROOT:/root/devstack}
39+
if [ ! -d $DEVSTACK ]; then
40+
git clone git://github.com/openstack-dev/devstack.git $DEVSTACK
41+
fi

0 commit comments

Comments
 (0)