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>
This commit is contained in:
Doug Hellmann
2012-07-05 17:10:03 -04:00
parent 08bc3048b1
commit f04178fd12
6 changed files with 178 additions and 11 deletions

View File

@@ -61,11 +61,12 @@ You can override environment variables used in `stack.sh` by creating file name
Swift is not installed by default, you can enable easily by adding this to your `localrc`:
ENABLED_SERVICE="$ENABLED_SERVICES,swift"
enable_service swift
If you want a minimal Swift install with only Swift and Keystone you can have this instead in your `localrc`:
ENABLED_SERVICES="key,mysql,swift"
disable_all_services
enable_service key mysql swift
If you use Swift with Keystone, Swift will authenticate against it. You will need to make sure to use the Keystone URL to auth against.