2.1. Open edX Hawthorn Release

This section describes how to install the Open edX Hawthorn release.

2.1.1. What’s Included in Hawthorn

The Open edX Hawthorn release contains several new features for learners, course teams, and developers. For more information, see the Open edX Release Notes.

2.1.1.1. User Retirement Feature

The Hawthorn release also includes the new user retirement feature, which is a set of APIs and tooling that enables Open edX instances to retire registered users. There have been many changes to privacy laws (for example, GDPR or the European Union General Data Protection Regulation) intended to change the way that businesses think about and handle Personally Identifiable Information (PII) data. The user retirement feature is a step toward enabling Open edX to support some of the key updates in privacy laws. For more information, see retirement.

2.1.2. What Is the Hawthorn Git Tag?

A git tag identifies the version of Open edX code that is the Hawthorn release. About two dozen repositories are tagged as part of an Open edX release. Many other repositories are installed as dependencies of those repositories. You can find the most up-to-date git tag for the current Open edX release on the Open edX Releases Wiki page.

2.1.3. Installing the Hawthorn Release

You can install the Open edX Hawthorn release using either Devstack or the the Open edX Native Installation instructions.

Hawthorn releases have git tag names like open-release/hawthorn.1. The available names are detailed on the Open edX Releases Wiki page.

2.1.4. Upgrading from the Ginkgo Release

The recommended approach to upgrading an existing installation of the Open edX Ginkgo release to the Hawthorn release is to make a fresh installation of the Hawthorn release on a new machine, and move your data and settings to it.

To move and upgrade your Ginkgo data onto a Hawthorn installation, follow these steps.

  1. Be sure that your Ginkgo installation is on the latest open-release/ginkgo.master. This ensures that your database is fully migrated and ready for upgrade to Hawthorn.

  2. Stop all services on the Ginkgo machine.

  3. Dump the data on the Ginkgo machine. Here’s an example script that will dump the MySQL and Mongo databases into a single .tgz file. The script will prompt for the MySQL and Mongo passwords as needed.

    #!/bin/bash
    MYSQL_CONN="-uroot -p"
    echo "Reading MySQL database names..."
    mysql ${MYSQL_CONN} -ANe "SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN ('mysql','information_schema','performance_schema')" > /tmp/db.txt
    DBS="--databases $(cat /tmp/db.txt)"
    NOW="$(date +%Y%m%dT%H%M%S)"
    SQL_FILE="mysql-data-${NOW}.sql"
    echo "Dumping MySQL structures..."
    mysqldump ${MYSQL_CONN} --add-drop-database --no-data ${DBS} > ${SQL_FILE}
    echo "Dumping MySQL data..."
    # If there is table data you don't need, add --ignore-table=tablename
    mysqldump ${MYSQL_CONN} --no-create-info ${DBS} >> ${SQL_FILE}
    
    for db in edxapp cs_comment_service_development; do
        echo "Dumping Mongo db ${db}..."
        mongodump -u admin -p -h localhost --authenticationDatabase admin -d ${db} --out mongo-dump-${NOW}
    done
    
    tar -czf openedx-data-${NOW}.tgz ${SQL_FILE} mongo-dump-${NOW}
    
  4. Copy the .tgz data file to the Hawthorn machine.

  5. Stop all services on the Hawthorn machine.

  6. Restore the Ginkgo data into the Hawthorn machine. As an example, you might use the following commands.

    $ tar -xvf openedx-data-20170811T154750.tgz
    $ mysql -uroot -p < mysql-data-20170811T154750.sql
    $ mongorestore -u admin -p -h localhost --authenticationDatabase admin --drop -d edxapp mongo-dump-20170811T154750/edxapp
    $ mongorestore -u admin -p -h localhost --authenticationDatabase admin --drop -d cs_comment_service mongo-dump-20170811T154750/cs_comment_service_development
    
  7. To migrate data from Ginkgo to Hawthorn, you need to drop the database tables used by djcelery. These tables should be empty in your Ginkgo data, so it is safe to drop them. The edx-platform application has a management command to check that they are empty and drop them:

    $ sudo su - -s /bin/bash edxapp
    edxapp@xyz:~$ . edxapp_env
    edxapp@xyz:~$ cd edx-platform/
    edxapp@xyz:~/edx-platform$ python manage.py lms drop_djcelery_tables --settings=aws
    
  8. Run the Hawthorn migrations, which will update your Ginkgo data to be valid for Ginkgo:

    $ /edx/app/edx_ansible/edx_ansible/util/install/sandbox.sh --tags migrate
    
  9. Copy your configuration files from the Ginkgo machine to the Hawthorn

    machine.

  10. Restart all services.

>> ANYTHING ABOUT DJANGO 1.11?

2.1.5. Upgrading to a Subsequent Hawthorn Release

Occasionally, we release updates to Hawthorn. For example, the second release of Hawthorn will be open-release/hawthorn.2. The steps to upgrade differ based on your original installation method.

2.1.5.1. Upgrading a Docker Installation

Devstack is installed using Docker. To upgrade from one Hawthorn release to another, follow the instructions in Updating Devstack.

2.1.5.2. Upgrading a Native Installation

If you installed Open edX using the Open edX Native Installation, you can upgrade from one Hawthorn release to another by re-running those steps using your desired Hawthorn tag as the new value for OPENEDX_RELEASE.