revive working with subset of services

Change-Id: I645c5df457a2ac2c997ac32720d53cacc0fa109b
This commit is contained in:
Jesse Andrews 2011-11-20 09:55:44 -08:00
parent f6c09edf25
commit 38df1228de
10 changed files with 84 additions and 49 deletions

18
AUTHORS Normal file
View file

@ -0,0 +1,18 @@
Andy Smith <github@anarkystic.com>
Anthony Young <sleepsonthefloor@gmail.com>
Brad Hall <brad@nicira.com>
Chmouel Boudjnah <chmouel@chmouel.com>
Dean Troyer <dtroyer@gmail.com>
Devin Carlen <devin.carlen@gmail.com>
Eddie Hebert <edhebert@gmail.com>
Jake Dahn <admin@jakedahn.com>
James E. Blair <james.blair@rackspace.com>
Jason Cannavale <jason.cannavale@rackspace.com>
Jay Pipes <jaypipes@gmail.com>
Jesse Andrews <anotherjesse@gmail.com>
Justin Shepherd <galstrom21@gmail.com>
Scott Moser <smoser@ubuntu.com>
Todd Willey <xtoddx@gmail.com>
Tres Henry <tres@treshenry.net>
Vishvananda Ishaya <vishvananda@gmail.com>
Yun Mao <yunmao@gmail.com>

View file

@ -2,7 +2,7 @@ Tool to quickly deploy openstack dev environments.
# Goals
* To quickly build dev openstack environments in clean natty environments
* To quickly build dev openstack environments in clean oneiric environments
* To describe working configurations of openstack (which code branches work together? what do config files look like for those branches?)
* 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
* 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:
* Horizon: http://myhost/
* Keystone: http://myhost:5000/v2.0/
# To start a dev cloud in an lxc container:
./build_lxc.sh
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.
# Customizing
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.

View file

@ -31,7 +31,7 @@ popd
# returns a token and catalog of endpoints. We use python to parse the token
# and save it.
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'];"`
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'];"`
# Launching a server
# ==================

View file

@ -1,5 +1,15 @@
apache2
libapache2-mod-wsgi
apache2 # NOPRIME
libapache2-mod-wsgi # NOPRIME
python-dateutil
python-paste
python-pastedeploy
python-anyjson
python-routes
python-xattr
python-sqlalchemy
python-webob
python-kombu
pylint
pep8
python-eventlet
python-nose

View file

@ -5,6 +5,8 @@ parted
arping # used for send_arp_for_ha option in nova-network
mysql-server # NOPRIME
python-mysqldb
python-xattr # needed for glance which is needed for nova --- this shouldn't be here
python-lxml # needed for glance which is needed for nova --- this shouldn't be here
kvm
gawk
iptables
@ -36,8 +38,9 @@ python-suds
python-lockfile
python-m2crypto
python-boto
python-kombu
# Stuff for diablo volumes
iscsitarget
iscsitarget-dkms
iscsitarget # NOPRIME
iscsitarget-dkms # NOPRIME
lvm2

View file

@ -1,20 +1,9 @@
nose==1.0.0
Django==1.3
django-nose==0.1.2
django-mailer
django-registration==0.7
kombu
python-cloudfiles
python-dateutil
webob
sqlalchemy
paste
PasteDeploy
sqlalchemy-migrate
eventlet
xattr
pep8
pylint
-e git+https://github.com/jacobian/openstack.compute.git#egg=openstack

View file

@ -2,7 +2,7 @@ hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G}%H %{..Y}%d/%m %c"
defscrollback 1024
defscrollback 10240
vbell off
startup_message off

3
openrc
View file

@ -18,7 +18,8 @@ export NOVA_PROJECT_ID=${TENANT:-demo}
export NOVA_USERNAME=${USERNAME:-demo}
# With Keystone you pass the keystone password instead of an api key.
export NOVA_API_KEY=${ADMIN_PASSWORD:-secrete}
# The most recent versions of novaclient use NOVA_PASSWORD instead of NOVA_API_KEY
export NOVA_PASSWORD=${ADMIN_PASSWORD:-secrete}
# With the addition of Keystone, to use an openstack cloud you should
# authenticate against keystone, which returns a **Token** and **Service

View file

@ -10,22 +10,22 @@
# shared settings for common resources (mysql, rabbitmq) and build a multi-node
# developer install.
# To keep this script simple we assume you are running on an **Ubuntu 11.04
# 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.
# To keep this script simple we assume you are running on an **Ubuntu 11.10
# Oneiric** 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.
# Learn more and get the most recent version at http://devstack.org
# Sanity Check
# ============
# Warn users who aren't on natty, but allow them to override check and attempt
# Warn users who aren't on oneiric, but allow them to override check and attempt
# installation with ``FORCE=yes ./stack``
DISTRO=$(lsb_release -c -s)
if [[ ! ${DISTRO} =~ (natty|oneiric) ]]; then
echo "WARNING: this script has only been tested on natty and oneiric"
if [[ ! ${DISTRO} =~ (oneiric) ]]; then
echo "WARNING: this script has only been tested on oneiric"
if [[ "$FORCE" != "yes" ]]; then
echo "If you wish to run this script anyway run with FORCE=yes"
exit 1
@ -66,10 +66,10 @@ fi
# We try to have sensible defaults, so you should be able to run ``./stack.sh``
# in most cases.
#
# We our settings from ``stackrc``. This file is distributed with devstack and
# contains locations for what repositories to use. If you want to use other
# repositories and branches, you can add your own settings with another file
# called ``localrc``
# We source our settings from ``stackrc``. This file is distributed with devstack
# and contains locations for what repositories to use. If you want to use other
# repositories and branches, you can add your own settings with another file called
# ``localrc``
#
# If ``localrc`` exists, then ``stackrc`` will load those settings. This is
# useful for changing a branch or repository to test other versions. Also you
@ -113,7 +113,7 @@ if [[ $EUID -eq 0 ]]; then
fi
echo "Giving stack user passwordless sudo priviledges"
# natty uec images sudoers does not have a '#includedir'. add one.
# some uec images sudoers does not have a '#includedir'. add one.
grep -q "^#includedir.*/etc/sudoers.d" /etc/sudoers ||
echo "#includedir /etc/sudoers.d" >> /etc/sudoers
( umask 226 && echo "stack ALL=(ALL) NOPASSWD:ALL" \
@ -384,7 +384,7 @@ fi
function get_packages() {
local file_to_parse="general"
local service
for service in ${ENABLED_SERVICES//,/ }; do
if [[ $service == n-* ]]; then
if [[ ! $file_to_parse =~ nova ]]; then
@ -473,20 +473,26 @@ function git_clone {
git_clone $NOVA_REPO $NOVA_DIR $NOVA_BRANCH
# python client library to nova that horizon (and others) use
git_clone $NOVACLIENT_REPO $NOVACLIENT_DIR $NOVACLIENT_BRANCH
# glance, swift middleware and nova api needs keystone middleware
if [[ "$ENABLED_SERVICES" =~ "key" ||
"$ENABLED_SERVICES" =~ "g-api" ||
"$ENABLED_SERVICES" =~ "n-api" ||
"$ENABLED_SERVICES" =~ "swift" ]]; then
# unified auth system (manages accounts/tokens)
git_clone $KEYSTONE_REPO $KEYSTONE_DIR $KEYSTONE_BRANCH
fi
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
# storage service
git_clone $SWIFT_REPO $SWIFT_DIR $SWIFT_BRANCH
# swift + keystone middleware
git_clone $SWIFT_KEYSTONE_REPO $SWIFT_KEYSTONE_DIR $SWIFT_KEYSTONE_BRANCH
fi
if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then
if [[ "$ENABLED_SERVICES" =~ "g-api" ||
"$ENABLED_SERVICES" =~ "n-api" ]]; then
# image catalog service
git_clone $GLANCE_REPO $GLANCE_DIR $GLANCE_BRANCH
fi
if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
# unified auth system (manages accounts/tokens)
git_clone $KEYSTONE_REPO $KEYSTONE_DIR $KEYSTONE_BRANCH
fi
if [[ "$ENABLED_SERVICES" =~ "n-vnc" ]]; then
# a websockets/html5 or flash powered VNC console for vm instances
git_clone $NOVNC_REPO $NOVNC_DIR $NOVNC_BRANCH
@ -511,14 +517,18 @@ fi
# setup our checkouts so they are installed into python path
# allowing ``import nova`` or ``import glance.client``
if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
if [[ "$ENABLED_SERVICES" =~ "key" ||
"$ENABLED_SERVICES" =~ "g-api" ||
"$ENABLED_SERVICES" =~ "n-api" ||
"$ENABLED_SERVICES" =~ "swift" ]]; then
cd $KEYSTONE_DIR; sudo python setup.py develop
fi
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
cd $SWIFT_DIR; sudo python setup.py develop
cd $SWIFT_KEYSTONE_DIR; sudo python setup.py develop
fi
if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then
if [[ "$ENABLED_SERVICES" =~ "g-api" ||
"$ENABLED_SERVICES" =~ "n-api" ]]; then
cd $GLANCE_DIR; sudo python setup.py develop
fi
cd $NOVACLIENT_DIR; sudo python setup.py develop
@ -596,6 +606,9 @@ fi
if [[ "$ENABLED_SERVICES" =~ "horizon" ]]; then
# Install apache2, which is NOPRIME'd
apt_get install apache2 libapache2-mod-wsgi
# Horizon 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
@ -720,7 +733,7 @@ if [[ "$ENABLED_SERVICES" =~ "n-cpu" ]]; then
# virtual machines. If there is a partition labeled nova-instances we
# mount it (ext filesystems can be labeled via e2label).
if [ -L /dev/disk/by-label/nova-instances ]; then
if ! mount -n | grep -q nova-instances; then
if ! mount -n | grep -q $NOVA_DIR/instances; then
sudo mount -L nova-instances $NOVA_DIR/instances
sudo chown -R `whoami` $NOVA_DIR/instances
fi
@ -876,7 +889,9 @@ if [[ "$ENABLED_SERVICES" =~ "n-vol" ]]; then
# invoking stack.sh.
#
# By default, the backing file is 2G in size, and is stored in /opt/stack.
#
apt_get install iscsitarget-dkms iscsitarget
if ! sudo vgdisplay | grep -q $VOLUME_GROUP; then
VOLUME_BACKING_FILE=${VOLUME_BACKING_FILE:-$DEST/nova-volumes-backing-file}
VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-2052M}
@ -897,7 +912,6 @@ function add_nova_flag {
# (re)create nova.conf
rm -f $NOVA_DIR/bin/nova.conf
add_nova_flag "--verbose"
add_nova_flag "--nodaemon"
add_nova_flag "--allow_admin_api"
add_nova_flag "--scheduler_driver=$SCHEDULER"
add_nova_flag "--dhcpbridge_flagfile=$NOVA_DIR/bin/nova.conf"
@ -944,6 +958,12 @@ if [ "$SYSLOG" != "False" ]; then
add_nova_flag "--use_syslog"
fi
# You can define extra nova conf flags by defining the array EXTRA_FLAGS,
# For Example: EXTRA_FLAGS=(--foo --bar=2)
for I in "${EXTRA_FLAGS[@]}"; do
add_nova_flag $i
done
# XenServer
# ---------

View file

@ -27,7 +27,7 @@ HORIZON_REPO=https://github.com/openstack/horizon.git
HORIZON_BRANCH=stable/diablo
# python client library to nova that horizon (and others) use
NOVACLIENT_REPO=https://github.com/rackspace/python-novaclient.git
NOVACLIENT_REPO=https://github.com/openstack/python-novaclient.git
NOVACLIENT_BRANCH=master
# openstackx is a collection of extensions to openstack.compute & nova