feat: upgrade to open-release/lilac.master

This commit is contained in:
liupengcheng 2021-04-22 16:14:22 +08:00 committed by Régis Behmo
parent 63117295b3
commit 6380a2b53d
8 changed files with 26 additions and 18 deletions

View File

@ -2,7 +2,7 @@ variables:
TUTOR_PLUGIN: discovery
TUTOR_IMAGES: discovery
TUTOR_PYPI_PACKAGE: tutor-discovery
OPENEDX_RELEASE: koa
OPENEDX_RELEASE: lilac
include:
- project: 'community/tutor-ci'

View File

@ -44,6 +44,18 @@ Then, you must login with this user at http://discovery.local.overhang.io/admin.
Alternatively, you can login with oauth2 using a pre-existing user created on the LMS/CMS by accessing http(s)://discovery.<your lms host>/login. To do so, the proper domain names must exist and point to the production server.
Index configuration
~~~~~~~~~~~~~~~~~~~
Discovery uses separate indices for different models (the names are: course, course_run, person and program by default). And you can overwrite theses
names by configuring ``DISCOVERY_INDEX_OVERRIDES``::
DISCOVERY_INDEX_OVERRIDES:
course_discovery.apps.course_metadata.search_indexes.documents.course: your-course-index-name
course_discovery.apps.course_metadata.search_indexes.documents.course_run: your-course-run-index-name
course_discovery.apps.course_metadata.search_indexes.documents.person: your-person-index-name
course_discovery.apps.course_metadata.search_indexes.documents.program: your-program-index-name
Re-indexing courses
~~~~~~~~~~~~~~~~~~~

View File

@ -29,7 +29,7 @@ setup(
long_description=readme,
packages=find_packages(exclude=["tests*"]),
include_package_data=True,
install_requires=["tutor-openedx>=11.0.0,<12.0.0"],
install_requires=["tutor-openedx>=12.0.0,<13.0.0"],
python_requires=">=3.5",
entry_points={"tutor.plugin.v0": ["discovery = tutordiscovery.plugin"]},
classifiers=[

View File

@ -1 +1,2 @@
__version__ = "11.0.3"
__version__ = "12.0.0"

View File

@ -18,7 +18,7 @@ config = {
"VERSION": __version__,
"DOCKER_IMAGE": "{{ DOCKER_REGISTRY}}overhangio/openedx-discovery:{{ DISCOVERY_VERSION }}",
"HOST": "discovery.{{ LMS_HOST }}",
"INDEX_NAME": "catalog",
"INDEX_OVERRIDES": {},
"MYSQL_DATABASE": "discovery",
"MYSQL_USERNAME": "discovery",
"OAUTH2_KEY": "discovery",

View File

@ -20,12 +20,13 @@ DATABASES = {
}
}
HAYSTACK_CONNECTIONS["default"].update(
{
"URL": "http://{{ ELASTICSEARCH_HOST }}:{{ ELASTICSEARCH_PORT }}",
"INDEX_NAME": "{{ DISCOVERY_INDEX_NAME }}",
}
)
ELASTICSEARCH_DSL['default'].update({
'hosts': "http://{{ ELASTICSEARCH_HOST }}:{{ ELASTICSEARCH_PORT }}/"
})
{% for name, index in DISCOVERY_INDEX_OVERRIDES.items() %}
ELASTICSEARCH_INDEX_NAMES["{{ name }}"] = "{{ index }}"
{% endfor %}
CACHES = {
"default": {

View File

@ -12,12 +12,8 @@ RUN mkdir -p /openedx/discovery && \
git clone $DISCOVERY_REPOSITORY --branch $DISCOVERY_VERSION --depth 1 /openedx/discovery
WORKDIR /openedx/discovery
# Fix TypeError at /jsi18n/
# https://github.com/edx/course-discovery/pull/2860
RUN curl https://github.com/edx/course-discovery/commit/cbbefd56a4efa67070288e94a260c5e069d035d6.patch | git apply -
# Setup minimal yml config file, which is required by production settings
COPY config.yml /openedx/config.yml
# Setup empty yml config file, which is required by production settings
RUN echo "{}" > /openedx/config.yml
ENV DISCOVERY_CFG /openedx/config.yml
# Install python venv

View File

@ -1,2 +0,0 @@
ELASTICSEARCH_URL: "http://elasticsearch:9200"
ELASTICSEARCH_INDEX_NAME: "catalog"