Commit f8009104 by Zachary Robbins

Enabled ansible-playbook verbose output option. Usage updated.

parent 756be74c
...@@ -9,13 +9,11 @@ function usage ...@@ -9,13 +9,11 @@ function usage
--- install_devstack.sh --- --- install_devstack.sh ---
Usage: $ bash install_devstack.sh stack release [-p] [-b vagrant_mount_base] [-l log_level] [-h] Usage: $ bash install_devstack.sh stack release [-p] [-b vagrant_mount_base] [-l] [-v] [-h]
Installs the Open edX developer stack. More information on installing devstack Installs the Open edX devstack or fullstack. Reach out on the Open edX community Slack
can be found here: https://openedx.atlassian.net/wiki/display/OpenOPS/Running+Devstack. on #ops (https://open.edx.org/blog/open-edx-slack) or the Open edX Ops Google Group
Reach out on the Open edX community Slack on #ops (https://open.edx.org/blog/open-edx-slack) (https://groups.google.com/forum/#!forum/openedx-ops) to get support questions answered.
or the Open edX Ops Google Group (https://groups.google.com/forum/#!forum/openedx-ops) to
get support questions answered.
This script captures a log of all output produced during runtime, and saves it in a .log This script captures a log of all output produced during runtime, and saves it in a .log
file within the current directory. If you encounter an error during installation, this is file within the current directory. If you encounter an error during installation, this is
...@@ -48,8 +46,11 @@ function usage ...@@ -48,8 +46,11 @@ function usage
Customize the location of the source code that gets cloned during the Customize the location of the source code that gets cloned during the
devstack provisioning. devstack provisioning.
-l log_level -l
Log verbosity. 0 = no logging, 1 = full logs (default) Disable logging. Enabled by default.
-v
Verbose output from ansible playbooks.
-h -h
Show this help and exit. Show this help and exit.
...@@ -58,12 +59,11 @@ function usage ...@@ -58,12 +59,11 @@ function usage
EOM EOM
} }
# Allow for installation of fullstack, describe differences
#Remove directory for logs, allow for turning off logging, talk about logging in usage
# See if I can change verbosity of ansible-playbook commands in Vagrantfile using $EXTRA_VARS
# Logging # Logging
log_level=1 logging=1
# Output verbosity
verbosity=0
# OPENEDX_RELEASE # OPENEDX_RELEASE
release="" release=""
# Enable preview in Studio # Enable preview in Studio
...@@ -81,7 +81,7 @@ shift ...@@ -81,7 +81,7 @@ shift
release=$1 release=$1
shift shift
while getopts "r:pb:l:h" opt; do while getopts "pb:lvh" opt; do
case "$opt" in case "$opt" in
p) p)
enable_preview=1 enable_preview=1
...@@ -90,7 +90,14 @@ while getopts "r:pb:l:h" opt; do ...@@ -90,7 +90,14 @@ while getopts "r:pb:l:h" opt; do
vagrant_mount_location=$OPTARG vagrant_mount_location=$OPTARG
;; ;;
l) l)
log_level=$OPTARG logging=0
;;
v)
verbosity=1
;;
h)
usage
exit
;; ;;
*) *)
usage usage
...@@ -99,7 +106,7 @@ while getopts "r:pb:l:h" opt; do ...@@ -99,7 +106,7 @@ while getopts "r:pb:l:h" opt; do
esac esac
done done
if [[ $log_level == 1 ]]; then if [[ $logging > 0 ]]; then
exec > >(tee install-$(date +%Y%m%d-%H%M%S).log) 2>&1 exec > >(tee install-$(date +%Y%m%d-%H%M%S).log) 2>&1
echo "Logging enabled." echo "Logging enabled."
else else
...@@ -146,6 +153,11 @@ else # Throw error ...@@ -146,6 +153,11 @@ else # Throw error
exit 1 exit 1
fi fi
# Check for verbosity level
if [[ $verbosity == 1 ]]; then
sed -i '' 's/-e xqueue_version=\$OPENEDX_RELEASE/-e xqueue_version=\$OPENEDX_RELEASE \\\'$'\n -vvv/' Vagrantfile
fi
vagrant up --provider virtualbox vagrant up --provider virtualbox
# Check if preview mode was chosen # Check if preview mode was chosen
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment