109109
110110
111111# Global Settings
112- # ===============
112+ # ---------------
113113
114114# Check for a ``localrc`` section embedded in ``local.conf`` and extract if
115115# ``localrc`` does not already exist
@@ -165,20 +165,11 @@ source $TOP_DIR/stackrc
165165# Make sure the proxy config is visible to sub-processes
166166export_proxy_variables
167167
168- # Destination path for installation ``DEST``
169- DEST=${DEST:-/ opt/ stack}
170-
171-
172- # Import common services (database, message queue) configuration
173- source $TOP_DIR /lib/database
174- source $TOP_DIR /lib/rpc_backend
175-
176168# Remove services which were negated in ENABLED_SERVICES
177169# using the "-" prefix (e.g., "-rabbit") instead of
178170# calling disable_service().
179171disable_negated_services
180172
181-
182173# Look for obsolete stuff
183174if [[ ,${ENABLED_SERVICES} , =~ ," swift" , ]]; then
184175 echo " FATAL: 'swift' is not supported as a service name"
@@ -187,6 +178,8 @@ if [[ ,${ENABLED_SERVICES}, =~ ,"swift", ]]; then
187178 exit 1
188179fi
189180
181+ # Set up logging level
182+ VERBOSE=$( trueorfalse True $VERBOSE )
190183
191184# Configure sudo
192185# --------------
@@ -209,8 +202,9 @@ chmod 0440 $TEMPFILE
209202sudo chown root:root $TEMPFILE
210203sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh
211204
212- # Additional repos
213- # ----------------
205+
206+ # Configure Distro Repositories
207+ # -----------------------------
214208
215209# For debian/ubuntu make apt attempt to retry network ops on it's own
216210if is_ubuntu; then
@@ -262,8 +256,12 @@ if [[ is_fedora && ( $DISTRO == "rhel6" || $DISTRO == "rhel7" ) ]]; then
262256 sudo yum-config-manager --enable ${OPTIONAL_REPO}
263257fi
264258
265- # Filesystem setup
266- # ----------------
259+
260+ # Configure Target Directories
261+ # ----------------------------
262+
263+ # Destination path for installation ``DEST``
264+ DEST=${DEST:-/ opt/ stack}
267265
268266# Create the destination directory and ensure it is writable by the user
269267# and read/executable by everybody for daemons (e.g. apache run for horizon)
@@ -274,18 +272,19 @@ safe_chmod 0755 $DEST
274272# a basic test for $DEST path permissions (fatal on error unless skipped)
275273check_path_perm_sanity ${DEST}
276274
275+ # Destination path for service data
276+ DATA_DIR=${DATA_DIR:- ${DEST} / data}
277+ sudo mkdir -p $DATA_DIR
278+ safe_chown -R $STACK_USER $DATA_DIR
279+
280+ # Configure proper hostname
277281# Certain services such as rabbitmq require that the local hostname resolves
278282# correctly. Make sure it exists in /etc/hosts so that is always true.
279283LOCAL_HOSTNAME=` hostname -s`
280284if [ -z " ` grep ^127.0.0.1 /etc/hosts | grep $LOCAL_HOSTNAME ` " ]; then
281285 sudo sed -i " s/\(^127.0.0.1.*\)/\1 $LOCAL_HOSTNAME /" /etc/hosts
282286fi
283287
284- # Destination path for service data
285- DATA_DIR=${DATA_DIR:- ${DEST} / data}
286- sudo mkdir -p $DATA_DIR
287- safe_chown -R $STACK_USER $DATA_DIR
288-
289288
290289# Common Configuration
291290# --------------------
@@ -337,6 +336,14 @@ SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-60}
337336SSL_BUNDLE_FILE=" $DATA_DIR /ca-bundle.pem"
338337rm -f $SSL_BUNDLE_FILE
339338
339+ # Import common services (database, message queue) configuration
340+ source $TOP_DIR /lib/database
341+ source $TOP_DIR /lib/rpc_backend
342+
343+ # Make sure we only have one rpc backend enabled,
344+ # and the specified rpc backend is available on your platform.
345+ check_rpc_backend
346+
340347
341348# Configure Projects
342349# ==================
0 commit comments