Bitnami Open edX Installer

NOTE: Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and Mac OS X) or by clicking the shortcut in the Start Menu under "Start -> Bitnami APPNAME Stack -> Application console" (Windows). Learn more.
NOTE: When running the commands shown on this page, replace the installdir placeholder with the full installation directory for your Bitnami stack.

Description

Open edX is an open source online learning platform used by universities and corporations around the world to deliver courses customized to meet the specific needs of their students.

First steps with the Open edX powered by Bitnami

Welcome to your new Bitnami application! Here are a few questions (and answers!) you might need when first starting with your application.

What are the system requirements?

Before you download and install your application, check that your system meets these requirements.

How do I install the Open edX powered by Bitnami?

  • Download the executable file for the Open edX powered by Bitnami from the Bitnami website.

  • Run the downloaded file:

    • Give the installer executable permissions and run the installation file in the console.

Check the FAQ instructions on how to download and install a Bitnami Stack for more details.

The application will be installed to the following default directory:

/opt/APPNAME-VERSION (running as *root* user)

What is the administrator username set for me to log in to the application for the first time?

  • The username was configured by you when you first installed the application.

What is the administrator password?

  • The password was configured by you when you first installed the application.

What components are included in the Open edX powered by Bitnami?

There are three major components included in the Open edX powered by Bitnami:

  • edX Platform: Centerpiece of the Open edX architecture. It contains the Learning Management System (LMS) and the Course Management System (CMS), Studio.
  • XQueue: IDA (Independently Deployed Application) that defines an interface for the LMS to communicate with external grader services.
  • Forum: IDA used by the LMS via API to integrate discussions into the learners' course experience.

There are other components included in the Stack which are required by the Open edX services such as RabbitMQ, MongoDB, MySQL, Memcached, Apache or Elasticsearch.

See Open edX architecture for more information about the Open edX structure.

Where to find the components included in Open edX Stack?

NOTE: This is the structure defined since Eucalyptus version.

Find the components mentioned before at:

  • edX platform: installdir/apps/edx.
  • XQueue: installdir/apps/xqueue.
  • Forum: installdir/apps/forum.

How to change the Open edX configuration?

Each component included in the Open edX Stack has its own configuration files:

  • The edX platform configuration files are located at installdir/apps/edx/conf/.
  • The XQueue configuration files are located at installdir/apps/xqueue/conf/.
  • The edX forum configuration files are located at installdir/apps/forum/conf/.
NOTE: Any modifications made in the configuration files will be loaded after restarting the Apache server.

How to access the different services in the Open edX Stack?

NOTE: Remember to replace the localhost placeholder in the examples below with the actual IP address of your (edX) server.

LMS

Access the edX LMS at http://localhost.

NOTE: Use HTTPS for secure connections: https://localhost.

Studio (CMS)

To access the edX Studio, browse to http://localhost/edx-studio which redirects you to the proper port where Studio is listening (by default, 18010).

Django Admin console

Access the Django Admin Console at http://127.0.0.1/admin.

How do the different services interact with each other in the Open edX Stack?

Services included in the Open edX Stack interact with each other in many different ways. This section describes how the services interact and how you can access them.

Forum and LMS

The LMS communicates with the Forum service through an API at http://localhost:18080 for integrating discussions into the learners' course experience.

NOTE: This API is only accessible via localhost.

Check the edX Comments Service/Forums official documentation for more information on this.

XQueue and LMS

The LMS can communicate with the XQueue through an HTTP POST request to the URL http://localhost/xqueue/submit. The XQueue pushes a response back to the LMS with an HTTP POST request to the callback URL.

XQueue and external graders

Passive graders wait for the XQueue to send them submissions. After that, they respond synchronously with a graded response. The basic workflow comprises the following stages:

  • The LMS sends messages to a particular queue.
  • XQueue checks its settings and finds that the queue has a URL associated with it. XQueue forwards the message to that URL.
  • The passive grader receives a POST request from the XQueue and responds synchronously with the graded response.
  • XQueue forwards the graded response to the callback URL the LMS provided in its original message.
NOTE: The Bitnami Open edX Stack does not include any passiver grader.

Active graders pull messages off the XQueue and push responses back to the XQueue. The basic workflow comprises the following stages:

  • The test sends messages to a particular queue.
  • The active grader polls the XQueue by using a REST-like interface. When it receives a submission, it pushes a response back to the XQueue, also using a REST-like interface.
  • XQueue pushes the response back to the LMS.

Check the XQueue official documentation for more information on this.

How to start or stop the services?

Linux

Bitnami native installers include a graphical tool to manage services. This tool is named manager-linux-x64.run on Linux and is located in the installation directory. To use this tool, double-click the file and then use the graphical interface to start, stop or restart services. Server log messages can be checked in the "Server Events" tab.

Management tool

The native installer also includes a command-line script to start, stop and restart applications, named ctlscript.sh. This script can be found in the installation directory and accepts the options start, stop, restart, and status. To use it, log in to the server console and execute it following the examples below:

  • Call it without any service names to start all services:

      $ sudo installdir/ctlscript.sh start
    
  • Use it to restart a specific service only by passing the service name as argument - for example, mysql, postgresql or apache:

      $ sudo installdir/ctlscript.sh restart mysql
      $ sudo installdir/ctlscript.sh restart postgresql
      $ sudo installdir/ctlscript.sh restart apache
    
  • Obtain current status of all services:

      $ installdir/ctlscript.sh status
    

The list of available services varies depending on the required components for each application.

How to change the default administrator password?

For security, it is recommended that you change the default administrator password as soon as possible. To do so, it is necessary to access the Django console. Follow the instructions below:

  • Go to http://localhost/admin to access the Django admin console. Log in as the administrative user. Enter the following credentials:

Access Django console

  • Once you have logged in to Django, click "Change Password" in the upper-right corner.

Change Django admin password

  • On the "password change" page, enter your old password and the new password you want to use. Click "Change my password" to save the changes.

Change Django admin password

TIP: If you have configured the SMTP settings, log in as an administrator and click the "Reset Password" link. An email will be sent to your account with the instructions to reset your password.

How to configure the edX server domain name?

The edX server domain name is the default IP address or domain name assigned when the edX server is launched. In order to configure a different domain name, follow the steps below:

  • Log in to the server console.
  • Change the server domain using the bnconfig configuration tool:
NOTE: Remember to replace the NEW_SERVER_DOMAIN placeholder in the example below with the new server domain name.
   $ sudo installdir/apps/edx/bnconfig --machine_hostname NEW_SERVER_DOMAIN
  • Rename or remove bnconfig configuration tool so that it does not change again at boot time:

    $ sudo mv installdir/apps/edx/bnconfig installdir/apps/edx/bnconfig.back
    

How to change the interface language?

Open edX uses Transifex, an open source translation platform, to power the translation of edX software into different languages. All translations are hosted at Transifex.com, which provides a web application allowing translators to write, submit, and manage their translations.

In order to change the language, follow the steps below:

  • Sign up and join the edX platform Transifex project as a translator. See the Transifex documentation for help with Transifex.

  • Create the ~/.transifexrc file and set your credentials as follows:

    [https://www.transifex.com]
    hostname = https://www.transifex.com
    username = USER
    password = PASS
    token =
    
NOTE: Remember to replace the USER and PASS placeholders in the previous example with your Transifex credentials.
  • Make sure that all languages you wish to download are present and uncommented in the installdir/apps/edx/edx-platform/conf/locale/config.yaml.

  • Set the value of the LANGUAGE_CODE variable to the language you desire (for example, set it to "es_es" to translate it to Spanish) in the configuration files:

    • installdir/apps/edx/conf/cms.env.json
    • installdir/apps/edx/conf/lms.env.json
    • installdir/apps/edx/edx-platform/lms/envs/common.py
  • Download the translations by running the commands below:

    $ cd installdir/apps/edx/edx-platform
    $ sudo installdir/apps/edx/bin/paver.edxapp i18n_robot_pull
    
  • Download the translation for the Forum by running the commands below:

    $ cd installdir/apps/forum/cs_comments_service
    $ bundle install --with test
    $ bundle exec bin/rake i18n:pull
    
  • Restart the Apache server to load the changes.

You can find more information at the Open edX Internationalization and localization wiki page.

How to access the administration panel?

Access the administration panel by browsing to http://localhost/edx-studio.

How to configure outbound email settings?

Custom SMTP account or Gmail

Follow these steps:

  • Log in to the server console.

  • Navigate to the installdir/apps/edx/conf directory.

  • Edit the files lms.env.json and cms.env.json and modify the lines below. For example, for a Gmail account, use the settings below. Replace USERNAME with your Gmail account username.

     "EMAIL_HOST": "smtp.gmail.com",
     "EMAIL_PORT": 587,
     "EMAIL_USE_TLS": true,
     "DEFAULT_FROM_EMAIL": "USERNAME@gmail.com",
    
  • Add the credentials to the lms.auth.json and cms.auth.json files. Replace USERNAME and PASSWORD with your Gmail account username and password respectively.

     "EMAIL_HOST": "smtp.gmail.com",
     "EMAIL_PORT": 587,
     "EMAIL_USE_TLS": true,
     "EMAIL_HOST_USER": "USERNAME@gmail.com",
     "EMAIL_HOST_PASSWORD": "PASSWORD",
    
  • Restart the Apache server to load the changes.

To configure the application to use other third-party SMTP services for outgoing email, such as SendGrid or Mandrill, refer to the FAQ.

Troubleshooting Gmail SMTP issues

If you are using Gmail as the outbound email server and you are not able to send email correctly, Google may be blocking sign-in attempts from your apps or devices. Depending on whether or not you use Google Apps, the steps to correct this will differ.

For Google Apps users

If you are a Google Apps user, you will need your administrator to allow users to change the policy for less secure apps. If you are a Google Apps administrator, follow these steps:

  • Browse to the Google Apps administration panel.

  • Click on "Security" and then "Basic settings".

  • Look for the section "Less secure apps" and then click on "Go to settings for less secure apps".

  • Select "Allow users to manage their access to less secure apps".

For other Google users

If you do not use Google Apps, follow the steps in the following sections, depending on whether 2-step verification has been enabled on the account or not.

If 2-step verification has not been enabled on the account, follow these steps:

  • Browse to the "Less secure apps" page and log in using the account you are having problems with. This option is typically required by many popular email clients, such as Outlook and Thunderbird, and should not be considered unsafe.

  • Select the "Turn on" option.

    Security settings

If 2-step verification has been enabled on the account, you have to generate an app password. Follow these steps:

  • Browse to the "App passwords" page.

  • Click "Select app" and choose the app you're using.

  • Click "Select device" and choose the device you're using.

  • Click the "Generate" button.

  • Enter the app password on your device.

  • Click the "Done" button.

Here are other options you may try:

  • Browse to the web version of Gmail and sign in to your account. Once you're signed in, try to enable access for the application again.

  • Browse to the "Unlock Captcha" function page and sign in with your Gmail username and password.

  • Disable IMAP from the Gmail web server interface and enable it again.

    IMAP settings

How to create a full backup of Open edX?

Backup

The Open edX powered by Bitnami is self-contained and the simplest option for performing a backup is to copy or compress the Bitnami stack installation directory. To do so in a safe manner, you will need to stop all servers, so this method may not be appropriate if you have people accessing the application continuously.

Follow these steps:

  • Change to the directory in which you wish to save your backup:

      $ cd /your/directory
    
  • Stop all servers using the graphical manager or the command-line script. Here's an example:

      $ sudo installdir/ctlscript.sh stop
    
  • Create a compressed file with the stack contents using the command below:

      $ sudo tar -pczvf application-backup.tar.gz installdir
    
  • Restart all servers using the graphical manager or the command-line script:

      $ sudo installdir/ctlscript.sh restart
    

You should now download or transfer the application-backup.tar.gz file to a safe location.

Restore

Follow these steps:

  • Change to the directory containing your backup:

      $ cd /your/directory
    
  • Stop all servers using the graphical manager or the command-line script. Here's an example:

      $ sudo installdir/ctlscript.sh stop
    
  • Move the current stack to a different location:

      $ sudo mv installdir /tmp/bitnami-backup
    
  • Uncompress the backup file to the original directory using the command below:

      $ sudo tar -pxzvf application-backup.tar.gz -C /
    
  • Start all servers using the graphical manager or the command-line script:

      $ sudo installdir/ctlscript.sh start
    
IMPORTANT: When restoring, remember to maintain the original permissions for the files and folders. For example, if you originally installed the stack as the root user, make sure that the restored files are owned by root as well.

If you want to create only a database backup, refer to these instructions for MySQL and MongoDB.

How to upgrade edX?

NOTE: Before proceeding to upgrade the Bitnami edX stack, ensure that you have performed a complete backup.
IMPORTANT: In order to upgrade any edX Ficus version to edX Ginkgo, you must first upgrade to edX Ficus.4

Upgrade edX Ficus.4 to Gingko

NOTE: This section assumes that you wish to upgrade to Ginkgo.2, but the steps below are valid for any Ginkgo version.

To upgrade edX Ficus.4 to Gingko.2, follow these steps:

  • Load the Bitnami stack environment, if it is not already loaded:

      $ sudo installdir/use_edx
      $ . installdir/scripts/setenv.sh
    
  • Stop all edX services:

      $ sudo installdir/ctlscript.sh stop
    
  • Install the GCC compiler.

    On Debian/Ubuntu, run the commands below:

      $ sudo apt-get update
      $ sudo apt-get install gcc g++
    

    On RHEL/CentOS, run the commands below:

      $ sudo yum group install "Development Tools"
    
  • Navigate to the application directory at installdir/apps/edx/edx-platform and save the current state of the Git repository:

      $ cd installdir/apps/edx/edx-platform
      $ git diff -- . ':!requirements' > ~/bitnami_edx-platform_changes.txt
    
  • Check out the Gingko.2 branch and apply the Bitnami changes to the Git repository:

      $ git fetch
      $ git checkout -f open-release/ginkgo.2
      $ git apply ~/bitnami_edx-platform_changes.txt
    
  • Install the necessary modules:

      $ npm install
    
  • Install edX's Python dependencies in this order:

      $ . ../venvs/edxapp/bin/activate
      $ pip install -r --exists-action=w requirements/edx/setuptools.txt
      $ pip install -r --exists-action=w requirements/edx/pre.txt
      $ pip install -r --exists-action=w requirements/edx/github.txt
      $ pip install -r --exists-action=w requirements/edx/local.txt
      $ pip install -r --exists-action=w requirements/edx/base.txt
      $ pip install -r --exists-action=w requirements/edx/paver.txt
      $ pip install -r --exists-action=w requirements/edx/post.txt
      $ deactivate
    
  • Install edX Sandbox's Python dependencies and fix ownerships:

      $ . ../venvs/edxapp-sandbox/bin/activate
      $ sudo pip install -r requirements/edx-sandbox/setuptools.txt
      $ sudo pip install -r requirements/edx-sandbox/base.txt --ignore-installed
      $ sudo pip install -r requirements/edx-sandbox/local.txt
      $ sudo pip install -r requirements/edx-sandbox/post.txt
      $ deactivate
      $ sudo chown -R sandbox:sandbox ../venvs/edxapp-sandbox/
    
  • Start databases:

      $ sudo installdir/ctlscript.sh start mysql
      $ sudo installdir/ctlscript.sh start mongodb
      $ sudo installdir/ctlscript.sh start memcached
      $ sudo installdir/ctlscript.sh start rabbitmq
      $ sudo installdir/ctlscript.sh start elasticsearch
    
  • Update edX assets. Note that this may take a significant amount of time for each step:

      $ ../bin/edxapp-update-assets-cms
      $ ../bin/edxapp-update-assets-lms
    
  • Drop the djcelery database tables:

      $ sudo ../bin/python.edxapp manage.py lms drop_djcelery_tables --settings=aws
    
  • Run edX migrations (this may also take some time):

      $ sudo ../bin/edxapp-migrate-cms
      $ sudo ../bin/edxapp-migrate-lms
    
  • Fix log file ownership:

      $ sudo chown -R daemon:daemon installdir/apps/edx/var/log
    
  • Edit the installdir/apps/edx/scripts/ctl-edx-celery-workers.sh script and replace this:

      start_worker() {
          ...
      }
    

    with this:

      start_worker() {
          EDX_HOME="installdir/apps/edx"
          cd $EDX_HOME/edx-platform
          APP=$(echo $1 | cut -d. -f2)
          ADDITIONAL_PARAMS=""
          if [ "$APP" = "cms" ]; then
              ADDITIONAL_PARAMS="-I contentstore.tasks"
          fi
          if [ `id|sed -e s/uid=//g -e s/\(.*//g` -eq 0 ]; then
              su -s /bin/sh daemon -c "$EDX_HOME/bin/python.edxapp ./manage.py $APP --settings=aws celery worker $ADDITIONAL_PARAMS --loglevel=info --queues=$1 --hostname=$1.%h --concurrency=$2 > $EDX_HOME/var/log/celery/$1.log 2>&1 &"
          else
              $EDX_HOME/bin/python.edxapp ./manage.py $APP --settings=aws celery worker $ADDITIONAL_PARAMS --loglevel=info --queues=$1 --hostname=$1.%h --concurrency=$2 > $EDX_HOME/var/log/celery/$1.log 2>&1 &
          fi
          cd - > /dev/null
      }
    
  • Edit the lms.env.json file and edit the CELERY_QUEUES section so that it looks like this:

      "CELERY_QUEUES": [
          "edx.lms.core.low",
          "edx.lms.core.default",
          "edx.lms.core.high",
          "edx.lms.core.high_mem"
      ],
      ...
    
  • Upgrade xqueue:

      $ cd installdir/apps/xqueue/xqueue
      $ git diff -- . ':!*requirements.txt' ':!xqueue/test_settings.py' > ~/bitnami_xqueue_changes.txt
      $ git fetch
      $ git checkout -f open-release/ginkgo.2
      $ git apply ~/bitnami_xqueue_changes.txt
    
  • Migrate and update users:

      $ sudo ../bin/django-admin.xqueue migrate --noinput
      $ sudo ../bin/django-admin.xqueue update_users
    
  • Upgrade the comments service:

      $ cd installdir/apps/forum/cs_comments_service
      $ git fetch
      $ git checkout -f open-release/ginkgo.2
      $ sed -i 's/^ruby ".*"$//' Gemfile
      $ bundle install
    
  • Start the remaining services:

      $ sudo installdir/ctlscript.sh start apache
      $ sudo installdir/ctlscript.sh start edx
      $ sudo installdir/ctlscript.sh start xqueue
    

Your Bitnami edX stack should now be upgraded to Gingko.2. Confirm that the upgrade was successful by logging into edX and verifying the integrity of your data.

Upgrade edX Ficus to Ficus.4

To upgrade edX Ficus to Ficus.4, follow these steps:

  • Load the Bitnami stack environment, if it is not already loaded:

      $ sudo installdir/use_edx
      $ . installdir/scripts/setenv.sh
    
  • Stop all edX services:

      $ sudo installdir/ctlscript.sh stop
    
  • Install the GCC compiler.

    On Debian/Ubuntu, run the commands below:

      $ sudo apt-get update
      $ sudo apt-get install gcc g++
    

    On RHEL/CentOS, run the commands below:

      $ sudo yum group install "Development Tools"
    
  • Navigate to the application directory at installdir/apps/edx/edx-platform and save the current state of the Git repository:

      $ cd installdir/apps/edx/edx-platform
      $ git diff -- . ':!requirements' > ~/bitnami_edx-platform_changes.txt
    
  • Check out the Ficus.4 branch and apply the Bitnami changes to the Git repository:

      $ git fetch
      $ git checkout -f open-release/ficus.4
      $ git apply ~/bitnami_edx-platform_changes.txt
    
  • Install the necessary modules:

      $ npm install
    
  • Install edX's Python dependencies in this order:

      $ . ../venvs/edxapp/bin/activate
      $ pip install -r --exists-action=w requirements/edx/setuptools.txt
      $ pip install -r --exists-action=w requirements/edx/pre.txt
      $ pip install -r --exists-action=w requirements/edx/github.txt
      $ pip install -r --exists-action=w requirements/edx/local.txt
      $ pip install -r --exists-action=w requirements/edx/base.txt
      $ pip install -r --exists-action=w requirements/edx/paver.txt
      $ pip install -r --exists-action=w requirements/edx/post.txt
      $ deactivate
    
  • Install edX Sandbox's Python dependencies and fix ownerships:

      $ . ../venvs/edxapp-sandbox/bin/activate
      $ sudo pip install -r requirements/edx-sandbox/setuptools.txt
      $ sudo pip install -r requirements/edx-sandbox/base.txt --ignore-installed
      $ sudo pip install -r requirements/edx-sandbox/local.txt
      $ sudo pip install -r requirements/edx-sandbox/post.txt
      $ deactivate
      $ sudo chown -R sandbox:sandbox ../venvs/edxapp-sandbox/
    
  • Start databases:

      $ sudo installdir/ctlscript.sh start mysql
      $ sudo installdir/ctlscript.sh start mongodb
      $ sudo installdir/ctlscript.sh start memcached
      $ sudo installdir/ctlscript.sh start rabbitmq
      $ sudo installdir/ctlscript.sh start elasticsearch
    
  • Update edX assets. Note that this may take a significant amount of time for each step:

      $ ../bin/edxapp-update-assets-cms
      $ ../bin/edxapp-update-assets-lms
    
  • Run edX migrations (this may also take some time):

      $ sudo ../bin/edxapp-migrate-cms
      $ sudo ../bin/edxapp-migrate-lms
    
  • Fix log file ownership:

      $ sudo chown -R daemon:daemon installdir/apps/edx/var/log
    
  • Edit the installdir/apps/edx/scripts/ctl-edx-celery-workers.sh script and replace this:

      start_worker() {
          ...
      }
    

    with this:

      start_worker() {
          EDX_HOME="installdir/apps/edx"
          cd $EDX_HOME/edx-platform
          APP=$(echo $1 | cut -d. -f2)
          ADDITIONAL_PARAMS=""
          if [ "$APP" = "cms" ]; then
              ADDITIONAL_PARAMS="-I contentstore.tasks"
          fi
          if [ `id|sed -e s/uid=//g -e s/\(.*//g` -eq 0 ]; then
              su -s /bin/sh daemon -c "$EDX_HOME/bin/python.edxapp ./manage.py $APP --settings=aws celery worker $ADDITIONAL_PARAMS --loglevel=info --queues=$1 --hostname=$1.%h --concurrency=$2 > $EDX_HOME/var/log/celery/$1.log 2>&1 &"
          else
              $EDX_HOME/bin/python.edxapp ./manage.py $APP --settings=aws celery worker $ADDITIONAL_PARAMS --loglevel=info --queues=$1 --hostname=$1.%h --concurrency=$2 > $EDX_HOME/var/log/celery/$1.log 2>&1 &
          fi
          cd - > /dev/null
      }
    
  • Edit the lms.env.json file and edit the CELERY_QUEUES section so that it looks like this:

      "CELERY_QUEUES": [
          "edx.lms.core.low",
          "edx.lms.core.default",
          "edx.lms.core.high",
          "edx.lms.core.high_mem"
      ],
    
  • Start remaining services:

      $ sudo installdir/ctlscript.sh start apache
      $ sudo installdir/ctlscript.sh start edx
    

Your Bitnami edX stack should now be upgraded to Ficus.4. Confirm that the upgrade was successful by logging into edX and verifying the integrity of your data.

How to create an SSL certificate?

OpenSSL is required to create an SSL certificate. A certificate request can then be sent to a certificate authority (CA) to get it signed into a certificate, or if you have your own certificate authority, you may sign it yourself, or you can use a self-signed certificate (because you just want a test certificate or because you are setting up your own CA).

Follow the steps below for your platform.

Linux and Mac OS X

NOTE: OpenSSL will typically already be installed on Linux and Mac OS X. If not installed, install it manually using your operating system's package manager.

Follow the steps below:

  • Generate a new private key:

     $ sudo openssl genrsa -out installdir/apache2/conf/server.key 2048
    
  • Create a certificate:

     $ sudo openssl req -new -key installdir/apache2/conf/server.key -out installdir/apache2/conf/cert.csr
    
    IMPORTANT: Enter the server domain name when the above command asks for the "Common Name".
  • Send cert.csr to the certificate authority. When the certificate authority completes their checks (and probably received payment from you), they will hand over your new certificate to you.

  • Until the certificate is received, create a temporary self-signed certificate:

     $ sudo openssl x509 -in installdir/apache2/conf/cert.csr -out installdir/apache2/conf/server.crt -req -signkey installdir/apache2/conf/server.key -days 365
    
  • Back up your private key in a safe location after generating a password-protected version as follows:

     $ sudo openssl rsa -des3 -in installdir/apache2/conf/server.key -out privkey.pem
    

    Note that if you use this encrypted key in the Apache configuration file, it will be necessary to enter the password manually every time Apache starts. Regenerate the key without password protection from this file as follows:

     $ sudo openssl rsa -in privkey.pem -out installdir/apache2/conf/server.key
    

Windows

NOTE: OpenSSL is not typically installed on Windows. Before following the steps below, download and install a binary distribution of OpenSSL.

Follow the steps below once OpenSSL is installed:

  • Set the OPENSSL_CONF environment variable to the location of your OpenSSL configuration file. Typically, this file is located in the bin/ subdirectory of your OpenSSL installation directory. Replace the OPENSSL-DIRECTORY placeholder in the command below with the correct location.

     $ set OPENSSL_CONF=C:\OPENSSL-DIRECTORY\bin\openssl.cfg
    
  • Change to the bin/ sub-directory of the OpenSSL installation directory. Replace the OPENSSL-DIRECTORY placeholder in the command below with the correct location.

     $ cd C:\OPENSSL-DIRECTORY\bin
    
  • Generate a new private key:

     $ openssl genrsa -out installdir/apache2/conf/server.key 2048
    
  • Create a certificate:

     $ openssl req -new -key installdir/apache2/conf/server.key -out installdir/apache2/conf/cert.csr
    
    IMPORTANT: Enter the server domain name when the above command asks for the "Common Name".
  • Send cert.csr to the certificate authority. When the certificate authority completes their checks (and probably received payment from you), they will hand over your new certificate to you.

  • Until the certificate is received, create a temporary self-signed certificate:

     $ openssl x509 -in installdir/apache2/conf/cert.csr -out installdir/apache2/conf/server.crt -req -signkey installdir/apache2/conf/server.key -days 365
    
  • Back up your private key in a safe location after generating a password-protected version as follows:

     $ openssl rsa -des3 -in installdir/apache2/conf/server.key -out privkey.pem
    

    Note that if you use this encrypted key in the Apache configuration file, it will be necessary to enter the password manually every time Apache starts. Regenerate the key without password protection from this file as follows:

     $ openssl rsa -in privkey.pem -out installdir/apache2/conf/server.key
    

Find more information about certificates at http://www.openssl.org.

How to enable HTTPS support with SSL certificates?

NOTE: The steps below assume that you are using a custom domain name and that you have already configured the custom domain name to point to your cloud server.

Bitnami images come with SSL support already pre-configured and with a dummy certificate in place. Although this dummy certificate is fine for testing and development purposes, you will usually want to use a valid SSL certificate for production use. You can either generate this on your own (explained here) or you can purchase one from a commercial certificate authority.

Once you obtain the certificate and certificate key files, you will need to update your server to use them. Follow these steps to activate SSL support:

  • Use the table below to identify the correct locations for your certificate and configuration files.

    Variable Value
    Current application URL https://[custom-domain]/
      Example: https://my-domain.com/ or https://my-domain.com/appname
    Apache configuration file installdir/apache2/conf/bitnami/bitnami.conf
    Certificate file installdir/apache2/conf/server.crt
    Certificate key file installdir/apache2/conf/server.key
    CA certificate bundle file (if present) installdir/apache2/conf/server-ca.crt
  • Copy your SSL certificate and certificate key file to the specified locations.

    NOTE: If you use different names for your certificate and key files, you should reconfigure the SSLCertificateFile and SSLCertificateKeyFile directives in the corresponding Apache configuration file to reflect the correct file names.
  • If your certificate authority has also provided you with a PEM-encoded Certificate Authority (CA) bundle, you must copy it to the correct location in the previous table. Then, modify the Apache configuration file to include the following line below the SSLCertificateKeyFile directive. Choose the correct directive based on your scenario and Apache version:

    Variable Value
    Apache configuration file installdir/apache2/conf/bitnami/bitnami.conf
    Directive to include (Apache v2.4.8+) SSLCACertificateFile "installdir/apache2/conf/server-ca.crt"
    Directive to include (Apache < v2.4.8) SSLCertificateChainFile "installdir/apache2/conf/server-ca.crt"
    NOTE: If you use a different name for your CA certificate bundle, you should reconfigure the SSLCertificateChainFile or SSLCACertificateFile directives in the corresponding Apache configuration file to reflect the correct file name.
  • Once you have copied all the server certificate files, you may make them readable by the root user only with the following commands:

     $ sudo chown root:root installdir/apache2/conf/server*
    
     $ sudo chmod 600 installdir/apache2/conf/server*
    
  • Open port 443 in the server firewall. Refer to the FAQ for more information.

  • Restart the Apache server.

You should now be able to access your application using an HTTPS URL.

How to force HTTPS redirection with Apache?

Edit the configuration file installdir/apps/edx/conf/httpd-lms.conf and find the lines containing rewrite rules. Typically, it will look like this:

# Enable some basic redirections
RewriteEngine On
RewriteRule ^/edx-studio(/.*)? http://%{SERVER_NAME}:18010/ [R,L]

Update the above content with additional rules to force HTTPS redirection, so that it looks like this:

# Enable some basic redirections
RewriteEngine On
RewriteRule ^/edx-studio(/.*)? http://%{SERVER_NAME}:18010/ [R,L]
# Force HTTPS redirection
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]

After modifying the Apache configuration files, restart Apache to apply the changes.

If you did not install the stack as root user, you should redirect to the port 8443:

# Enable some basic redirections
RewriteEngine On
RewriteRule ^/edx-studio(/.*)? http://%{SERVER_NAME}:18010/ [R,L]
# Force HTTPS redirection
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://%{SERVER_NAME}:8443/$1 [R,L]

How to debug Apache errors?

Once Apache starts, it will create two log files at installdir/apache2/logs/access_log and installdir/apache2/logs/error_log respectively.

  • The access_log file is used to track client requests. When a client requests a document from the server, Apache records several parameters associated with the request in this file, such as: the IP address of the client, the document requested, the HTTP status code, and the current time.

  • The error_log file is used to record important events. This file includes error messages, startup messages, and any other significant events in the life cycle of the server. This is the first place to look when you run into a problem when using Apache.

If no error is found, you will see a message similar to:

Syntax OK

How to find the MySQL database credentials?

How to connect to the MySQL database?

You can connect to the MySQL database from the same computer where it is installed with the mysql client tool.

$ mysql -u root -p

You will be prompted to enter the root user password. This is the same as the application password.

How to debug errors in your database?

The main log file is created at installdir/mysql/data/mysqld.log on the MySQL database server host.

How to change the MySQL root password?

You can modify the MySQL password using the following command at the shell prompt. Replace the NEW_PASSWORD placeholder with the actual password you wish to set.

$ installdir/mysql/bin/mysqladmin -p -u root password NEW_PASSWORD

How to reset the MySQL root password?

If you don't remember your MySQL root password, you can follow the steps below to reset it to a new value:

  • Create a file in /home/bitnami/mysql-init with the content shown below (replace NEW_PASSWORD with the password you wish to use):

     UPDATE mysql.user SET Password=PASSWORD('NEW_PASSWORD') WHERE User='root';
     FLUSH PRIVILEGES;
    

    If your stack ships MySQL v5.7.x, use the following content instead of that shown above:

     UPDATE mysql.user SET authentication_string=PASSWORD('NEW_PASSWORD') WHERE User='root';
     FLUSH PRIVILEGES;
    
    TIP: Check the MySQL version with the command installdir/mysql/bin/mysqladmin --version or installdir/mysql/bin/mysqld --version.
  • Stop the MySQL server:

     $ sudo installdir/ctlscript.sh stop mysql
    
  • Start MySQL with the following command:

     $ sudo installdir/mysql/bin/mysqld_safe --pid-file=installdir/mysql/data/mysqld.pid --datadir=installdir/mysql/data --init-file=/home/bitnami/mysql-init 2> /dev/null &
    
  • Restart the MySQL server:

     $ sudo installdir/ctlscript.sh restart mysql
    
  • Remove the script:

     $ rm /home/bitnami/mysql-init
    

How to change the MySQL root password in Windows?

You can modify the MySQL password using the following command at the shell prompt. Replace the NEW_PASSWORD placeholder with the actual password you wish to set.

installdir\mysql\bin\mysqladmin.exe -p -u root password NEW_PASSWORD

How to reset the MySQL root password in Windows?

If you don't remember your MySQL root password, you can follow the steps below to reset it to a new value:

  • Stop the MySQL server using the graphic manager tool. Refer to the how to start or stop the services section.
  • Check the MySQL version:

    installdir\mysql\bin\mysqladmin.exe –version

  • Create a file named mysql-init.txt with the content shown below depending on your MySQL version (replace NEW_PASSWORD with the password you wish to use):
    • MySQL 5.6.x or earlier:

       UPDATE mysql.user SET Password=PASSWORD('NEW_PASSWORD') 
       WHERE User='root';
       FLUSH PRIVILEGES;
      
    • MySQL 5.7.x or later:

       ALTER USER 'root'@'localhost' IDENTIFIED BY 'NEW_PASSWORD'; 
      
  • Start MySQL server with the following command. Remember to replace PATH with the location in which you have saved the mysql-init.txt file:

     installdir " installdir\mysql\bin\mysqld.exe" --defaults-file=" installdir\mysql\my.ini" --init-file="\PATH\mysql-init.txt" --console
    
    • The --init file option is used by the server for executing the content of the mysql-init.txt file at startup, it will change each root account password.
    • The --defaults-file option is specified since you have installed MySQL using the Bitnami installer.
    • The --console option (optional) has been added in order to show the server output at the console window rather than in the log file.
  • After some minutes, hit Ctrl-C to force the shutdown.
  • Restart the MySQL server from the graphic manager tool.
  • After the server has restarted successfully, delete the mysql-init.txt file.

How to find the MongoDB database credentials?

How to connect to the MongoDB database?

You can connect to the MongoDB database from the same computer where it is installed. Run the mongo client authenticating as the root user against the admin database:

$ mongo admin --username root -p

You will be prompted to enter the root user password. This is the same as the application password.

How to debug errors in your MongoDB database?

The main log file is created at installdir/mongodb/log/mongodb.log on the MongoDB database server host.

How to debug RabbitMQ errors?

To debug RabbitMQ's errors, check the log files of RabbitMQ at installdir/rabbitmq/var.

Troubleshooting

Errors sending bulk email

You may encounter errors sending bulk email from the instructor tab. This is usually because the bulk email subsystem requires the Lynx plaintext browser to convert HTML email to plaintext (discussed at https://github.com/edx/edx-platform/wiki/Bulk-Email#required-packages).

To resolve this, install the Lynx browser using the command below:

  • Debian:

    $ sudo apt-get install lynx

  • CentOS:

    $ sudo yum install lynx

How to debug errors in Open edX?

NOTE: This section describes the log files location for the edX Eucalyptus release. If you are using a prior version, find the log files at installdir/apps/edx/edxapp/log/.

The Open edX log files are stored at different paths depending on the service:

  • edX platform log files are stored at installdir/apps/edx/var/log/.
  • XQueue log files are stored at installdir/apps/xqueue/var/log/.

By default, both services are configured with a "local" log level. If you want to increase the log level on each service in order to debug your application, you need to follow the steps below:

  • Open the log configuration files with an editor. Depending on the service, you will find that files at:

    • edx platform: installdir/apps/edx/conf/cms.env.json and installdir/apps/edx/conf/lms.env.json.
    • XQueue: installdir/apps/xqueue/conf/xqueue.env.json.
  • Substitute the value:

    "LOCAL_LOGLEVEL": "INFO",
    
  • with:

    "LOCAL_LOGLEVEL": "DEBUG",
    
  • Restart the Apache server to load the changes.

How to run paver, django-admin and python commands in the Bitnami Open edX stack?

NOTE: This section describes the command location for the edX Eucalyptus release. If you are using a prior version, find the commands at installdir/apps/edx/edx-platform/bin/.

Depending on the application you want to manage (edX Platform or XQueue), there are a list of scripts available to run these commands with a pre-configured environment for the application. The available scripts for each application are listed below:

  • Option 1: edX platform
  • Option 2: XQueue

edX Platform

Paver and Python commands are located in the installdir/apps/edx/bin directory.

For example, to update your database using Python, you will need to execute these commands:

$ cd installdir/apps/edx/edx-platform
$ sudo installdir/apps/edx/bin/python.edxapp ./manage.py lms syncdb --migrate --settings aws
$ sudo installdir/apps/edx/bin/python.edxapp ./manage.py cms syncdb --migrate --settings aws

XQueue

Django-Admin and Python commands are located in the installdir/apps/xqueue/bin directory.

For example, to update your database using django-admin, you will need to execute these commands:

$ sudo installdir/apps/xqueue/bin/django-admin.xqueue syncdb --migrate --settings xqueue.bitnami_settings

How to configure the Preview button in Studio?

NOTE: The properties PREVIEW_LMS_BASE and LMS_BASE must be configured with different domains. Otherwise, non-staff users won't be able to see any course when navigating your site.

To enable content previews in Studio, you need to configure the Preview button. Follow these steps:

  • Make sure that you have a subdomain or a different domain pointing to your Open edX server.
  • Navigate to the installdir/apps/edx/conf directory.
  • Modify the lms.env.json and cms.env.json files and set PREVIEW_LMS_BASE to your alternative domain:

     "PREVIEW_LMS_BASE": "preview.yourdomain.com",
    
  • Restart all services running the commnand below:

     $ sudo installdir/ctlscript.sh restart
    

How to enable an XBlock for a course?

For Cypress, Dogwood, Eucalyptus and higher versions of edX

Cypress and Dogwood versions include the Google Drive, MS File Storage and Office Mix XBlocks. The Eucalyptus version includes the XBlocks below:

To install a different XBlock, follow these steps:

  • Log in to your server console.

  • Download the module.

  • Load the Open edX virtual environment:

     $ source installdir/apps/edx/venvs/edxapp/bin/activate
    
NOTE: Since the Eucalyptus version, the Bitnami Open edX Stack structure has changed significantly. If you are using a prior version, load the environment by running the command: source installdir/apps/edx/edx-platform/venv/bin/activate
  • Install the XBlock using pip:

     $ sudo pip install /path/to/downloaded/xblock/
    
NOTE: The installation steps could differ depending on the XBlock. Check the provider documentation to get more information.
  • Restart the Apache server to load the changes.

Next, enable the XBlock for the course, as follows:

  • Navigate to the course in Studio.

  • Click the "Settings -> Advanced settings" menu.

  • Specify the XBlock to use in the "Advanced Module List" area using a comma-separated list. Note that you can find the name of the module in the provider documentation.

    XBlock configuration

You should now be able to use the extension. To check this, create a new unit and select the "Advanced" button:

XBlock usage

You should see the modules previously specified:

XBlock usage

For Birch versions of edX

Follow these steps:

  • Enable the advanced modules. Edit the file located at installdir/apps/edx/edx-platform/cms/envs/common.py and set the value of the ALLOW_ALL_ADVANCED_COMPONENTS variable to "True".

  • Restart the Apache server to load the changes.

How to enable Third-Party Authentication?

Open edX Platform allows you to integrate third-party authentication with two kind of authentication providers:

This section describes how to integrate the Bitnami Open edX with two of the most popular OAuth2 providers: Google and Facebook.

Previous Steps

Integrate edX with Google

Step 1: Register the Open edX site with Google
  • Navigate to the Google Developers Console.
  • Select an existing project or create a new one.
  • Search for the "Google+ API service" in the Google APIs list and press the "Enable API" button.
  • Under "API Manager" sidebar, select "Credentials -> OAuth consent" screen tab.
  • Select "Create credentials", and then select "OAuth client ID".
  • For Application type, select "Web application", choose a "Name" for your client ID and leave the "Authorized JavaScript origins" field blank.
  • Fill the "Authorized redirect URI" field with the value http://localhost/auth/complete/google-oauth2/. localhost is a placeholder, please, replace it with the actual domain of your Open edX server.
  • Press the "Create" button and note down "Client ID" and the "Client secret".
Step 2: Configure Open edX
  • Log in to the server console.
  • Navigate to the installdir/apps/edx/conf directory.
  • Modify the lms.env.json file and set FEATURES.ENABLE_THIRD_PARTY_AUTH and FEATURES.ENABLE_COMBINED_LOGIN_REGISTRATION to True.
  • Modify the lms.auth.json file and set SOCIAL_AUTH_OAUTH_SECRETS as described below:
NOTE: Remember to replace the CLIENT_SECRET placeholder in the example below with the Client secret you noted down previously.
      "SOCIAL_AUTH_OAUTH_SECRETS": {
          "google-oauth2": "CLIENT_SECRET"
      }
  • Restart all servers using the graphical manager or the command-line script:

       $ sudo installdir/ctlscript.sh restart
    
  • Access the Django administration console (check the Django Admin Console instructions for more information).
  • Browse to "Third Party Auth -> Provider Configuration (OAuth2)".
  • Select "Add Provider Configuration (OAuth)".
  • Mark "Enabled" and "Visible" checkbox.
  • Set "Icon Class" to "fa-google-plus".
  • Set "Name" to "Google".
  • Set "Backend Name" and "Provider slug" to "google-oauth2".
  • Set "Client ID" to the "Client ID" you noted down previosuly and leave the "Client secret" field blank.
  • Click the "Save" button.

Integrate edX with Facebook

Step 1: Register the Open edX site with Google
  • Sign in to Facebook, then go to the Facebook for Developers page.
  • Select "Add a New App".
  • Enter a name for the app and mail address, and then select "Create New Facebook App ID".
  • Browse to "Settings -> Basic".
  • Note down the "App ID" and "App Secret".
  • In the "App Domains field", enter the actual domain of your Open edX server.
  • Select "Add Platform", and then select "Website".
  • Fill the "Site URI" field with the value http://localhost/. localhost is a placeholder, please, replace it with the actual domain of your Open edX server.
  • Click "Save Changes" button.
Step 2: Configure Open edX
  • Log in to the server console.
  • Navigate to the installdir/apps/edx/conf directory.
  • Modify the lms.env.json file and set FEATURES.ENABLE_THIRD_PARTY_AUTH and FEATURES.ENABLE_COMBINED_LOGIN_REGISTRATION to True.
  • Modify the lms.auth.json file and set SOCIAL_AUTH_OAUTH_SECRETS as described below:
NOTE: Remember to replace the CLIENT_SECRET placeholder in the example below with the Client secret you noted down previously.
      "SOCIAL_AUTH_OAUTH_SECRETS": {
          "facebook": "CLIENT_SECRET"
      }
  • Restart all servers using the graphical manager or the command-line script:

       $ sudo installdir/ctlscript.sh restart
    
  • Access the Django administration console (check the Django Admin Console instructions for more information).
  • Browse to "Third Party Auth -> Provider Configuration (OAuth2)".
  • Select "Add Provider Configuration (OAuth)".
  • Mark "Enabled" and "Visible" checkbox.
  • Set "Icon Class" to "fa-facebook".
  • Set "Name" to "Facebook".
  • Set "Backend Name" and "Provider slug" to "facebook".

    IMPORTANT: Remember that both the "Name" and the "Backend Name" fields must match.
  • Set "Client ID" to the "Client ID" you noted down previosuly and leave the "Client secret" field blank.
  • Click the "Save" button.

How to enable and apply a custom theme?

In order to enable and apply custom themes for edX, you need to follow these steps in the sequence shown:

Enable a custom theme

  • Place your theme in the installdir/apps/edx/var/themes directory (example).

  • In order to enable a custom theme for LMS, modify the installdir/apps/edx/conf/lms.env.json file and apply the following changes (example):

    • Set ENABLE_COMPREHENSIVE_THEMING to "true".
    • Add the absolute path of the themes directory to the COMPREHENSIVE_THEME_DIRS configuration property array.
  • In order to enable a custom theme for CMS, modify the installdir/apps/edx/conf/cms.env.json file and apply the following changes (example):

    • Set ENABLE_COMPREHENSIVE_THEMING to "true".
    • Add the absolute path of the themes directory to the COMPREHENSIVE_THEME_DIRS configuration property array.

Example settings for an edX theme

Custom theme folder structure

Themes should have the following folder structure:

-installdir/apps/edx/var/themes
  |-my-custom-theme/
    |-cms/
      |-static/
      |-templates/
    |-lms/
      |-static/
      |-templates/
Custom theme configuration

The lms.env.json and cms.env.json configuration files should contain the following:

"COMPREHENSIVE_THEME_DIRS": [
    "installdir/apps/edx/edx-platform/themes",
    "installdir/apps/edx/var/themes"
],
"ENABLE_COMPREHENSIVE_THEMING": true,

Apply a custom theme

  • Access the Django administration console (check the Django Admin Console instructions for more information).
  • Browse to "Theming -> Site themes -> Add site theme".
  • From the "Site menu", select the site you want to apply a theme to.
  • Enter the identifier of the theme (same as its directory name) and click on "Save".

Build assets for a custom theme

  • If you enabled the custom theme for LMS, update LMS assets:

     $ sudo installdir/apps/edx/bin/edxapp-update-assets-lms
    
  • If you enabled the custom theme for CMS, update CMS assets:

     $ sudo installdir/apps/edx/bin/edxapp-update-assets-cms
    
  • Restart the Apache server:

     $ sudo installdir/ctlscript.sh restart apache
    

How to install CodeJail Sandbox?

CodeJail manages the execution of untrusted code in secure sandboxes. It is designed primarily for Python execution, but can be used for other languages as well.

A CodeJail sandbox consists of several pieces:

  • Sandbox environment: Language setup (e.g. Python) and associated core packages.
  • Sandbox packages: Additional packages needed for a given run.
  • Untrusted packages: Code and data submitted by students to be tested on the server.
  • OS packages: System libraries needed to run the language (e.g. Python).

Visit the CodeJail official documentation to learn more about CodeJail.

Since the Eucalyptus version, a CodeJail sandbox is already included in the Open edX Stack. You can find it in installdir/apps/edx/venvs/edxapp-sandbox. Despite it being already included, there are some extra steps that must be done to enforce its security and make it usable by the LMS. Follow these instructions in order to make it completely operative.

How to enforce the edX Sandbox security?

The edX security is enforced with AppArmor. To install and configure it, follow the steps below.

  • Install AppArmor:
    • Debian/Ubuntu: You can install AppArmor on a Debian-based OS by executing:

        $ sudo apt-get install apparmor
      
    • Fedora/RHEL/CentOS: You can install AppArmor on a Centos/Fedora/Red-Hat based distribution follow the steps described in the AppArmor official wiki documentation.
    • Other Linux distributions: Look for available AppArmor distributions for your operating system. If your operating system doesn't provide any, you will need to install it from source.
  • Create a user for the sandbox:

    $ sudo addgroup sandbox
    $ sudo adduser --disabled-login sandbox --ingroup sandbox
    
  • Add permissions for the Apache daemon user to execute commands as sandbox user:

    $ sudo visudo -f /etc/sudoers.d/01-sandbox
    
  • A text editor will open, add the following content:

    daemon ALL=(sandbox) SETENV:NOPASSWD:installdir/apps/edx/venvs/edxapp-sandbox/bin/python
    daemon ALL=(sandbox) SETENV:NOPASSWD:/usr/bin/find
    daemon ALL=(ALL) NOPASSWD:/usr/bin/pkill
    
  • Create a file for AppArmor at /etc/apparmor.d/opt.bitnami.apps.edx.venvs.edxapp-sandbox.bin.python and populate it with this content:

    #include <tunables/global>
    
    installdir/apps/edx/venvs/edxapp-sandbox/bin/.python2.7 {
        #include <abstractions/base>
        #include <abstractions/python>
    
        # If you have code that the sandbox must be able to access, add lines
        # pointing to those directories:
        installdir/apps/edx/venvs/edxapp-sandbox/** mr,
        installdir/apps/edx/edx-platform/common/lib/** mr,
        installdir/python/lib/** mr,
        installdir/common/lib/** mr,
    
        /tmp/codejail-*/ rix,
        /tmp/codejail-*/** wrix,
    }
    
  • Load the previous AppArmor configuration file with apparmor_parser and restart the Apache server:

    $ sudo apparmor_parser /etc/apparmor.d/opt.bitnami.apps.edx.venvs.edxapp-sandbox.bin.python
    $ sudo installdir/ctlscript.sh restart apache
    

How to execute edX Comments Service (Forum) tests?

You can use the rspec in order to test a setup of edX Forum for integration tests.

Required gems installation

Before executing the tests, it's necessary to run bundle install to install some missing gems. Install them running the commands below:

$ cd installdir/apps/forum/cs_comments_service
$ bundle install --with test

Test execution

To run the test suite, use:

$ cd installdir/apps/forum/cs_comments_service
$ bundle exec bin/rspec

How to run XQueue tests?

NOTE: This functionality is only available in the Eucalyptus version and better.

You can use the Integration Test Framework in order to test a setup of XQueue for integration tests.

Configuration

Tests use the configuration parameters defined at installdir/apps/xqueue/conf/xqueue.test_env.json. Tests that require authentication to run should raise a SkipTest exception if the authentication information is not provided.

The Bitnami Open edX Stack is already configured to test XQueue with RabbitMQ integration. However, you need to edit the configuration JSON file in order to test Mathworks integration since authentication information is not provided.

Test execution

To run the test suite, use:

$ sudo installdir/apps/xqueue/bin/python.xqueue manage.py test --settings xqueue.test_settings --noinput
nativeInstaller

Bitnami Documentation