mirror of
https://github.com/ChristianLight/tutor.git
synced 2025-02-02 09:28:25 +00:00
Merge remote-tracking branch 'origin/master' into nightly
This commit is contained in:
commit
dbe3571ed4
@ -4,6 +4,11 @@ Note: Breaking changes between versions are indicated by "💥".
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## v13.1.7 (2022-03-17)
|
||||||
|
|
||||||
|
- [Bugfix] Fix dockerize on arm64 by switching to the [powerman/dockerize](https://github.com/powerman/dockerize) fork (#591).
|
||||||
|
- [Bugfix] Fix "Unexpected args" error during service initialization on Kubernetes (#611).
|
||||||
|
|
||||||
## v13.1.6 (2022-03-15)
|
## v13.1.6 (2022-03-15)
|
||||||
|
|
||||||
- [Bugfix] Fix `local/k8s quickstart` commands when upgrading from an older release (#595).
|
- [Bugfix] Fix `local/k8s quickstart` commands when upgrading from an older release (#595).
|
||||||
|
@ -53,7 +53,7 @@ Enable SAML authentication
|
|||||||
|
|
||||||
openedx-lms-common-settings: |
|
openedx-lms-common-settings: |
|
||||||
# saml special settings
|
# saml special settings
|
||||||
AUTHENTICATION_BACKENDS += ["third_party_auth.saml.SAMLAuthBackend", "django.contrib.auth.backends.ModelBackend"]
|
AUTHENTICATION_BACKENDS += ["common.djangoapps.third_party_auth.saml.SAMLAuthBackend", "django.contrib.auth.backends.ModelBackend"]
|
||||||
|
|
||||||
openedx-auth: |
|
openedx-auth: |
|
||||||
"SOCIAL_AUTH_SAML_SP_PRIVATE_KEY": "yoursecretkey",
|
"SOCIAL_AUTH_SAML_SP_PRIVATE_KEY": "yoursecretkey",
|
||||||
|
@ -22,9 +22,9 @@ Next, configure Tutor::
|
|||||||
|
|
||||||
Go through the configuration process, answering each question.
|
Go through the configuration process, answering each question.
|
||||||
|
|
||||||
Then, build the Open edX image::
|
Then, build the "openedx" and "permissions" images::
|
||||||
|
|
||||||
tutor images build openedx
|
tutor images build openedx permissions
|
||||||
|
|
||||||
If you want to use Tutor as an Open edX development environment, you should also build the development images::
|
If you want to use Tutor as an Open edX development environment, you should also build the development images::
|
||||||
|
|
||||||
@ -45,18 +45,16 @@ Configure Tutor to use MariaDB::
|
|||||||
Finish setup and start Tutor
|
Finish setup and start Tutor
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
From this point on, use Tutor as normal.
|
From this point on, use Tutor as normal. For example, start Open edX and run migrations with::
|
||||||
|
|
||||||
For example, to apply migrations and start Open edX::
|
|
||||||
|
|
||||||
|
tutor local start -d
|
||||||
tutor local init
|
tutor local init
|
||||||
tutor local start
|
|
||||||
|
|
||||||
Or for a development environment::
|
Or for a development environment::
|
||||||
|
|
||||||
tutor local init
|
|
||||||
tutor local stop
|
tutor local stop
|
||||||
tutor dev start
|
tutor dev start -d
|
||||||
|
tutor dev init
|
||||||
|
|
||||||
Using with tutor-mfe
|
Using with tutor-mfe
|
||||||
--------------------
|
--------------------
|
||||||
|
@ -2,7 +2,7 @@ import os
|
|||||||
|
|
||||||
# Increment this version number to trigger a new release. See
|
# Increment this version number to trigger a new release. See
|
||||||
# docs/tutor.html#versioning for information on the versioning scheme.
|
# docs/tutor.html#versioning for information on the versioning scheme.
|
||||||
__version__ = "13.1.6"
|
__version__ = "13.1.7"
|
||||||
|
|
||||||
# The version suffix will be appended to the actual version, separated by a
|
# The version suffix will be appended to the actual version, separated by a
|
||||||
# dash. Use this suffix to differentiate between the actual released version and
|
# dash. Use this suffix to differentiate between the actual released version and
|
||||||
|
@ -113,6 +113,7 @@ class K8sJobRunner(jobs.BaseJobRunner):
|
|||||||
# We cannot use the k8s API to create the job: configMap and volume names need
|
# We cannot use the k8s API to create the job: configMap and volume names need
|
||||||
# to be found with the right suffixes.
|
# to be found with the right suffixes.
|
||||||
kubectl_apply(
|
kubectl_apply(
|
||||||
|
self.root,
|
||||||
"--selector",
|
"--selector",
|
||||||
f"app.kubernetes.io/name={job_name}",
|
f"app.kubernetes.io/name={job_name}",
|
||||||
)
|
)
|
||||||
@ -232,27 +233,21 @@ def start(context: Context, names: List[str]) -> None:
|
|||||||
for name in names:
|
for name in names:
|
||||||
if name == "all":
|
if name == "all":
|
||||||
# Create volumes
|
# Create volumes
|
||||||
utils.kubectl(
|
kubectl_apply(
|
||||||
"apply",
|
context.root,
|
||||||
"--kustomize",
|
|
||||||
tutor_env.pathjoin(context.root),
|
|
||||||
"--wait",
|
"--wait",
|
||||||
"--selector",
|
"--selector",
|
||||||
"app.kubernetes.io/component=volume",
|
"app.kubernetes.io/component=volume",
|
||||||
)
|
)
|
||||||
# Create everything else except jobs
|
# Create everything else except jobs
|
||||||
utils.kubectl(
|
kubectl_apply(
|
||||||
"apply",
|
context.root,
|
||||||
"--kustomize",
|
|
||||||
tutor_env.pathjoin(context.root),
|
|
||||||
"--selector",
|
"--selector",
|
||||||
"app.kubernetes.io/component notin (job,volume,namespace)",
|
"app.kubernetes.io/component notin (job,volume,namespace)",
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
utils.kubectl(
|
kubectl_apply(
|
||||||
"apply",
|
context.root,
|
||||||
"--kustomize",
|
|
||||||
tutor_env.pathjoin(context.root),
|
|
||||||
"--selector",
|
"--selector",
|
||||||
f"app.kubernetes.io/name={name}",
|
f"app.kubernetes.io/name={name}",
|
||||||
)
|
)
|
||||||
|
@ -56,24 +56,20 @@ def initialise(runner: BaseJobRunner, limit_to: Optional[str] = None) -> None:
|
|||||||
if limit_to is None or limit_to == plugin_name:
|
if limit_to is None or limit_to == plugin_name:
|
||||||
for service in hook:
|
for service in hook:
|
||||||
fmt.echo_info(
|
fmt.echo_info(
|
||||||
"Plugin {}: running pre-init for service {}...".format(
|
f"Plugin {plugin_name}: running pre-init for service {service}..."
|
||||||
plugin_name, service
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
runner.run_job_from_template(
|
runner.run_job_from_template(
|
||||||
service, plugin_name, "hooks", service, "pre-init"
|
service, plugin_name, "hooks", service, "pre-init"
|
||||||
)
|
)
|
||||||
for service in ["lms", "cms"]:
|
for service in ["lms", "cms"]:
|
||||||
if limit_to is None or limit_to == service:
|
if limit_to is None or limit_to == service:
|
||||||
fmt.echo_info("Initialising {}...".format(service))
|
fmt.echo_info(f"Initialising {service}...")
|
||||||
runner.run_job_from_template(service, "hooks", service, "init")
|
runner.run_job_from_template(service, "hooks", service, "init")
|
||||||
for plugin_name, hook in runner.iter_plugin_hooks("init"):
|
for plugin_name, hook in runner.iter_plugin_hooks("init"):
|
||||||
if limit_to is None or limit_to == plugin_name:
|
if limit_to is None or limit_to == plugin_name:
|
||||||
for service in hook:
|
for service in hook:
|
||||||
fmt.echo_info(
|
fmt.echo_info(
|
||||||
"Plugin {}: running init for service {}...".format(
|
f"Plugin {plugin_name}: running init for service {service}..."
|
||||||
plugin_name, service
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
runner.run_job_from_template(
|
runner.run_job_from_template(
|
||||||
service, plugin_name, "hooks", service, "init"
|
service, plugin_name, "hooks", service, "init"
|
||||||
@ -136,9 +132,7 @@ site.themes.create(theme_dir_name='{theme_name}')
|
|||||||
""".format(
|
""".format(
|
||||||
theme_name=theme_name, domain_name=domain_name
|
theme_name=theme_name, domain_name=domain_name
|
||||||
)
|
)
|
||||||
command = BASE_OPENEDX_COMMAND + './manage.py lms shell -c "{python_code}"'.format(
|
command = BASE_OPENEDX_COMMAND + f'./manage.py lms shell -c "{python_code}"'
|
||||||
python_code=python_code
|
|
||||||
)
|
|
||||||
runner.run_job("lms", command)
|
runner.run_job("lms", command)
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,10 +23,12 @@ RUN $PYENV_ROOT/versions/$PYTHON_VERSION/bin/python -m venv /openedx/venv
|
|||||||
|
|
||||||
###### Install Dockerize to wait for mysql DB availability
|
###### Install Dockerize to wait for mysql DB availability
|
||||||
FROM minimal as dockerize
|
FROM minimal as dockerize
|
||||||
ARG DOCKERIZE_VERSION=v0.6.1
|
# https://github.com/powerman/dockerize/releases
|
||||||
RUN curl -L -o /tmp/dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
|
ARG DOCKERIZE_VERSION=v0.16.0
|
||||||
&& tar -C /usr/local/bin -xzvf /tmp/dockerize.tar.gz \
|
RUN dockerize_url="https://github.com/powerman/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-$(uname -m | sed 's@aarch@arm@')" \
|
||||||
&& rm /tmp/dockerize.tar.gz
|
&& echo "Downloading dockerize from $dockerize_url" \
|
||||||
|
&& curl --fail --location --output /usr/local/bin/dockerize $dockerize_url \
|
||||||
|
&& chmod a+x /usr/local/bin/dockerize
|
||||||
|
|
||||||
###### Checkout edx-platform code
|
###### Checkout edx-platform code
|
||||||
FROM minimal as code
|
FROM minimal as code
|
||||||
@ -123,7 +125,7 @@ ARG APP_USER_ID=1000
|
|||||||
RUN useradd --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app
|
RUN useradd --home-dir /openedx --create-home --shell /bin/bash --uid ${APP_USER_ID} app
|
||||||
USER ${APP_USER_ID}
|
USER ${APP_USER_ID}
|
||||||
|
|
||||||
COPY --chown=app:app --from=dockerize /usr/local/bin/dockerize /usr/local/bin/dockerize
|
COPY --from=dockerize /usr/local/bin/dockerize /usr/local/bin/dockerize
|
||||||
COPY --chown=app:app --from=code /openedx/edx-platform /openedx/edx-platform
|
COPY --chown=app:app --from=code /openedx/edx-platform /openedx/edx-platform
|
||||||
COPY --chown=app:app --from=locales /openedx/locale /openedx/locale
|
COPY --chown=app:app --from=locales /openedx/locale /openedx/locale
|
||||||
COPY --chown=app:app --from=python /opt/pyenv /opt/pyenv
|
COPY --chown=app:app --from=python /opt/pyenv /opt/pyenv
|
||||||
|
Loading…
x
Reference in New Issue
Block a user