...
You can define all required and optional Swift settings at one time, or you can update settings as needed over time. Each time you update the server-vars.yml
file, you must run the update command playbook roles and restart the LMS server.
...
- Stop the LMS server.
- Create or edit the
/edx/app/edx_ansible/server-vars.yml
file.
Be sure to replace any example values for the settings that follow with values that apply to your instance. - Define or verify the following settings.
EDXAPP_SETTINGS: "openstack"
VHOST_NAME: "openstack"
...
- To configure Swift, define values for each of the following settings. The
...
EDXAPP_SWIFT_AUTH_
...
VERSION
can be set to either
...
- 1 or
...
- 2, and
...
- defaults to
...
- 1 if not specified.
.. code-block:: yaml
...
EDXAPP_SWIFT_USERNAME: ""
...
EDXAPP_SWIFT_KEY: ""
...
EDXAPP_SWIFT_TENANT_ID: ""
...
EDXAPP_SWIFT_TENANT_NAME: ""
...
EDXAPP_SWIFT_AUTH_URL: ""
...
EDXAPP_SWIFT_AUTH_VERSION:
...
EDXAPP_SWIFT_REGION_NAME: ""
...
Customize the name of the Swift container that your system's files will be
...
uploaded to by defining the following setting.
.. code-block:: yaml
...
EDXAPP_FILE_UPLOAD_STORAGE_BUCKET_NAME: "container_name"
...
- To configure storage for grade reports, define the following settings. The
...
- name_
...
- prefix that you define specifies a common prefix for the files
...
- generated by the system.
.. code-block:: yaml
...
EDXAPP_GRADE_STORAGE_CLASS: 'swift.storage.SwiftStorage'
...
EDXAPP_GRADE_STORAGE_KWARGS:
...
name_prefix: "grades/"
...
.
...
.
...
.
...
ENABLE_GRADE_DOWNLOADS: true
You can continue on to define Swift settings for other features, or complete the following steps to update your instance.#.
- Run the following roles.
::
...
cd /edx/app/edx_ansible/edx_ansible/playbooks
...
sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook -i localhost, -c local -e@/edx/app/edx_ansible/server-vars.yml run-role.yml -e 'role=edxapp' -e 'edx_platform_version=<your branch name>'
...
sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook -i localhost, -c local -e@/edx/app/edx_ansible/server-vars.yml run-role.yml -e 'celery_worker=True' -e 'role=edxapp' -e 'edx_platform_version=<your branch name>'
...
sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook -i localhost, -c local -e@/edx/app/edx_ansible/server-vars.yml run-role.yml -e 'role=edxapp' -e 'edxapp_code_dir=<path to edx-platform directory>'
...
...
- Restart the LMS server.
...
- Repeat this procedure for each instance that has data that you want to store
...
- on Swift.
============================================================
Define Swift Settings for Identity Verification (Proctoring)
============================================================
To define data storage for files that verify learner identity, follow these steps.#.
- Stop the LMS server.
...
- Edit the
...
/edx/app/edx_ansible/server-vars.
...
yml
file.
...
- Verify that you have defined all of the
...
- required Swift settings.
...
- Define the following settings.
...
- Be sure to replace any example values for the settings that follow with
...
- values that apply to your instance.
.. code-block:: yaml
...
EDXAPP_VERIFY_STUDENT:
...
DAYS_GOOD_FOR: 365
...
SOFTWARE_SECURE:
...
STORAGE_CLASS: "swift.storage.SwiftStorage"
...
STORAGE_KWARGS:
...
name_prefix: "photos/"
...
- Continue on to define Swift settings for other features, or complete steps
...
- 7-9 for
...
- defining required Swift
...
- settings to update your instance.
...
- Note that you only need to run the
...
-
openstack
role one time. If you are
...
- completing these identity verification configuration steps as a separate
...
- procedure, you need only run the
...
-
edxapp
role in step 7.
...
.. this note assumes that an openstack role actually got run somehow
...
Define Swift Settings for Temporary URLs
==========================================
To use temporary URLs for Swift, follow these steps.#.
- Stop the LMS server.
...
- Edit the
...
/edx/app/edx_ansible/server-vars.
...
yml
file.
...
- Verify that you have defined all of the
...
- required Swift settings.
...
- Define the following settings.
...
- The duration setting is the value, in seconds, for how long a temporary URL
...
- remains valid.
...
...
SWIFT_USE_TEMP_URLS: true
...
SWIFT_TEMP_URL_KEY: ""
...
SWIFT_TEMP_URL_DURATION:
...
- Continue on to define Swift settings for other features, or complete steps
...
- 7-9 for
...
- defining required Swift
...
- settings to update your instance.
...
- Note that you only need to run the
...
-
openstack
role one time. If you are
...
- completing these temporary URL configuration steps as a separate
...
- procedure, you need only run the
...
-
edxapp
role in step 7.
.. this note assumes that an openstack role actually got run somehow
==========================================
Define Swift Settings for XQueue
==========================================
To define data storage for files for external graders, follow these steps.#.
- Stop the LMS server.
...
- Edit the
...
/edx/app/edx_ansible/server-vars.
...
yml
file.
...
- Verify that you have defined all of the
...
- required Swift settings.
...
- Define the following settings.
...
- In a basic setup, the values for these variables are the same as for the
...
- EDXAPP_SWIFT_*
...
- settings.
.. code-block:: yaml
XQUEUE_SETTINGS: "openstack_settings"
...