Learning Contexts, New XBlock Runtime, Blockstore API Client + Content Libraries
https://github.com/edx/edx-platform/pull/20645 This introduces: * A new XBlock runtime that can read and write XBlocks that are persisted using Blockstore instead of Modulestore. The new runtime is currently isolated so that it can be tested without risk to the current courseware/runtime. * Content Libraries v2, which store XBlocks in Blockstore not modulestore * An API Client for Blockstore * "Learning Context" plugin API. A learning context is a more abstract concept than a course; it's a collection of XBlocks that serves some learning purpose.
This commit is contained in:
@@ -1201,6 +1201,9 @@ INSTALLED_APPS = [
|
||||
'openedx.core.djangoapps.course_groups', # not used in cms (yet), but tests run
|
||||
'xblock_config.apps.XBlockConfig',
|
||||
|
||||
# New (Blockstore-based) XBlock runtime
|
||||
'openedx.core.djangoapps.xblock.apps.StudioXBlockAppConfig',
|
||||
|
||||
# Maintenance tools
|
||||
'maintenance',
|
||||
'openedx.core.djangoapps.util.apps.UtilConfig',
|
||||
@@ -1683,6 +1686,13 @@ DATABASE_ROUTERS = [
|
||||
############################ Cache Configuration ###############################
|
||||
|
||||
CACHES = {
|
||||
'blockstore': {
|
||||
'KEY_PREFIX': 'blockstore',
|
||||
'KEY_FUNCTION': 'util.memcache.safe_key',
|
||||
'LOCATION': ['localhost:11211'],
|
||||
'TIMEOUT': '86400', # This data should be long-lived for performance, BundleCache handles invalidation
|
||||
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
|
||||
},
|
||||
'course_structure_cache': {
|
||||
'KEY_PREFIX': 'course_structure',
|
||||
'KEY_FUNCTION': 'util.memcache.safe_key',
|
||||
|
||||
@@ -181,6 +181,9 @@ IDA_LOGOUT_URI_LIST = [
|
||||
'http://localhost:18150/logout/', # credentials
|
||||
]
|
||||
|
||||
############################### BLOCKSTORE #####################################
|
||||
BLOCKSTORE_API_URL = "http://edx.devstack.blockstore:18250/api/v1/"
|
||||
|
||||
#####################################################################
|
||||
|
||||
# pylint: disable=wrong-import-order, wrong-import-position
|
||||
|
||||
@@ -404,6 +404,12 @@ XBLOCK_FIELD_DATA_WRAPPERS = ENV_TOKENS.get(
|
||||
|
||||
CONTENTSTORE = AUTH_TOKENS['CONTENTSTORE']
|
||||
DOC_STORE_CONFIG = AUTH_TOKENS['DOC_STORE_CONFIG']
|
||||
|
||||
############################### BLOCKSTORE #####################################
|
||||
BLOCKSTORE_API_URL = ENV_TOKENS.get('BLOCKSTORE_API_URL', None) # e.g. "https://blockstore.example.com/api/v1/"
|
||||
# Configure an API auth token at (blockstore URL)/admin/authtoken/token/
|
||||
BLOCKSTORE_API_AUTH_TOKEN = AUTH_TOKENS.get('BLOCKSTORE_API_AUTH_TOKEN', None)
|
||||
|
||||
# Datadog for events!
|
||||
DATADOG = AUTH_TOKENS.get("DATADOG", {})
|
||||
DATADOG.update(ENV_TOKENS.get("DATADOG", {}))
|
||||
|
||||
@@ -182,6 +182,12 @@ CACHES = {
|
||||
},
|
||||
}
|
||||
|
||||
############################### BLOCKSTORE #####################################
|
||||
# Blockstore tests
|
||||
RUN_BLOCKSTORE_TESTS = os.environ.get('EDXAPP_RUN_BLOCKSTORE_TESTS', 'no').lower() in ('true', 'yes', '1')
|
||||
BLOCKSTORE_API_URL = os.environ.get('EDXAPP_BLOCKSTORE_API_URL', "http://edx.devstack.blockstore-test:18251/api/v1/")
|
||||
BLOCKSTORE_API_AUTH_TOKEN = os.environ.get('EDXAPP_BLOCKSTORE_API_AUTH_TOKEN', 'edxapp-test-key')
|
||||
|
||||
################################# CELERY ######################################
|
||||
|
||||
CELERY_ALWAYS_EAGER = True
|
||||
|
||||
@@ -56,6 +56,7 @@ urlpatterns = [
|
||||
contentstore.views.component_handler, name='component_handler'),
|
||||
url(r'^xblock/resource/(?P<block_type>[^/]*)/(?P<uri>.*)$',
|
||||
openedx.core.djangoapps.common_views.xblock.xblock_resource, name='xblock_resource_url'),
|
||||
url(r'', include('openedx.core.djangoapps.xblock.rest_api.urls', namespace='xblock_api')),
|
||||
url(r'^not_found$', contentstore.views.not_found, name='not_found'),
|
||||
url(r'^server_error$', contentstore.views.server_error, name='server_error'),
|
||||
url(r'^organizations$', OrganizationListView.as_view(), name='organizations'),
|
||||
|
||||
Reference in New Issue
Block a user