Migrating from Native Install to Tutor (juniper -> tutor 10.x)

Updated steps (new solution, missed a couple of steps)

Here are the steps I used to migrate from NativeInstall (Juniper) to Tutor

  1. Install tutor via pip in a venv.
    1.1 pip install tutor-openedx==v10.5.3
  2. Run tutor local quickstart
  3. wait for it to finish
  4. Have export of mongodb and mysql database ready from existing install ready
    4.1 Edit your mysql dump file:
    4.1.1 Add DROP DATABASE openedx; to the sql file above the CREATE DATABASE line
    4.1.2 Change CREATE DATABASE /*!32312 IF NOT EXISTS*/ edxapp /*!40100 DEFAULT CHARACTER SET utf8 */; to CREATE DATABASE /*!32312 IF NOT EXISTS*/ openedx /*!40100 DEFAULT CHARACTER SET utf8 */;
    4.1.3 Change USE edxapp; to USE openedx;
  5. Restored the mysql database
    5.1 docker exec -i tutor_local_mysql_1 sh -c 'exec mysql -uroot -p"PASSWORD"' < /home/user/mysql-data-20210504T110001.sql
  6. restore the mongodb (I didn’t have openedx mongodb after starting so just putting my edxapp db in place there)
    6.1 Copy mongodb backup to $TUTOR_ROOT/data/mongodb
    6.2 Run tutor local exec mongodb bash
    6.3 Run mongorestore -d openedx /data/db/edxapp/
    6.4 rm -r /data/db/edxapp
    6.5 Exit mongodb container
  7. Add the following here to successfully build the Juniper image.
  8. tutor images build openedx
  9. Copy Media from native install to tutor
    9.1 copy /edx/var/edxapp/media to $TUTOR_ROOT/data/openedx-media
  10. tutor local quickstart
  11. Wait for it to come up and login with your existing credentials
  12. If your site url changes login to the admin and update the Site URL so settings will match :slight_smile: / SAML settings as well if applicable

Upgrading to Latest Release of Tutor

  1. pip install --upgrade tutor-openedx
  2. tutor images build openedx
  3. tutor local upgrade (needed to run for mysql upgrade)
  4. tutor local quickstart
  5. Wait a while (got a 500 error while waiting for services to eventually come up)

Plugins I had to add

Enabling LTI

name: enable_lti
version: 0.1.0
patches:
 common-env-features: |
    "ENABLE_LTI_PROVIDER": true

SAML (Juniper)

name: saml
version: 0.1.0
patches:
 common-env-features: |
    "ENABLE_THIRD_PARTY_AUTH" : true

 openedx-lms-common-settings: |
    # saml special settings
    THIRD_PARTY_AUTH_BACKENDS = ["third_party_auth.saml.SAMLAuthBackend"]

 openedx-auth: |
    "SOCIAL_AUTH_SAML_SP_PRIVATE_KEY" : "{{ SAML_PRIVATE_KEY }}",
    "SOCIAL_AUTH_SAML_SP_PUBLIC_CERT" : "{{ SAML_PUBLIC_CERT }}"

SAML (Koa)

name: saml
version: 0.2.0
patches:
 common-env-features: |
    "ENABLE_THIRD_PARTY_AUTH" : true

 openedx-lms-common-settings: |
    # saml special settings
    THIRD_PARTY_AUTH_BACKENDS = ["common.djangoapps.third_party_auth.saml.SAMLAuthBackend"]


 openedx-auth: |
    "SOCIAL_AUTH_SAML_SP_PRIVATE_KEY" : "{{ SAML_PRIVATE_KEY }}",
    "SOCIAL_AUTH_SAML_SP_PUBLIC_CERT" : "{{ SAML_PUBLIC_CERT }}"

config.yml

I added SAML_PRIVATE_KEY and SAML_PUBLIC_CERT

4 Likes