...
Define Required Swift Settings
...
1. Stop the LMS server.
2. 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.
3. Define or verify the following settings.
EDXAPP_SETTINGS: "openstack"
VHOST_NAME: "openstack"
4. 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.
EDXAPP_SWIFT_USERNAME: ""
...
EDXAPP_SWIFT_REGION_NAME: ""
5. Customize the name of the Swift container that your system's files will be uploaded to by defining the following setting.
EDXAPP_FILE_UPLOAD_STORAGE_BUCKET_NAME: "container_name"
6. 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.
EDXAPP_GRADE_STORAGE_CLASS: 'swift.storage.SwiftStorage'
...
ENABLE_GRADE_DOWNLOADS: true
You can continue on to define Swift settings for other features, or complete the following steps to update your instance.
7. 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 'edxapp_code_dir=<path to edx-platform directory>'
8. Restart the LMS server.
9. 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.
...
1. Stop the LMS server.
2. Edit the /edx/app/edx_ansible/server-vars.yml
file.
3. Verify that you have defined all of the required Swift settings.
4. Define the following settings.
Be sure to replace any example values for the settings that follow with values that apply to your instance.
EDXAPP_VERIFY_STUDENT:
DAYS_GOOD_FOR: 365
...
STORAGE_KWARGS:
name_prefix: "photos/"
5. 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.
Define Swift Settings for Temporary URLs
To use temporary URLs for Swift, follow these steps.
...
1. Stop the LMS server.
2. Edit the /edx/app/edx_ansible/server-vars.yml
file.
3. Verify that you have defined all of the required Swift settings.
4. 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:
5. 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.
Define Swift Settings for XQueue
To define data storage for files for external graders, follow these steps.
...
1. Stop the LMS server.
2. Edit the /edx/app/edx_ansible/server-vars.yml
file.
3. Verify that you have defined all of the required Swift settings.
4. 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"
...
XQUEUE_SWIFT_USERNAME: ""
...
XQUEUE_SWIFT_KEY: ""
...
XQUEUE_SWIFT_TENANT_ID: ""
...
XQUEUE_SWIFT_TENANT_NAME: ""
...
XQUEUE_SWIFT_AUTH_URL: ""
...
XQUEUE_SWIFT_AUTH_VERSION:
...
XQUEUE_SWIFT_REGION_NAME: ""
...
XQUEUE_UPLOAD_BUCKET: ""
...
XQUEUE_UPLOAD_PATH_PREFIX: ""
#5. 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=xqueue' -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=xqueue' -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=xqueue' -e 'edxapp_code_dir=<path to edx-platform directory>'
.. I just changed edxapp to xqueue in three places -- is that all that's needed?
.. I left out the note assumes that about an openstack role though maybe it also needs to go here
#6. Restart the LMS server.
#7. Repeat this procedure for each instance that has data that you want to store on Swift.==========================================================
Define Swift Settings for Synchronizing Analytics Logs
...
To define settings for synchronizing event log files, follow these steps.
#1. Stop the LMS server.
#2. Edit the ``/edx/app/edx_ansible/server-vars.
yml`` yml
file.
#3. Verify that you have defined all of the :ref:`required Swift settings<Define Required Swift Settings>`required Swift settings.
#4. Define the following settings. .. code-block:: yaml
COMMON_OBJECT_STORE_LOG_SYNC: true
...
.
...
.
...
.
...
SWIFT_LOG_SYNC_USERNAME: ""
...
SWIFT_LOG_SYNC_PASSWORD: ""
...
SWIFT_LOG_SYNC_TENANT_ID: ""
...
SWIFT_LOG_SYNC_TENANT_NAME: ""
...
SWIFT_LOG_SYNC_AUTH_URL: ""
...
SWIFT_LOG_SYNC_REGION_NAME: ""
.. important:Note: If you set ``COMMONCOMMON_OBJECT_STORE_LOG_SYNC:
true``true
, you must also define valid values for the ``SWIFT_LOG_SYNC_*`` variables. Otherwise, analytics log synchronization will fail.
#5. Continue on to define Swift settings for other features, or complete steps 7-9 for :ref:`defining defining required Swift settings<Define Required Swift Settings>` settings to update your instance.