Skip to content

Commit c4cd414

Browse files
chmouelbcwaldon
authored andcommitted
Allow removing services explicitly.
- When adding a - (hyphen) at the begining of a service in ENABLED_SERVICES the service will be removed explicitly. Change-Id: I69ce082d13b79aa88426e8012a941c4ae99741f6
1 parent 6b93f82 commit c4cd414

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

stack.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ DEST=${DEST:-/opt/stack}
8989
# Sanity Check
9090
# ============
9191

92+
# We are looking for services with a - at the beginning to force
93+
# excluding those services. For example if you want to install all the default
94+
# services but not nova-volume (n-vol) you can have this set in your localrc :
95+
# ENABLED_SERVICES+=",-n-vol"
96+
for service in ${ENABLED_SERVICES//,/ }; do
97+
if [[ ${service} == -* ]]; then
98+
ENABLED_SERVICES=$(echo ${ENABLED_SERVICES}|sed -r "s/(,)?(-)?${service#-}(,)?/,/g")
99+
fi
100+
done
101+
92102
# Warn users who aren't on an explicitly supported distro, but allow them to
93103
# override check and attempt installation with ``FORCE=yes ./stack``
94104
if [[ ! ${DISTRO} =~ (oneiric|precise|quantal|f16) ]]; then

stackrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ RC_DIR=$(cd $(dirname "$BASH_SOURCE") && pwd)
66
# by default you can append them in your ENABLED_SERVICES variable in
77
# your localrc. For example for swift you can just add this in your
88
# localrc to add it with the other services:
9-
# ENABLED_SERVICES="$ENABLED_SERVICES,swift"
9+
# ENABLED_SERVICES+=,swift
10+
#
11+
# If you like to explicitly remove services you can add a -$service in
12+
# ENABLED_SERVICES, for example in your localrc to install all defaults but not
13+
# nova-volume you would just need to set this :
14+
# ENABLED_SERVICES+=,-n-vol
1015
ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,mysql,rabbit
1116

1217
# Set the default Nova APIs to enable

0 commit comments

Comments
 (0)