35 Commits

Author SHA1 Message Date
Vincent Untz
71ebc6ff65 Add is_package_installed function to know if a package is installed
This helps reduce the distro-dependent code in stack.sh, and also fixes
the bug where "rpm -qa | grep sudo" will work if gnome-sudoku is
installed.

Rebased

Change-Id: Ib1330b29b915b41d9724197edd791f0d4e0fe373
2012-09-09 17:40:19 -05:00
Vincent Untz
c0482e6efc Add contitional update package repositories to install_package()
This helps us ensure that we update the repositories only the first time
we need to install packages

Rebased and incorporated into install_package()

Change-Id: Id987aa7742f5d6807bc97eb6784cf18557c919d2
2012-09-09 14:12:52 -05:00
Jenkins
7d0810ec2a Merge "Add git_update_remote_branch to functions." 2012-09-08 05:42:19 +00:00
Dean Troyer
15733351ad Move screen_it() and screen_rc() to functions
Change-Id: I9b119e2c6d4d88a67d485f61662037984c2d9b15
2012-09-06 12:25:25 -05:00
Andrew Laski
f900bd7946 Add git_update_remote_branch to functions.
When $RECLONE=yes, and the branch specified for a project in stackrc is
a remote branch, the git_clone function would not recognize it as a
branch.  git_clone now attempts to recognize a remote branch and handle
it appropriately.

Change-Id: Ie23ff12eb5a7905088a9c2bb0ea2b02453ec0258
2012-09-05 17:31:00 -04:00
Dean Troyer
4a43b7bd90 Cosmetic, comment and text cleanups
* functions
* stack.sh
* stackrc
* unstack.sh

A recent commit to stack.sh broke the RST formatting done by shocco to
produce the HTML-formatted files on devstack.org.  A bunch of comment
and spacing fixes were done (ala pep8 if there were such a thing for
shell scripts).

The only non-comment changes made were to the content of some error
messages.

Fixes bug 1042271

Change-Id: Id1c74cf25c03c4f18ed741f8026e36b0d4a598dd
2012-08-28 21:12:47 -05:00
Dean Troyer
ca0e3d0230 Add tools/upload_image.sh
* moves the image upload logic from stack.sh to functions upload_image()
* tools/upload_image.sh which is a thin wrapper around upload_image()

Change-Id: I8746beebf50cf623b6fe903d6497e66e3fa5dda6
2012-08-17 12:12:46 -05:00
Jenkins
555767abbf Merge "Add ceilometer" 2012-08-17 14:58:15 +00:00
Jenkins
7b49598f7e Merge "Add git update tag support" 2012-08-16 17:20:22 +00:00
John H. Tran
93361643c6 Add ceilometer
Implements bug 1023972. Add mongodb and pymongo installation.

Change-Id: I631dc8a37f3269e55112ec5a5f375d3a2fd3a604
2012-08-14 13:29:22 -07:00
Jenkins
a8cdd355d2 Merge "Use default route to find HOST_IP" 2012-08-10 21:43:48 +00:00
Jenkins
ceaa75fdb3 Merge "support no_proxy environment variable" 2012-08-10 21:43:46 +00:00
Osamu Habuka
7abe4f24a3 support no_proxy environment variable
Change-Id: I5175f9752abe358cca0d2e3e5cf6d94605df451a
2012-07-31 13:49:34 +09:00
Vishvananda Ishaya
c9ad14bd38 Use default route to find HOST_IP
When running devstack, nova moves the host ip from eth0 onto the
bridge. This causes devstack to fail on the second run unless you
explicitly set HOST_IP in localrc.

This patch searches for an ip on the interface that is used for
the default route. This will be eth0 (or en0) in most cases, but
it will search br100 instead if nova has moved the ip, since it
moves the default route as well.

It also will filter out ips from the potential list that are part
of the fixed range and floating range if the netaddr library is
installed. This allows us to find the proper ip even if we have
accidentally left a floating ip or fixed ip on the bridge.

Change-Id: I13288e53ee2786c5ae0edb3f9ab457be8303f1f6
2012-07-30 15:28:41 -07:00
Monty Taylor
47f02060ad Optionally install all pip into a global venv.
This is useful for tracking what pip is causing to be
installed over and beyond os pacakges.

In support of this, move all package installation to before
the section where we install via pip. Leave the deferred configuration
until later though.

Change-Id: I89677fd54635e82b10ab674ddeb9ffb3f1a755f0
2012-07-26 13:18:40 -05:00
Jenkins
798da01906 Merge "Update info.sh" 2012-07-18 18:45:32 +00:00
Jenkins
b5a1f92b49 Merge "Allow user to override pip cache location" 2012-07-16 15:59:46 +00:00
Doug Hellmann
4d5e29d906 Allow user to override pip cache location
Building a VM containing devstack is faster if you can save
the cache files for pip in a location that is not deleted
when the VM is rebuilt. This change allows the user to
set the PIP_DOWNLOAD_CACHE in their localrc file to point
to any directory writable by root, including a directory
mounted from the host containing the VM.

Change-Id: I27179c1c212140d6734f6725f498be52fd18e9ed
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2012-07-13 11:11:50 -04:00
Evgeniy Afonichev
6a3912de85 Add git update tag support
Change-Id: I5ce1f05186d05b9cf0ccd74708af926ba054d2f0
2012-07-11 13:29:33 +03:00
Dean Troyer
a9e0a488cf Update info.sh
* Works properly on Fedora 17 now, possibly other RPM-based distros
* Add GetDistro() function taken from logic in stack.sh
* Source functions in tools/info.sh
* Use GetDistro() and get_packages() in tools/info.sh
* Report all installed pips
* Don't sort localrc output as order is important

Change-Id: I1b3e48e94786378c7313a0a6bea88d5cf9d0f0c0
2012-07-09 14:59:52 -05:00
Doug Hellmann
f04178fd12 add functions to manipulate ENABLED_SERVICES
Editing ENABLED_SERVICES directly can get tricky when
the user wants to disable something. This patch includes
two new functions for adding or removing services
safely, and a third (for completeness) to clear the
settings entirely before adding a minimal set of
services.

It also moves the logic for dealing with "negated"
services into a function so it can be tested and
applied by the new functions for manipulating
ENABLED_SERVICES.

Change-Id: I88f205f3666b86e6f0b6a94e0ec32a26c4bc6873
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
2012-07-06 15:52:06 -04:00
Dean Troyer
7e27051ccb Move get_packages() to functions.
This is a prerequisite to fixing the tools/build_uec* scripts to properly
install prereq packages.

Change-Id: I1c60f7b9a9d07076841d9aff524c0833dc987c66
2012-06-28 18:00:15 -05:00
James E. Blair
94cb960009 Add ERROR_ON_CLONE.
This lets the user assert that stack.sh should never need to clone
any git repositories.  If set to True, and devstack does need to
clone a git repo, stack.sh will exit with an error.

This is useful in testing environments to make sure that the correct
code is being tested instead of silently falling back on cloning
from the public repos.

Change-Id: Ic0312ab4df492c5cf2e04c08aa7669a81736daa6
2012-06-22 16:47:43 -07:00
Dean Troyer
67787e6b4c Add cinder support
* using the new functional pattern: cinder_XXX functions are in
  lib/cinder
* enable with 'c-api,c-sch,c-vol' in ENABLED_SERVICES, n-vol is still the default
* exercises/volumes.sh runs for cinder and n-vol
* move config to /etc/cinder
* change volume_group to stack-volumes; this also renames the backing file
  to /opt/stack/data/stack-volumes-backing-file.
* removes osapi_volume from nova.conf enabled_apis
* integrates cinder + keystone
* launches c-sch
* tweaks for multi node
* move enabled_apis substitution to init_cinder

18Jun2010
* restored & rebased
* update setup.py to use setup_develop() in lib/cinder

Change-Id: I1e1aa4387031c56e4fa239eb73bea2af8cef0e38
2012-06-20 14:11:19 -06:00
Jenkins
33bd721e88 Merge "Fix issues when working through an outbound proxy" 2012-06-14 20:08:32 +00:00
Dean Troyer
bbafb1b5b2 Fix issues when working through an outbound proxy
* reqork setup-develop() to handle proxy operations and empty dependency lists
* use keystone to get admin token (eliminate a direct curl invocation)
* check for cached image files of 0 bytes and re-download if needed

Change-Id: Ief356667ed3ef8d05c6604f12513ae81f68cec04
2012-06-11 16:53:44 -05:00
Chmouel Boudjnah
c7214e838e Use swift config files shipped with swift.
- Fixes bug 1004548.
- Add function iniuncomment.
- Trying to match the indent as the other stack.sh file.

Change-Id: I70339f7b4c0dd3ef8a018daecb2e1b3fb72c741b
2012-06-06 13:56:39 +02:00
Dean Troyer
5218d451dc E) Add support for Fedora 16
Highlights:
* Add files/rpms/*
* get_packages() only loads deps for services that are enabled

11Apr2012
* change mod_wsgi cwd to $HORIZON_DIR
* fix horizon apache log file name and location

Note: This superceeds https://review.openstack.org/4364

Change-Id: I95486584561e4418907a6a4feb0ffbe4f4ea1843
2012-04-11 14:55:47 -05:00
Dean Troyer
09e636e435 B) Use keystone config files from source; move to /etc/keystone
* Put all config files in /etc/keystone
* keystone.conf rewritten
* logging.conf.sample rewritten to logging.conf
* default_catalog.templates copied from devstack/files
* iniset() now properly adds options that do not previously exist

Fixed to re-configure the catalog templated backend; sql is the
default in trunk now but DevStack needs a bit more work before
it can use it.

Change-Id: Ic7060ef897e47495cd08ca3786e49fdebadf6723
2012-04-05 18:10:13 -05:00
Dean Troyer
13dc5ccd13 A) Add/move functions to 'functions' file
Add ini*() and tests
Add GetOSVersion()
Add install_package(), yum_install()
Add *_service()

Rebased

Change-Id: I570dba5ed4d2b988cdd1771cf6bed0aaf8e0fe27
2012-03-29 20:35:04 -05:00
Chmouel Boudjnah
408b009ccd Allow skipping exercises.
- Catch a special exit signal 55 to notify that we want to skip an
  excercise.
- Move is_enabled_service to functions.
- Fix bug 928390.

Change-Id: Iebf7a6f30a0f305a2a70173fb6b988bc07e34292
2012-03-28 11:34:51 +01:00
Dean Troyer
27e326995a Simplify die_if_error
* Replace die_if_error() with the simpler die()
* Attempt to clean up unnecessary trace output
* Formatting cleanups on all exercise scripts

Change-Id: I72a542b3a59ee9bf12bee6bcc605edd7579205e0
2012-03-19 10:06:15 -05:00
Dean Troyer
d0b21e2d19 Fix dependency list generation corner cases
* Handle empty install lists in apt_get() and pip_install()
* pip_install now uses get_packages() to get the dependency list

Fixes bug 948714

Change-Id: I174a60976df18c670eab2067edcd1871c51d07d6
2012-03-07 15:36:50 -06:00
Dean Troyer
489bd2a62b Improve exercise robustness
* Test returns and exit codes on most command invocations
* Add start and end banners to make output easier to find in
  long log files
* Adds die_if_error(), die_if_not_set() and is_set() to functions
* Add some function tests

Fixes bug 944593

Change-Id: I55e2962c5fec9aad237b674732b1e922ad37a62e
2012-03-02 17:55:37 -08:00
Dean Troyer
7f9aa71bce Extract common functions into a separate file
This is the start of an effort to organize devstack's code
to better document the requirements for configuring the individual
components.

Change-Id: I3476b76b9d1f9ee63687fb9898a98729118cbd84
2012-01-31 12:18:16 -06:00