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
4c9f8db0
Commit
4c9f8db0
authored
Feb 20, 2015
by
David Baumgold
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1859 from edx/db/birch-upgrade-scripts
Add a migration script for Birch
parents
9eafccb2
e5869004
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
100 additions
and
0 deletions
+100
-0
util/vagrant/migrate.sh
+100
-0
No files found.
util/vagrant/migrate.sh
0 → 100755
View file @
4c9f8db0
#!/usr/bin/env bash
# defaults
CONFIGURATION
=
"fullstack"
TARGET
=
"named-release/birch"
INTERACTIVE
=
true
read
-d
''
HELP_TEXT
<<-
EOM
Attempts to migrate your Open edX installation to a different release.
-c CONFIGURATION
Use the given configuration. Either \"devstack\" or \"fullstack\".
Defaults to \"
$CONFIGURATION
\"
-t TARGET
Migrate to the given git ref. Defaults to \"
$TARGET
\"
-y
Run in non-interactive mode (reply \"yes\" to all questions)
-h
Show this help and exit.
EOM
# override defaults with options
while
getopts
"hc:t:y"
opt
;
do
case
"
$opt
"
in
h
)
echo
"
$HELP_TEXT
"
exit
0
;;
c
)
CONFIGURATION
=
$OPTARG
;;
t
)
TARGET
=
$OPTARG
;;
y
)
INTERACTIVE
=
false
;;
esac
done
if
[[
$TARGET
==
*
birch
*
&&
$INTERACTIVE
==
true
]]
;
then
cat
<<
"EOM"
WARNING WARNING WARNING WARNING WARNING
The Birch release of Open edX depends on MySQL 5.6 and MongoDB 2.6.4.
The Aspen release of Open edX depended on MySQL 5.5 and MongoDB 2.4.7.
Please make sure that you have already upgraded MySQL and MongoDB
before continuing.
If MySQL or MongoDB are not at the correct version, this script will
attempt to automatically upgrade them
for
you. However, this process
can fail, and IT RUNS THE RISK OF CORRUPTING ALL YOUR DATA.
Here there be dragons.
.>
)
\;
`
a__
(
_ _
)
/ /-.
" ~~
`
(
)
_
)
/
<_ <_
Once you have verified that your MySQL and MongoDB versions are correct,
or you have decided to risk the automatic upgrade process,
type
"yes"
followed by enter to
continue
.
Otherwise, press ctrl-c to quit. You can
also run this script with the
-y
flag to skip this check.
Do you wish to proceed?
EOM
read
input
if
[
"
$input
"
!=
"yes"
-a
"
$input
"
!=
"y"
]
;
then
echo
"Quitting"
exit
1
fi
fi
if
[
-f
/edx/app/edx_ansible/server-vars.yml
]
;
then
SERVER_VARS
=
"--extra-vars=
\"
@/edx/app/edx_ansible/server-vars.yml
\"
"
fi
TEMPDIR
=
`
mktemp -d
`
chmod 777
$TEMPDIR
cd
$TEMPDIR
git clone https://github.com/edx/configuration.git
--depth
=
1
--single-branch
--branch
=
$TARGET
echo
"edx_platform_version:
$TARGET
"
>>
vars.yml
echo
"ora2_version:
$TARGET
"
>>
vars.yml
echo
"certs_version:
$TARGET
"
>>
vars.yml
echo
"forum_version:
$TARGET
"
>>
vars.yml
echo
"xqueue_version:
$TARGET
"
>>
vars.yml
cd
configuration/playbooks
sudo
/edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook
\
--inventory-file
=
localhost,
\
--connection
=
local
\
--extra-vars
=
\"
@../../vars.yml
\"
\
$SERVER_VARS
\
vagrant-
$CONFIGURATION
.yml
# if this failed, bail out early
exitcode
=
$?
if
[
$exitcode
!=
0
]
;
then
exit
$exitcode
;
fi
cd
/
rm
-rf
$TEMPDIR
echo
"Migration 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