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
edx
configuration
Commits
d2cfbec8
Commit
d2cfbec8
authored
9 years ago
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Plain Diff
Dogwood changes for master.
parents
1e7d6753
e17610a8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
191 additions
and
40 deletions
+191
-40
playbooks/roles/edxapp/defaults/main.yml
+5
-5
playbooks/roles/edxapp/tasks/service_variant_config.yml
+1
-1
playbooks/roles/mysql/defaults/main.yml
+1
-1
playbooks/vagrant/ansible.cfg
+7
-0
playbooks/vagrant/vagrant-devstack-delta.yml
+18
-0
playbooks/vagrant/vagrant-fullstack-delta.yml
+18
-0
util/vagrant/migrate.sh
+135
-33
vagrant/release/devstack/Vagrantfile
+3
-0
vagrant/release/fullstack/Vagrantfile
+3
-0
No files found.
playbooks/roles/edxapp/defaults/main.yml
View file @
d2cfbec8
...
...
@@ -415,11 +415,11 @@ EDXAPP_REGISTRATION_EXTRA_FIELDS:
EDXAPP_CELERY_WORKERS
:
-
queue
:
low
service_variant
:
cms
concurrency
:
3
concurrency
:
1
monitor
:
True
-
queue
:
default
service_variant
:
cms
concurrency
:
4
concurrency
:
1
monitor
:
True
-
queue
:
high
service_variant
:
cms
...
...
@@ -431,15 +431,15 @@ EDXAPP_CELERY_WORKERS:
monitor
:
True
-
queue
:
default
service_variant
:
lms
concurrency
:
3
concurrency
:
1
monitor
:
True
-
queue
:
high
service_variant
:
lms
concurrency
:
4
concurrency
:
1
monitor
:
True
-
queue
:
high_mem
service_variant
:
lms
concurrency
:
2
concurrency
:
1
monitor
:
False
max_tasks_per_child
:
1
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/edxapp/tasks/service_variant_config.yml
View file @
d2cfbec8
...
...
@@ -154,7 +154,7 @@
-
name
:
gather {{ item }} static assets with paver
command
:
"
{{
COMMON_BIN_DIR
}}/edxapp-update-assets-{{
item
}}"
when
:
celery_worker is not defined and not devstack and item != "lms-preview"
tags
:
gather_static_assets
with_items
:
service_variants_enabled
tags
:
-
gather_static_assets
-
assets
This diff is collapsed.
Click to expand it.
playbooks/roles/mysql/defaults/main.yml
View file @
d2cfbec8
...
...
@@ -2,4 +2,4 @@
mysql_debian_pkgs
:
-
software-properties-common
-
python-mysqldb
-
mysql-server
-
"
mysql-server=5.6.*"
This diff is collapsed.
Click to expand it.
playbooks/vagrant/ansible.cfg
0 → 100644
View file @
d2cfbec8
[defaults]
jinja2_extensions=jinja2.ext.do
host_key_checking = False
roles_path=../roles
callback_plugins=../callback_plugins
ansible_managed=This file is created and updated by ansible, edit at your peril
This diff is collapsed.
Click to expand it.
playbooks/vagrant/vagrant-devstack-delta.yml
0 → 100644
View file @
d2cfbec8
-
name
:
Update devstack to a specific intermediate revision
hosts
:
all
sudo
:
True
gather_facts
:
True
vars
:
devstack
:
true
openid_workaround
:
true
disable_edx_services
:
true
mongo_enable_journal
:
false
COMMON_MOTD_TEMPLATE
:
'
devstack_motd.tail.j2'
COMMON_SSH_PASSWORD_AUTH
:
"
yes"
EDXAPP_LMS_BASE
:
127.0.0.1:8000
EDXAPP_OAUTH_ENFORCE_SECURE
:
false
EDXAPP_LMS_BASE_SCHEME
:
http
roles
:
-
common
-
vhost
-
edxapp
This diff is collapsed.
Click to expand it.
playbooks/vagrant/vagrant-fullstack-delta.yml
0 → 100644
View file @
d2cfbec8
-
name
:
Update fullstack to a specific intermediate revision
hosts
:
all
sudo
:
True
gather_facts
:
True
vars
:
openid_workaround
:
true
disable_edx_services
:
true
mongo_enable_journal
:
false
COMMON_MOTD_TEMPLATE
:
'
devstack_motd.tail.j2'
COMMON_SSH_PASSWORD_AUTH
:
"
yes"
EDXAPP_LMS_BASE
:
127.0.0.1:8000
EDXAPP_OAUTH_ENFORCE_SECURE
:
false
EDXAPP_LMS_BASE_SCHEME
:
http
roles
:
-
common
-
vhost
-
edxapp
-
xqueue
This diff is collapsed.
Click to expand it.
util/vagrant/migrate.sh
View file @
d2cfbec8
#!/usr/bin/env bash
# Stop if any command fails
set
-e
# defaults
CONFIGURATION
=
"
fullstack
"
TARGET
=
"n
amed-release/cypress
"
CONFIGURATION
=
"
none
"
TARGET
=
"n
one
"
INTERACTIVE
=
true
OPENEDX_ROOT
=
"/edx"
read
-d
''
HELP_TEXT
<<-
EOM
Attempts to migrate your Open edX installation to a different release.
show_help
()
{
cat
<<-
EOM
Migrates your Open edX installation to a different release.
-c CONFIGURATION
Use the given configuration. Either \"devstack\" or \"fullstack\".
Defaults to \"
$CONFIGURATION
\"
Use the given configuration. Either \"devstack\" or \"fullstack\".
You
must specify this.
-t TARGET
Migrate to the given git ref. Defaults to \"
$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.
-y
Run in non-interactive mode (reply \"yes\" to all questions)
-r OPENEDX_ROOT
...
...
@@ -21,13 +27,15 @@ Attempts to migrate your Open edX installation to a different release.
Defaults to \"
$OPENEDX_ROOT
\"
-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
"
show_help
exit
0
;;
c
)
...
...
@@ -45,6 +53,45 @@ while getopts "hc:t:y" opt; do
esac
done
# Helper to ask to proceed.
confirm_proceed
()
{
echo
"Do you wish to proceed?"
read
input
if
[[
"
$input
"
!=
"yes"
&&
"
$input
"
!=
"y"
]]
;
then
echo
"Quitting"
exit
1
fi
}
# Check we are in the right place, and have the info we need.
if
[[
"
`
whoami
`
"
!=
"vagrant"
]]
;
then
echo
"Run this from the vagrant account in your Open edX machine."
exit
1
fi
if
[[
!
-d
/edx/app/edxapp
]]
;
then
echo
"Run this from the vagrant account in your Open edX machine."
exit
1
fi
if
[[
$TARGET
==
none
]]
;
then
cat
<<
"EOM"
You must specify a target. This should be the next named release after the one
you are currently running. This script can only move forward one release at
a time.
EOM
show_help
exit
1
fi
if
[[
$CONFIGURATION
==
none
]]
;
then
echo
"You must specify a configuration, either fullstack or devstack."
exit
1
fi
# Birch details
if
[[
$TARGET
==
*
birch
*
&&
$INTERACTIVE
==
true
]]
;
then
cat
<<
"EOM"
WARNING WARNING WARNING WARNING WARNING
...
...
@@ -68,15 +115,12 @@ 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
confirm_proceed
fi
# Cypress details
if
[[
$TARGET
==
*
cypress
*
&&
$INTERACTIVE
==
true
]]
;
then
cat
<<
"EOM"
WARNING WARNING WARNING WARNING WARNING
...
...
@@ -85,16 +129,12 @@ some problems in this migration. If so, check this webpage for solutions:
https://openedx.atlassian.net/wiki/display/OpenOPS/Potential+Problems+Migrating+from+Birch+to+Cypress
Do you wish to proceed?
EOM
read
input
if
[
"
$input
"
!=
"yes"
-a
"
$input
"
!=
"y"
]
;
then
echo
"Quitting"
exit
1
fi
confirm_proceed
fi
if
[[
$TARGET
==
*
cypress
*
]]
;
then
# Needed if transitioning to Cypress.
echo
"Killing all celery worker processes."
sudo
${
OPENEDX_ROOT
}
/bin/supervisorctl stop edxapp_worker:
*
&
sleep 3
...
...
@@ -109,34 +149,96 @@ if [[ $TARGET == *cypress* ]] ; then
sudo
-u
forum git
-C
${
OPENEDX_ROOT
}
/app/forum/.rbenv reset
--hard
fi
if
[
-f
/edx/app/edx_ansible/server-vars.yml
]
;
then
if
[
[
-f
/edx/app/edx_ansible/server-vars.yml
]
]
;
then
SERVER_VARS
=
"--extra-vars=
\"
@
${
OPENEDX_ROOT
}
/app/edx_ansible/server-vars.yml
\"
"
fi
make_config_venv
()
{
virtualenv venv
source
venv/bin/activate
pip install
-r
configuration/pre-requirements.txt
pip install
-r
configuration/requirements.txt
}
TEMPDIR
=
`
mktemp -d
`
echo
"Working in
$TEMPDIR
"
chmod 777
$TEMPDIR
cd
$TEMPDIR
git clone https://github.com/edx/configuration.git
--depth
=
1
--single-branch
--branch
=
$TARGET
virtualenv venv
source
venv/bin/activate
pip install
-r
configuration/requirements.txt
echo
"edx_platform_version:
$TARGET
"
>>
vars.yml
# Set the CONFIGURATION_TARGET environment variable to use a different branch
# in the configuration repo, defaults to $TARGET.
git clone https://github.com/edx/configuration.git
\
--depth
=
1
--single-branch
--branch
=
${
CONFIGURATION_TARGET
-
$TARGET
}
make_config_venv
# Dogwood details
if
[[
$TARGET
==
*
dogwood
*
]]
;
then
# We are upgrading Python from 2.7.3 to 2.7.10, so remake the venvs.
sudo
rm
-rf
/edx/app/
*
/v
*
envs/
*
echo
"Upgrading to the end of Django 1.4"
cd
configuration/playbooks/vagrant
sudo
ansible-playbook
\
--inventory-file
=
localhost,
\
--connection
=
local
\
$SERVER_VARS
\
--extra-vars
=
"edx_platform_version=release-2015-11-09"
\
--extra-vars
=
"xqueue_version=named-release/cypress"
\
--extra-vars
=
"migrate_db=yes"
\
--skip-tags
=
"edxapp-sandbox"
\
vagrant-
$CONFIGURATION
-delta
.yml
cd
../../..
# Remake our own venv because of the Python 2.7.10 upgrade.
rm
-rf
venv
make_config_venv
# Need to get rid of South from edx-platform, or things won't work.
sudo
-u
edxapp /edx/app/edxapp/venvs/edxapp/bin/pip uninstall
-y
South
echo
"Upgrading to the beginning of Django 1.8"
cd
configuration/playbooks/vagrant
sudo
ansible-playbook
\
--inventory-file
=
localhost,
\
--connection
=
local
\
$SERVER_VARS
\
--extra-vars
=
"edx_platform_version=dogwood-first-18"
\
--extra-vars
=
"xqueue_version=dogwood-first-18"
\
--extra-vars
=
"migrate_db=no"
\
--skip-tags
=
"edxapp-sandbox"
\
vagrant-
$CONFIGURATION
-delta
.yml
cd
../../..
echo
"Running the Django 1.8 faked migrations"
for
item
in
lms cms
;
do
sudo
-u
edxapp
\
/edx/app/edxapp/venvs/edxapp/bin/python
\
/edx/app/edxapp/edx-platform/manage.py
$item
migrate
\
--settings
=
aws
--noinput
--fake-initial
done
if
[[
$CONFIGURATION
==
fullstack
]]
;
then
sudo
-u
xqueue
\
SERVICE_VARIANT
=
xqueue
\
/edx/app/xqueue/venvs/xqueue/bin/python
\
/edx/app/xqueue/xqueue/manage.py migrate
\
--settings
=
xqueue.aws_settings
--noinput
--fake-initial
fi
fi
cd
configuration/playbooks
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
ansible-playbook
\
--inventory-file
=
localhost,
\
--connection
=
local
\
--extra-vars
=
\"
@../../vars.yml
\
"
\
--extra-vars
=
"@vars.yml
"
\
$SERVER_VARS
\
vagrant-
$CONFIGURATION
.yml
# if this failed, bail out early
exitcode
=
$?
if
[
$exitcode
!=
0
]
;
then
exit
$exitcode
;
fi
cd
/
sudo
rm
-rf
$TEMPDIR
echo
"Migration complete. Please reboot your machine."
This diff is collapsed.
Click to expand it.
vagrant/release/devstack/Vagrantfile
View file @
d2cfbec8
...
...
@@ -66,6 +66,9 @@ openedx_releases = {
"named-release/dogwood.rc2"
=>
{
:name
=>
"dogwood-devstack-rc2"
,
:file
=>
"20151221-dogwood-devstack-rc2.box"
,
},
"named-release/dogwood.rc3"
=>
{
:name
=>
"dogwood-devstack-rc2"
,
:file
=>
"20151221-dogwood-devstack-rc2.box"
,
},
"named-release/cypress"
=>
{
:name
=>
"cypress-devstack"
,
:file
=>
"cypress-devstack.box"
,
},
...
...
This diff is collapsed.
Click to expand it.
vagrant/release/fullstack/Vagrantfile
View file @
d2cfbec8
...
...
@@ -15,6 +15,9 @@ openedx_releases = {
"named-release/dogwood.rc2"
=>
{
:name
=>
"dogwood-fullstack-rc2"
,
:file
=>
"20151221-dogwood-fullstack-rc2.box"
,
},
"named-release/dogwood.rc3"
=>
{
:name
=>
"dogwood-fullstack-rc2"
,
:file
=>
"20151221-dogwood-fullstack-rc2.box"
,
},
"named-release/cypress"
=>
{
:name
=>
"cypress-fullstack"
,
:file
=>
"cypress-fullstack.box"
,
},
...
...
This diff is collapsed.
Click to expand it.
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