| ... | ... |
@@ -109,7 +109,7 @@ fi |
| 109 | 109 |
|
| 110 | 110 |
|
| 111 | 111 |
# Global Settings |
| 112 |
-# =============== |
|
| 112 |
+# --------------- |
|
| 113 | 113 |
|
| 114 | 114 |
# Check for a ``localrc`` section embedded in ``local.conf`` and extract if |
| 115 | 115 |
# ``localrc`` does not already exist |
| ... | ... |
@@ -165,20 +165,11 @@ source $TOP_DIR/stackrc |
| 165 | 165 |
# Make sure the proxy config is visible to sub-processes |
| 166 | 166 |
export_proxy_variables |
| 167 | 167 |
|
| 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 |
- |
|
| 176 | 168 |
# Remove services which were negated in ENABLED_SERVICES |
| 177 | 169 |
# using the "-" prefix (e.g., "-rabbit") instead of |
| 178 | 170 |
# calling disable_service(). |
| 179 | 171 |
disable_negated_services |
| 180 | 172 |
|
| 181 |
- |
|
| 182 | 173 |
# Look for obsolete stuff |
| 183 | 174 |
if [[ ,${ENABLED_SERVICES}, =~ ,"swift", ]]; then
|
| 184 | 175 |
echo "FATAL: 'swift' is not supported as a service name" |
| ... | ... |
@@ -187,6 +178,8 @@ if [[ ,${ENABLED_SERVICES}, =~ ,"swift", ]]; then
|
| 187 | 187 |
exit 1 |
| 188 | 188 |
fi |
| 189 | 189 |
|
| 190 |
+# Set up logging level |
|
| 191 |
+VERBOSE=$(trueorfalse True $VERBOSE) |
|
| 190 | 192 |
|
| 191 | 193 |
# Configure sudo |
| 192 | 194 |
# -------------- |
| ... | ... |
@@ -209,8 +202,9 @@ chmod 0440 $TEMPFILE |
| 209 | 209 |
sudo chown root:root $TEMPFILE |
| 210 | 210 |
sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh |
| 211 | 211 |
|
| 212 |
-# Additional repos |
|
| 213 |
-# ---------------- |
|
| 212 |
+ |
|
| 213 |
+# Configure Distro Repositories |
|
| 214 |
+# ----------------------------- |
|
| 214 | 215 |
|
| 215 | 216 |
# For debian/ubuntu make apt attempt to retry network ops on it's own |
| 216 | 217 |
if is_ubuntu; then |
| ... | ... |
@@ -262,8 +256,12 @@ if [[ is_fedora && ( $DISTRO == "rhel6" || $DISTRO == "rhel7" ) ]]; then |
| 262 | 262 |
sudo yum-config-manager --enable ${OPTIONAL_REPO}
|
| 263 | 263 |
fi |
| 264 | 264 |
|
| 265 |
-# Filesystem setup |
|
| 266 |
-# ---------------- |
|
| 265 |
+ |
|
| 266 |
+# Configure Target Directories |
|
| 267 |
+# ---------------------------- |
|
| 268 |
+ |
|
| 269 |
+# Destination path for installation ``DEST`` |
|
| 270 |
+DEST=${DEST:-/opt/stack}
|
|
| 267 | 271 |
|
| 268 | 272 |
# Create the destination directory and ensure it is writable by the user |
| 269 | 273 |
# and read/executable by everybody for daemons (e.g. apache run for horizon) |
| ... | ... |
@@ -274,6 +272,12 @@ safe_chmod 0755 $DEST |
| 274 | 274 |
# a basic test for $DEST path permissions (fatal on error unless skipped) |
| 275 | 275 |
check_path_perm_sanity ${DEST}
|
| 276 | 276 |
|
| 277 |
+# Destination path for service data |
|
| 278 |
+DATA_DIR=${DATA_DIR:-${DEST}/data}
|
|
| 279 |
+sudo mkdir -p $DATA_DIR |
|
| 280 |
+safe_chown -R $STACK_USER $DATA_DIR |
|
| 281 |
+ |
|
| 282 |
+# Configure proper hostname |
|
| 277 | 283 |
# Certain services such as rabbitmq require that the local hostname resolves |
| 278 | 284 |
# correctly. Make sure it exists in /etc/hosts so that is always true. |
| 279 | 285 |
LOCAL_HOSTNAME=`hostname -s` |
| ... | ... |
@@ -281,11 +285,6 @@ if [ -z "`grep ^127.0.0.1 /etc/hosts | grep $LOCAL_HOSTNAME`" ]; then |
| 281 | 281 |
sudo sed -i "s/\(^127.0.0.1.*\)/\1 $LOCAL_HOSTNAME/" /etc/hosts |
| 282 | 282 |
fi |
| 283 | 283 |
|
| 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 |
- |
|
| 289 | 284 |
|
| 290 | 285 |
# Common Configuration |
| 291 | 286 |
# -------------------- |
| ... | ... |
@@ -337,6 +336,14 @@ SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-60}
|
| 337 | 337 |
SSL_BUNDLE_FILE="$DATA_DIR/ca-bundle.pem" |
| 338 | 338 |
rm -f $SSL_BUNDLE_FILE |
| 339 | 339 |
|
| 340 |
+# Import common services (database, message queue) configuration |
|
| 341 |
+source $TOP_DIR/lib/database |
|
| 342 |
+source $TOP_DIR/lib/rpc_backend |
|
| 343 |
+ |
|
| 344 |
+# Make sure we only have one rpc backend enabled, |
|
| 345 |
+# and the specified rpc backend is available on your platform. |
|
| 346 |
+check_rpc_backend |
|
| 347 |
+ |
|
| 340 | 348 |
|
| 341 | 349 |
# Configure Projects |
| 342 | 350 |
# ================== |