Skip to content

Commit 38df122

Browse files
committed
revive working with subset of services
Change-Id: I645c5df457a2ac2c997ac32720d53cacc0fa109b
1 parent f6c09ed commit 38df122

File tree

10 files changed

+84
-49
lines changed

10 files changed

+84
-49
lines changed

AUTHORS

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Andy Smith <github@anarkystic.com>
2+
Anthony Young <sleepsonthefloor@gmail.com>
3+
Brad Hall <brad@nicira.com>
4+
Chmouel Boudjnah <chmouel@chmouel.com>
5+
Dean Troyer <dtroyer@gmail.com>
6+
Devin Carlen <devin.carlen@gmail.com>
7+
Eddie Hebert <edhebert@gmail.com>
8+
Jake Dahn <admin@jakedahn.com>
9+
James E. Blair <james.blair@rackspace.com>
10+
Jason Cannavale <jason.cannavale@rackspace.com>
11+
Jay Pipes <jaypipes@gmail.com>
12+
Jesse Andrews <anotherjesse@gmail.com>
13+
Justin Shepherd <galstrom21@gmail.com>
14+
Scott Moser <smoser@ubuntu.com>
15+
Todd Willey <xtoddx@gmail.com>
16+
Tres Henry <tres@treshenry.net>
17+
Vishvananda Ishaya <vishvananda@gmail.com>
18+
Yun Mao <yunmao@gmail.com>

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Tool to quickly deploy openstack dev environments.
22

33
# Goals
44

5-
* To quickly build dev openstack environments in clean natty environments
5+
* To quickly build dev openstack environments in clean oneiric environments
66
* To describe working configurations of openstack (which code branches work together? what do config files look like for those branches?)
77
* To make it easier for developers to dive into openstack so that they can productively contribute without having to understand every part of the system at once
88
* To make it easy to prototype cross-project features
@@ -20,12 +20,6 @@ If working correctly, you should be able to access openstack endpoints, like:
2020
* Horizon: http://myhost/
2121
* Keystone: http://myhost:5000/v2.0/
2222

23-
# To start a dev cloud in an lxc container:
24-
25-
./build_lxc.sh
26-
27-
You will need to configure a bridge and network on your host machine (by default br0) before starting build_lxc.sh. A sample host-only network configuration can be found in lxc_network_hostonlyplusnat.sh.
28-
2923
# Customizing
3024

3125
You can tweak environment variables by creating file name 'localrc' should you need to override defaults. It is likely that you will need to do this to tweak your networking configuration should you need to access your cloud from a different host.

exercises/floating_ips.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ popd
3131
# returns a token and catalog of endpoints. We use python to parse the token
3232
# and save it.
3333

34-
TOKEN=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$NOVA_USERNAME\", \"password\": \"$NOVA_API_KEY\"}}}" -H "Content-type: application/json" http://$HOST_IP:5000/v2.0/tokens | python -c "import sys; import json; tok = json.loads(sys.stdin.read()); print tok['access']['token']['id'];"`
34+
TOKEN=`curl -s -d "{\"auth\":{\"passwordCredentials\": {\"username\": \"$NOVA_USERNAME\", \"password\": \"$NOVA_PASSWORD\"}}}" -H "Content-type: application/json" http://$HOST_IP:5000/v2.0/tokens | python -c "import sys; import json; tok = json.loads(sys.stdin.read()); print tok['access']['token']['id'];"`
3535

3636
# Launching a server
3737
# ==================

files/apts/horizon

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
apache2
2-
libapache2-mod-wsgi
1+
apache2 # NOPRIME
2+
libapache2-mod-wsgi # NOPRIME
33
python-dateutil
4+
python-paste
5+
python-pastedeploy
46
python-anyjson
57
python-routes
8+
python-xattr
9+
python-sqlalchemy
10+
python-webob
11+
python-kombu
12+
pylint
13+
pep8
14+
python-eventlet
15+
python-nose

files/apts/nova

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ parted
55
arping # used for send_arp_for_ha option in nova-network
66
mysql-server # NOPRIME
77
python-mysqldb
8+
python-xattr # needed for glance which is needed for nova --- this shouldn't be here
9+
python-lxml # needed for glance which is needed for nova --- this shouldn't be here
810
kvm
911
gawk
1012
iptables
@@ -36,8 +38,9 @@ python-suds
3638
python-lockfile
3739
python-m2crypto
3840
python-boto
41+
python-kombu
3942

4043
# Stuff for diablo volumes
41-
iscsitarget
42-
iscsitarget-dkms
44+
iscsitarget # NOPRIME
45+
iscsitarget-dkms # NOPRIME
4346
lvm2

files/pips/horizon

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
nose==1.0.0
21
Django==1.3
32
django-nose==0.1.2
43
django-mailer
54
django-registration==0.7
6-
kombu
75
python-cloudfiles
8-
python-dateutil
9-
webob
10-
sqlalchemy
11-
paste
12-
PasteDeploy
136
sqlalchemy-migrate
14-
eventlet
15-
xattr
16-
pep8
17-
pylint
187

198
-e git+https://github.com/jacobian/openstack.compute.git#egg=openstack
209

files/screenrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ hardstatus on
22
hardstatus alwayslastline
33
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G}%H %{..Y}%d/%m %c"
44

5-
defscrollback 1024
5+
defscrollback 10240
66

77
vbell off
88
startup_message off

openrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ export NOVA_PROJECT_ID=${TENANT:-demo}
1818
export NOVA_USERNAME=${USERNAME:-demo}
1919

2020
# With Keystone you pass the keystone password instead of an api key.
21-
export NOVA_API_KEY=${ADMIN_PASSWORD:-secrete}
21+
# The most recent versions of novaclient use NOVA_PASSWORD instead of NOVA_API_KEY
22+
export NOVA_PASSWORD=${ADMIN_PASSWORD:-secrete}
2223

2324
# With the addition of Keystone, to use an openstack cloud you should
2425
# authenticate against keystone, which returns a **Token** and **Service

stack.sh

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,22 @@
1010
# shared settings for common resources (mysql, rabbitmq) and build a multi-node
1111
# developer install.
1212

13-
# To keep this script simple we assume you are running on an **Ubuntu 11.04
14-
# Natty** machine. It should work in a VM or physical server. Additionally we
15-
# put the list of *apt* and *pip* dependencies and other configuration files in
16-
# this repo. So start by grabbing this script and the dependencies.
13+
# To keep this script simple we assume you are running on an **Ubuntu 11.10
14+
# Oneiric** machine. It should work in a VM or physical server. Additionally
15+
# we put the list of *apt* and *pip* dependencies and other configuration files
16+
# in this repo. So start by grabbing this script and the dependencies.
1717

1818
# Learn more and get the most recent version at http://devstack.org
1919

2020
# Sanity Check
2121
# ============
2222

23-
# Warn users who aren't on natty, but allow them to override check and attempt
23+
# Warn users who aren't on oneiric, but allow them to override check and attempt
2424
# installation with ``FORCE=yes ./stack``
2525
DISTRO=$(lsb_release -c -s)
2626

27-
if [[ ! ${DISTRO} =~ (natty|oneiric) ]]; then
28-
echo "WARNING: this script has only been tested on natty and oneiric"
27+
if [[ ! ${DISTRO} =~ (oneiric) ]]; then
28+
echo "WARNING: this script has only been tested on oneiric"
2929
if [[ "$FORCE" != "yes" ]]; then
3030
echo "If you wish to run this script anyway run with FORCE=yes"
3131
exit 1
@@ -66,10 +66,10 @@ fi
6666
# We try to have sensible defaults, so you should be able to run ``./stack.sh``
6767
# in most cases.
6868
#
69-
# We our settings from ``stackrc``. This file is distributed with devstack and
70-
# contains locations for what repositories to use. If you want to use other
71-
# repositories and branches, you can add your own settings with another file
72-
# called ``localrc``
69+
# We source our settings from ``stackrc``. This file is distributed with devstack
70+
# and contains locations for what repositories to use. If you want to use other
71+
# repositories and branches, you can add your own settings with another file called
72+
# ``localrc``
7373
#
7474
# If ``localrc`` exists, then ``stackrc`` will load those settings. This is
7575
# useful for changing a branch or repository to test other versions. Also you
@@ -113,7 +113,7 @@ if [[ $EUID -eq 0 ]]; then
113113
fi
114114

115115
echo "Giving stack user passwordless sudo priviledges"
116-
# natty uec images sudoers does not have a '#includedir'. add one.
116+
# some uec images sudoers does not have a '#includedir'. add one.
117117
grep -q "^#includedir.*/etc/sudoers.d" /etc/sudoers ||
118118
echo "#includedir /etc/sudoers.d" >> /etc/sudoers
119119
( umask 226 && echo "stack ALL=(ALL) NOPASSWD:ALL" \
@@ -384,7 +384,7 @@ fi
384384
function get_packages() {
385385
local file_to_parse="general"
386386
local service
387-
387+
388388
for service in ${ENABLED_SERVICES//,/ }; do
389389
if [[ $service == n-* ]]; then
390390
if [[ ! $file_to_parse =~ nova ]]; then
@@ -473,20 +473,26 @@ function git_clone {
473473
git_clone $NOVA_REPO $NOVA_DIR $NOVA_BRANCH
474474
# python client library to nova that horizon (and others) use
475475
git_clone $NOVACLIENT_REPO $NOVACLIENT_DIR $NOVACLIENT_BRANCH
476+
477+
# glance, swift middleware and nova api needs keystone middleware
478+
if [[ "$ENABLED_SERVICES" =~ "key" ||
479+
"$ENABLED_SERVICES" =~ "g-api" ||
480+
"$ENABLED_SERVICES" =~ "n-api" ||
481+
"$ENABLED_SERVICES" =~ "swift" ]]; then
482+
# unified auth system (manages accounts/tokens)
483+
git_clone $KEYSTONE_REPO $KEYSTONE_DIR $KEYSTONE_BRANCH
484+
fi
476485
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
477486
# storage service
478487
git_clone $SWIFT_REPO $SWIFT_DIR $SWIFT_BRANCH
479488
# swift + keystone middleware
480489
git_clone $SWIFT_KEYSTONE_REPO $SWIFT_KEYSTONE_DIR $SWIFT_KEYSTONE_BRANCH
481490
fi
482-
if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then
491+
if [[ "$ENABLED_SERVICES" =~ "g-api" ||
492+
"$ENABLED_SERVICES" =~ "n-api" ]]; then
483493
# image catalog service
484494
git_clone $GLANCE_REPO $GLANCE_DIR $GLANCE_BRANCH
485495
fi
486-
if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
487-
# unified auth system (manages accounts/tokens)
488-
git_clone $KEYSTONE_REPO $KEYSTONE_DIR $KEYSTONE_BRANCH
489-
fi
490496
if [[ "$ENABLED_SERVICES" =~ "n-vnc" ]]; then
491497
# a websockets/html5 or flash powered VNC console for vm instances
492498
git_clone $NOVNC_REPO $NOVNC_DIR $NOVNC_BRANCH
@@ -511,14 +517,18 @@ fi
511517

512518
# setup our checkouts so they are installed into python path
513519
# allowing ``import nova`` or ``import glance.client``
514-
if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
520+
if [[ "$ENABLED_SERVICES" =~ "key" ||
521+
"$ENABLED_SERVICES" =~ "g-api" ||
522+
"$ENABLED_SERVICES" =~ "n-api" ||
523+
"$ENABLED_SERVICES" =~ "swift" ]]; then
515524
cd $KEYSTONE_DIR; sudo python setup.py develop
516525
fi
517526
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
518527
cd $SWIFT_DIR; sudo python setup.py develop
519528
cd $SWIFT_KEYSTONE_DIR; sudo python setup.py develop
520529
fi
521-
if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then
530+
if [[ "$ENABLED_SERVICES" =~ "g-api" ||
531+
"$ENABLED_SERVICES" =~ "n-api" ]]; then
522532
cd $GLANCE_DIR; sudo python setup.py develop
523533
fi
524534
cd $NOVACLIENT_DIR; sudo python setup.py develop
@@ -596,6 +606,9 @@ fi
596606

597607
if [[ "$ENABLED_SERVICES" =~ "horizon" ]]; then
598608

609+
# Install apache2, which is NOPRIME'd
610+
apt_get install apache2 libapache2-mod-wsgi
611+
599612
# Horizon currently imports quantum even if you aren't using it. Instead
600613
# of installing quantum we can create a simple module that will pass the
601614
# initial imports
@@ -720,7 +733,7 @@ if [[ "$ENABLED_SERVICES" =~ "n-cpu" ]]; then
720733
# virtual machines. If there is a partition labeled nova-instances we
721734
# mount it (ext filesystems can be labeled via e2label).
722735
if [ -L /dev/disk/by-label/nova-instances ]; then
723-
if ! mount -n | grep -q nova-instances; then
736+
if ! mount -n | grep -q $NOVA_DIR/instances; then
724737
sudo mount -L nova-instances $NOVA_DIR/instances
725738
sudo chown -R `whoami` $NOVA_DIR/instances
726739
fi
@@ -876,7 +889,9 @@ if [[ "$ENABLED_SERVICES" =~ "n-vol" ]]; then
876889
# invoking stack.sh.
877890
#
878891
# By default, the backing file is 2G in size, and is stored in /opt/stack.
879-
#
892+
893+
apt_get install iscsitarget-dkms iscsitarget
894+
880895
if ! sudo vgdisplay | grep -q $VOLUME_GROUP; then
881896
VOLUME_BACKING_FILE=${VOLUME_BACKING_FILE:-$DEST/nova-volumes-backing-file}
882897
VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-2052M}
@@ -897,7 +912,6 @@ function add_nova_flag {
897912
# (re)create nova.conf
898913
rm -f $NOVA_DIR/bin/nova.conf
899914
add_nova_flag "--verbose"
900-
add_nova_flag "--nodaemon"
901915
add_nova_flag "--allow_admin_api"
902916
add_nova_flag "--scheduler_driver=$SCHEDULER"
903917
add_nova_flag "--dhcpbridge_flagfile=$NOVA_DIR/bin/nova.conf"
@@ -944,6 +958,12 @@ if [ "$SYSLOG" != "False" ]; then
944958
add_nova_flag "--use_syslog"
945959
fi
946960

961+
# You can define extra nova conf flags by defining the array EXTRA_FLAGS,
962+
# For Example: EXTRA_FLAGS=(--foo --bar=2)
963+
for I in "${EXTRA_FLAGS[@]}"; do
964+
add_nova_flag $i
965+
done
966+
947967
# XenServer
948968
# ---------
949969

stackrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ HORIZON_REPO=https://github.com/openstack/horizon.git
2727
HORIZON_BRANCH=stable/diablo
2828

2929
# python client library to nova that horizon (and others) use
30-
NOVACLIENT_REPO=https://github.com/rackspace/python-novaclient.git
30+
NOVACLIENT_REPO=https://github.com/openstack/python-novaclient.git
3131
NOVACLIENT_BRANCH=master
3232

3333
# openstackx is a collection of extensions to openstack.compute & nova

0 commit comments

Comments
 (0)