Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
configuration
Commits
782f9c4d
Commit
782f9c4d
authored
Jul 07, 2016
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logging, make minor cleanups
parent
fcc07d6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
13 deletions
+29
-13
util/vagrant/upgrade.sh
+29
-13
No files found.
util/vagrant/
migrat
e.sh
→
util/vagrant/
upgrad
e.sh
View file @
782f9c4d
...
...
@@ -3,28 +3,44 @@
# Stop if any command fails
set
-e
# Logging: write all the output to a timestamped log file.
sudo
mkdir
-p
/var/log/edx
exec
>
>(
sudo
tee /var/log/edx/upgrade-
$(
date +%Y%m%d-%H%M%S
)
.log
)
2>&1
# defaults
CONFIGURATION
=
"none"
TARGET
=
"none"
INTERACTIVE
=
true
OPENEDX_ROOT
=
"/edx"
# Use this function to exit the script: it helps keep the output right with the
# exec-logging we started above.
exit_cleanly
()
{
sleep .25
echo
exit
$@
}
show_help
()
{
cat
<<
-
EOM
cat
<<
EOM
Migrates your Open edX installation to a different
release.
Upgrades your Open edX installation to a newer
release.
-c CONFIGURATION
Use the given configuration. Either
\"devstack\" or \"fullstack\
". You
Use the given configuration. Either
"devstack" or "fullstack
". You
must specify this.
-t TARGET
Migrate to the given git ref. You must specify this. Named releases are
called \"named-release/cypress\", \"named-release/dogwood.rc2\", and so on.
Upgrade to the given git ref. You must specify this. Named releases are
called "named-release/cypress", "named-release/dogwood.rc2", and so on.
-y
Run in non-interactive mode (reply \"yes\" to all questions)
Run in non-interactive mode (reply "yes" to all questions)
-r OPENEDX_ROOT
The root directory under which all Open edX applications are installed.
Defaults to \"
$OPENEDX_ROOT
\"
Defaults to "
$OPENEDX_ROOT
"
-h
Show this help and exit.
...
...
@@ -36,7 +52,7 @@ while getopts "hc:t:y" opt; do
case
"
$opt
"
in
h
)
show_help
exit
0
exit
_cleanly
0
;;
c
)
CONFIGURATION
=
$OPTARG
...
...
@@ -59,14 +75,14 @@ confirm_proceed () {
read
input
if
[[
"
$input
"
!=
"yes"
&&
"
$input
"
!=
"y"
]]
;
then
echo
"Quitting"
exit
1
exit
_cleanly
1
fi
}
# Check we are in the right place, and have the info we need.
if
[[
!
-d
/edx/app/edxapp
]]
;
then
echo
"Run this on your Open edX machine."
exit
1
exit
_cleanly
1
fi
if
[[
$TARGET
==
none
]]
;
then
...
...
@@ -76,12 +92,12 @@ you are currently running. This script can only move forward one release at
a time.
EOM
show_help
exit
1
exit
_cleanly
1
fi
if
[[
$CONFIGURATION
==
none
]]
;
then
echo
"You must specify a configuration, either fullstack or devstack."
exit
1
exit
_cleanly
1
fi
APPUSER
=
edxapp
...
...
@@ -269,4 +285,4 @@ fi
cd
/
sudo
rm
-rf
$TEMPDIR
echo
"
Migration
complete. Please reboot your machine."
echo
"
Upgrade
complete. Please reboot your machine."
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment