refactor: installs blockstore into edx-platform

* adds blockstore as a requirement and an installed app, with
  configurable bundle storage settings.
* adds waffle switch and setting to allow use of blockstore's python API
  instead of REST API in live testservers and in production.
* adds database router which, when a `blockstore` DATABASE connection is
  configured, allows the platform to use the blockstore service's
  database instead of the default edxapp database.
* replaces blockstore_api exceptions and models with blockstore.app.api classes
* minor fixes to the blockstore_api to make the Blockstore REST API
  return data packaged the same as the Blockstore Python API.
This commit is contained in:
Jillian Vogel
2022-01-16 18:41:06 +10:30
parent 98a26e8674
commit cfd53aff70
14 changed files with 342 additions and 194 deletions

View File

@@ -111,6 +111,10 @@ from lms.envs.common import (
# Enterprise service settings
ENTERPRISE_CATALOG_INTERNAL_ROOT_URL,
# Blockstore
BLOCKSTORE_USE_BLOCKSTORE_APP_API,
BUNDLE_ASSET_STORAGE_SETTINGS,
# Methods to derive settings
_make_mako_template_dirs,
_make_locale_paths,
@@ -1746,6 +1750,9 @@ INSTALLED_APPS = [
# For edx ace template tags
'edx_ace',
# Blockstore
'blockstore.apps.bundles',
]
@@ -2102,6 +2109,7 @@ ENABLE_COMPREHENSIVE_THEMING = False
DATABASE_ROUTERS = [
'openedx.core.lib.django_courseware_routers.StudentModuleHistoryExtendedRouter',
'openedx.core.lib.blockstore_api.db_routers.BlockstoreRouter',
]
############################ Cache Configuration ###############################