Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to quince #47

Merged
merged 37 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1bf815c
docs: change quickstart to launch
Sep 20, 2022
831d314
Merge remote-tracking branch 'origin/master' into nightly
Nov 21, 2022
04ff297
Merge remote-tracking branch 'origin/master' into nightly
Dec 12, 2022
aecbbbc
Merge remote-tracking branch 'origin/master' into nightly
Dec 13, 2022
7f0519b
Merge remote-tracking branch 'origin/master' into nightly
Dec 15, 2022
f8f402e
Merge remote-tracking branch 'origin/master' into nightly
Dec 22, 2022
acb0419
Merge remote-tracking branch 'origin/master' into nightly
Dec 27, 2022
40095aa
Merge remote-tracking branch 'origin/master' into nightly
Jan 6, 2023
e1f70dd
Merge remote-tracking branch 'origin/master' into nightly
Feb 9, 2023
2da9e85
Merge remote-tracking branch 'origin/master' into nightly
Feb 27, 2023
6b41471
Merge remote-tracking branch 'origin/master' into nightly
Mar 26, 2023
c1ed76c
Merge remote-tracking branch 'origin/master' into nightly
May 16, 2023
f277b91
Merge remote-tracking branch 'origin/master' into nightly
May 17, 2023
f899bda
Merge remote-tracking branch 'origin/master' into nightly
May 19, 2023
9d72da2
Merge remote-tracking branch 'origin/master' into nightly
May 26, 2023
e895ea3
feat: label nightly version
regisb May 26, 2023
8bd403c
fix: nightly package version
regisb May 26, 2023
3eec45a
Merge branch 'master' into nightly
regisb Jun 15, 2023
9c15329
Merge remote-tracking branch 'origin/master' into nightly
Sep 7, 2023
3f62e9d
Merge remote-tracking branch 'origin/master' into nightly
Oct 3, 2023
149e1e3
Merge remote-tracking branch 'origin/master' into nightly
Oct 10, 2023
5808fd7
Merge remote-tracking branch 'origin/master' into nightly
Nov 14, 2023
b2f97d0
Merge remote-tracking branch 'origin/master' into nightly
Nov 14, 2023
a065a93
Merge branch 'master' into nightly
regisb Nov 20, 2023
1d1a336
Merge remote-tracking branch 'origin/master' into nightly
Nov 24, 2023
a7ad233
Merge remote-tracking branch 'origin/master' into nightly
Nov 24, 2023
18d3fc7
Merge remote-tracking branch 'origin/master' into nightly
Nov 30, 2023
c867b48
Merge remote-tracking branch 'origin/master' into nightly
Dec 5, 2023
bd82a18
Merge remote-tracking branch 'origin/master' into nightly
Dec 8, 2023
8e36453
Merge remote-tracking branch 'origin/master' into nightly
Dec 8, 2023
49f8837
local.overhang.io -> local.edly.io
regisb Dec 9, 2023
d313fe9
Merge remote-tracking branch 'origin/master' into nightly
Dec 9, 2023
d26c8a2
Merge branch 'master' into nightly
regisb Dec 11, 2023
69f2cc4
fix: MFE repo urls
regisb Dec 11, 2023
c13d99b
Merge remote-tracking branch 'origin/master' into nightly
Dec 11, 2023
1d63a93
Merge remote-tracking branch 'origin/master' into nightly
Dec 11, 2023
c5aef92
feat: upgrade to quince
ziafazal Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ variables:
TUTOR_IMAGES: ecommerce ecommerce-worker orders-dev payment-dev
TUTOR_PYPI_PACKAGE: tutor-ecommerce
TUTOR_EXTRA_ENABLED_PLUGINS: discovery mfe
OPENEDX_RELEASE: palm
OPENEDX_RELEASE: quince
GITHUB_REPO: overhangio/tutor-ecommerce

include:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ instructions, because git commits are used to generate release notes:

<!-- scriv-insert-here -->

<a id='changelog-17.0.0'></a>
## v17.0.0 (2023-12-09)

- 💥 [Feature] Upgrade to Quince. (by @ziafazal)

<a id='changelog-16.0.4'></a>
## v16.0.4 (2023-12-11)

Expand Down
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ Operations
Creating a user
~~~~~~~~~~~~~~~

The ecommerce user interface will be available at http://ecommerce.local.overhang.io for a local instance, and at ``ECOMMERCE_HOST`` (by default: ``http(s)://ecommerce.<yours lms host>``) in production. In order to run commands from the UI, a user with admin rights must be created. There are two ways to proceed. To create a brand new user in E-Commerce which will not exist in the LMS, run::
The ecommerce user interface will be available at http://ecommerce.local.edly.io for a local instance, and at ``ECOMMERCE_HOST`` (by default: ``http(s)://ecommerce.<yours lms host>``) in production. In order to run commands from the UI, a user with admin rights must be created. There are two ways to proceed. To create a brand new user in E-Commerce which will not exist in the LMS, run::

tutor local run ecommerce ./manage.py createsuperuser

Then login with this new user at: http://ecommerce.local.overhang.io/admin/
Then login with this new user at: http://ecommerce.local.edly.io/admin/

To re-use an existing LMS user, first go to http://ecommerce.local.overhang.io/login. You should be redirected to the LMS login page, then to the dashboard. Then this user must be made a staff/superuser in E-Commerce::
To re-use an existing LMS user, first go to http://ecommerce.local.edly.io/login. You should be redirected to the LMS login page, then to the dashboard. Then this user must be made a staff/superuser in E-Commerce::

tutor local run ecommerce ./manage.py shell -c "from django.contrib.auth import get_user_model; get_user_model().objects.filter(email='[email protected]').update(is_staff=True, is_superuser=True)"

Make sure to replace ``[email protected]`` by the actual user email address. You should then be able to view the Oscar dashboard at http://ecommerce.local.overhang.io.
Make sure to replace ``[email protected]`` by the actual user email address. You should then be able to view the Oscar dashboard at http://ecommerce.local.edly.io.


Custom payment processors
Expand All @@ -122,7 +122,7 @@ Then, build the image, pointing to your fork if necessary::
Development
~~~~~~~~~~~

When running Tutor in development mode, the ecommerce service is accessible at http://ecommerce.local.overhang.io:8130.
When running Tutor in development mode, the ecommerce service is accessible at http://ecommerce.local.edly.io:8130.

To mount a local ecommerce repository in the ecommerce container, add an auto-mounted repository with::

Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
include_package_data=True,
python_requires=">=3.8",
install_requires=[
"tutor>=16.0.0,<17.0.0",
"tutor-discovery>=16.0.0,<17.0.0",
"tutor-mfe>=16.0.0,<17.0.0",
"tutor>=17.0.0,<18.0.0",
"tutor-discovery>=17.0.0,<18.0.0",
"tutor-mfe>=17.0.0,<18.0.0",
],
extras_require={"dev": ["tutor[dev]>=16.0.0,<17.0.0"]},
extras_require={"dev": ["tutor[dev]>=17.0.0,<18.0.0"]},
entry_points={"tutor.plugin.v1": ["ecommerce = tutorecommerce.plugin"]},
classifiers=[
"Development Status :: 5 - Production/Stable",
Expand Down
2 changes: 1 addition & 1 deletion tutorecommerce/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "16.0.4"
__version__ = "17.0.0"
4 changes: 2 additions & 2 deletions tutorecommerce/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ def _add_ecommerce_mfe_apps(
apps.update(
{
"orders": {
"repository": "https://github.com/edx/frontend-app-ecommerce",
"repository": "https://github.com/edx/frontend-app-ecommerce.git",
"port": 7296,
},
"payment": {
"repository": "https://github.com/edx/frontend-app-payment",
"repository": "https://github.com/edx/frontend-app-payment.git",
"port": 1998,
},
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% if is_buildkit_enabled() %}# syntax=docker/dockerfile:1.4{% endif %}
# syntax=docker/dockerfile:1.4
###### Minimal image with base system requirements for most stages
FROM docker.io/ubuntu:20.04 as minimal

RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update && \
apt install -y git-core language-pack-en python3 python3-pip python3-venv

Expand All @@ -18,12 +18,12 @@ WORKDIR /openedx/ecommerce_worker
# Install python venv
RUN python3 -m venv ../venv/
ENV PATH "/openedx/venv/bin:$PATH"
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install \
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \
# https://pypi.org/project/setuptools/
# https://pypi.org/project/pip/
# https://pypi.org/project/wheel/
setuptools==67.7.2 pip==23.1.2. wheel==0.40.0
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install -r requirements/production.txt
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install -r requirements/production.txt

ENV WORKER_CONFIGURATION_MODULE ecommerce_worker.settings.production
CMD celery worker --app=ecommerce_worker.celery_app:app --loglevel=info --maxtasksperchild 100 --queue=fulfillment,email_marketing
26 changes: 13 additions & 13 deletions tutorecommerce/templates/ecommerce/build/ecommerce/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% if is_buildkit_enabled() %}# syntax=docker/dockerfile:1.4{% endif %}
# syntax=docker/dockerfile:1.4
###### Minimal image with base system requirements for most stages
FROM docker.io/ubuntu:20.04 as minimal

RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update && \
apt install -y curl git-core language-pack-en

Expand All @@ -28,8 +28,8 @@ COPY --from=checkout /openedx/ecommerce /
###### Install python and virtual environment
FROM minimal as python

RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update && \
apt install -y libmysqlclient-dev libssl-dev python3 python3-pip python3-venv

Expand All @@ -44,15 +44,15 @@ RUN mkdir /openedx/.cache
# Create python venv
RUN python3 -m venv /openedx/venv/
ENV PATH "/openedx/venv/bin:$PATH"
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} {% endif %}pip install \
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} pip install \
# https://pypi.org/project/setuptools/
# https://pypi.org/project/pip/
# https://pypi.org/project/wheel/
setuptools==67.7.2 pip==23.1.2. wheel==0.40.0
setuptools==68.2.2 pip==23.2.1 wheel==0.41.2

# Install a recent version of nodejs
# https://pypi.org/project/nodeenv
RUN pip install nodeenv==1.7.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take this opportunity to upgrade to nodeenv 1.8.0.

RUN pip install nodeenv==1.8.0
RUN nodeenv /openedx/nodeenv --node=16.20.0 --prebuilt
ENV PATH /openedx/nodeenv/bin:${PATH}

Expand All @@ -62,21 +62,21 @@ WORKDIR /openedx/ecommerce

# Install npm, bower requirements
ARG NPM_REGISTRY='{{ NPM_REGISTRY }}'
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.npm/,sharing=shared,uid=${APP_USER_ID} {% endif %}npm clean-install --verbose --no-audit --registry=$NPM_REGISTRY
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/bower,sharing=shared,uid=${APP_USER_ID} {% endif %}./node_modules/.bin/bower install --allow-root
RUN --mount=type=cache,target=/openedx/.npm/,sharing=shared,uid=${APP_USER_ID} npm clean-install --verbose --no-audit --registry=$NPM_REGISTRY
RUN --mount=type=cache,target=/openedx/.cache/bower,sharing=shared,uid=${APP_USER_ID} node_modules/.bin/bower install --allow-root

# python requirements
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} {% endif %}pip install -r requirements.txt
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} pip install -r requirements.txt
# https://pypi.org/project/uWSGI/
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} {% endif %}pip install uwsgi==2.0.21
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} pip install uwsgi==2.0.21

# Install private requirements: this is useful for installing custom payment processors.
COPY --chown=app:app ./requirements/ /openedx/requirements
RUN cd /openedx/requirements/ \
&& touch ./private.txt \
&& pip install -r ./private.txt

{% for extra_requirement in ECOMMERCE_EXTRA_PIP_REQUIREMENTS %}RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} {% endif %}pip install '{{ extra_requirement }}'
{% for extra_requirement in ECOMMERCE_EXTRA_PIP_REQUIREMENTS %}RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} pip install '{{ extra_requirement }}'
{% endfor %}

{{ patch("ecommerce-dockerfile-pre-assets") }}
Expand Down
Loading