Commit 6de3a62c by John Jarvis

openid workaround needs to happen before the syncdb/migrate

parent 05bc61a4
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
# Ruby plays that need to be run after platform updates. # Ruby plays that need to be run after platform updates.
- name: gem | gem install bundler - name: gem | gem install bundler
shell: > shell: >
RBENV_ROOT={{ rbenv_root }} GEM_HOME={{ gem_home }} {{ rbenv_root }}/shims/gem install bundle RBENV_ROOT={{ rbenv_root }} GEM_HOME={{ gem_home }} {{ rbenv_root }}/shims/gem install bundle
chdir={{ edx_platform_code_dir }} chdir={{ edx_platform_code_dir }}
tags: tags:
- ruby - ruby
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
- name: bundle | bundle install - name: bundle | bundle install
shell: > shell: >
RBENV_ROOT={{ rbenv_root }} GEM_HOME={{ gem_home }} {{ gem_home }}/bin/bundle install --binstubs RBENV_ROOT={{ rbenv_root }} GEM_HOME={{ gem_home }} {{ gem_home }}/bin/bundle install --binstubs
chdir={{ edx_platform_code_dir }} chdir={{ edx_platform_code_dir }}
tags: tags:
- ruby - ruby
...@@ -129,8 +129,8 @@ ...@@ -129,8 +129,8 @@
# Install the python pre requirements into {{ venv_dir }} # Install the python pre requirements into {{ venv_dir }}
- name : install python pre-requirements - name : install python pre-requirements
pip: > pip: >
requirements="{{pre_requirements_file}}" requirements="{{pre_requirements_file}}"
virtualenv="{{venv_dir}}" virtualenv="{{venv_dir}}"
state=present state=present
extra_args="-i {{ PYPI_MIRROR_URL }}" extra_args="-i {{ PYPI_MIRROR_URL }}"
tags: tags:
...@@ -154,8 +154,8 @@ ...@@ -154,8 +154,8 @@
# Install the python post requirements into {{ venv_dir }} # Install the python post requirements into {{ venv_dir }}
- name : install python post-requirements - name : install python post-requirements
pip: > pip: >
requirements="{{post_requirements_file}}" requirements="{{post_requirements_file}}"
virtualenv="{{venv_dir}}" virtualenv="{{venv_dir}}"
state=present state=present
extra_args="-i {{ PYPI_MIRROR_URL }}" extra_args="-i {{ PYPI_MIRROR_URL }}"
tags: tags:
...@@ -201,6 +201,20 @@ ...@@ -201,6 +201,20 @@
- name: changing group ownership to www-data for everything in the venv (workaround) - name: changing group ownership to www-data for everything in the venv (workaround)
shell: chgrp -R www-data {{ venv_dir }} shell: chgrp -R www-data {{ venv_dir }}
# https://code.launchpad.net/~wligtenberg/django-openid-auth/mysql_fix/+merge/22726
# This is necessary for when syncdb is run and the django_openid_auth module is installed,
# not sure if this fix will ever get merged
# We should never do this in production
- name: openid workaround - NOT FOR PRODUCTION
shell: sed -i -e 's/claimed_id = models.TextField(max_length=2047, unique=True/claimed_id = models.TextField(max_length=2047/' /opt/edx/lib/python2.7/site-packages/django_openid_auth/models.py
when: openid_workaround is defined
tags:
- deploy
- lms
- lms-preview
- cms
- syncdb
- name: syncdb and migrate - name: syncdb and migrate
shell: sudo -u www-data SERVICE_VARIANT=lms /opt/edx/bin/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath=/opt/wwc/edx-platform shell: sudo -u www-data SERVICE_VARIANT=lms /opt/edx/bin/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath=/opt/wwc/edx-platform
when: migrate_db is defined and migrate_db|lower == "yes" when: migrate_db is defined and migrate_db|lower == "yes"
...@@ -219,7 +233,7 @@ ...@@ -219,7 +233,7 @@
- lms - lms
- lms-preview - lms-preview
- cms - cms
- migrate - migrate
# Gather lms assets using rake if possible # Gather lms assets using rake if possible
...@@ -250,20 +264,6 @@ ...@@ -250,20 +264,6 @@
- deploy - deploy
# https://code.launchpad.net/~wligtenberg/django-openid-auth/mysql_fix/+merge/22726
# This is necessary for when syncdb is run and the django_openid_auth module is installed,
# not sure if this fix will ever get merged
# We should never do this in production
- name: openid workaround - NOT FOR PRODUCTION
shell: sed -i -e 's/claimed_id = models.TextField(max_length=2047, unique=True/claimed_id = models.TextField(max_length=2047/' /opt/edx/lib/python2.7/site-packages/django_openid_auth/models.py
when: openid_workaround is defined
tags:
- deploy
- lms
- lms-preview
- cms
- syncdb
- name: restart edxapp - name: restart edxapp
service: name=edxapp state=restarted service: name=edxapp state=restarted
when: celery_worker is not defined when: celery_worker is not defined
......
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