Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

feat: use ansible-free docker image for ecommerce #1057

Merged
merged 3 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ dev.shell.discovery:
docker-compose exec discovery env TERM=$(TERM) bash -c '/bin/bash'

dev.shell.ecommerce:
docker-compose exec ecommerce env TERM=$(TERM) /edx/app/ecommerce/devstack.sh open
docker-compose exec ecommerce env TERM=$(TERM) /bin/bash

dev.shell.registrar:
docker-compose exec registrar env TERM=$(TERM) /bin/bash
Expand Down
131 changes: 131 additions & 0 deletions configuration_files/ecommerce.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---

AFFILIATE_COOKIE_KEY: dev_affiliate_id
API_ROOT: null
BACKEND_SERVICE_EDX_OAUTH2_KEY: ecommerce-backend-service-key
BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL: http://localhost:18000/oauth2
BACKEND_SERVICE_EDX_OAUTH2_SECRET: ecommerce-backend-service-secret
ECOMMERCE_WORKER_BROKER_HOST: 172.17.0.2
BROKER_URL: amqp://celery:celery@172.17.0.2:5672
CACHES:
default:
BACKEND: django.core.cache.backends.memcached.MemcachedCache
KEY_PREFIX: ecommerce
LOCATION:
- edx.devstack.memcached:11211
COMPREHENSIVE_THEME_DIRS:
- /edx/var/edx-themes/edx-themes/ecommerce
- /edx/app/ecommerce/ecommerce/ecommerce/themes
CORS_ALLOW_CREDENTIALS: false
CORS_ORIGIN_WHITELIST: []
CORS_URLS_REGEX: ''
CSRF_COOKIE_SECURE: false
DATABASES:
default:
ATOMIC_REQUESTS: true
CONN_MAX_AGE: 60
ENGINE: django.db.backends.mysql
HOST: edx.devstack.mysql57
NAME: ecommerce
OPTIONS:
connect_timeout: 10
init_command: SET sql_mode='STRICT_TRANS_TABLES'
PASSWORD: password
PORT: '3306'
USER: ecomm001
DEFAULT_SITE_THEME: null
ECOMMERCE_URL_ROOT: http://localhost:18130
EDX_API_KEY: PUT_YOUR_API_KEY_HERE
EDX_DRF_EXTENSIONS:
JWT_PAYLOAD_MERGEABLE_USER_ATTRIBUTES:
- tracking_context
JWT_PAYLOAD_USER_ATTRIBUTE_MAPPING:
administrator: is_staff
email: email
full_name: full_name
tracking_context: tracking_context
user_id: lms_user_id
OAUTH2_USER_INFO_URL: http://edx.devstack.lms:18000/oauth2/user_info
ENABLE_COMPREHENSIVE_THEMING: false
ENROLLMENT_FULFILLMENT_TIMEOUT: 7
ENTERPRISE_SERVICE_URL: http://edx.devstack.lms:18000/enterprise/
ENTERPRISE_LEARNER_PORTAL_HOSTNAME: localhost:8734
EXTRA_APPS: []
JWT_AUTH:
JWT_ALGORITHM: HS256
JWT_AUTH_COOKIE_HEADER_PAYLOAD: edx-jwt-cookie-header-payload
JWT_AUTH_COOKIE_SIGNATURE: edx-jwt-cookie-signature
JWT_DECODE_HANDLER: ecommerce.extensions.api.handlers.jwt_decode_handler
JWT_ISSUERS:
- AUDIENCE: lms-key
ISSUER: http://localhost:18000/oauth2
SECRET_KEY: lms-secret
- AUDIENCE: lms-key
ISSUER: ecommerce_worker
SECRET_KEY: lms-secret
JWT_LEEWAY: 1
JWT_PUBLIC_SIGNING_JWK_SET: ''
JWT_SECRET_KEY: lms-secret
JWT_VERIFY_EXPIRATION: true
LANGUAGE_CODE: en
LANGUAGE_COOKIE_NAME: openedx-language-preference
LOGGING_ROOT_OVERRIDES: {}
LOGGING_SUBSECTION_OVERRIDES: {}
MEDIA_STORAGE_BACKEND:
DEFAULT_FILE_STORAGE: django.core.files.storage.FileSystemStorage
MEDIA_ROOT: /edx/var/ecommerce/media
MEDIA_URL: /media/
OSCAR_FROM_EMAIL: oscar@example.com
PAYMENT_MICROFRONTEND_URL: null
PAYMENT_PROCESSOR_CONFIG:
edx:
cybersource:
access_key: SET-ME-PLEASE
apple_pay_country_code: US
apple_pay_merchant_id_certificate_path: /edx/etc/ssl/apple_pay_merchant.pem
apple_pay_merchant_id_domain_association: 'This value should also be in
private configuration. It, too,
will span multiple lines.
'
apple_pay_merchant_identifier: merchant.com.example
cancel_page_url: /checkout/cancel-checkout/
merchant_id: SET-ME-PLEASE
payment_page_url: https://testsecureacceptance.cybersource.com/pay
profile_id: SET-ME-PLEASE
receipt_page_url: /checkout/receipt/
secret_key: SET-ME-PLEASE
send_level_2_3_details: true
soap_api_url: https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.140.wsdl
sop_access_key: SET-ME-PLEASE
sop_payment_page_url: https://testsecureacceptance.cybersource.com/silent/pay
sop_profile_id: SET-ME-PLEASE
sop_secret_key: SET-ME-PLEASE
transaction_key: SET-ME-PLEASE
paypal:
cancel_url: /checkout/cancel-checkout/
client_id: SET-ME-PLEASE
client_secret: SET-ME-PLEASE
error_url: /checkout/error/
mode: sandbox
receipt_url: /checkout/receipt/
PLATFORM_NAME: Your Platform Name Here
SAILTHRU_KEY: sailthru key here
SAILTHRU_SECRET: sailthru secret here
SECRET_KEY: Your secret key here
SESSION_COOKIE_SECURE: true
SESSION_EXPIRE_AT_BROWSER_CLOSE: false
SOCIAL_AUTH_EDX_OAUTH2_ISSUER: http://127.0.0.1:8000
SOCIAL_AUTH_EDX_OAUTH2_KEY: ecommerce-sso-key
SOCIAL_AUTH_EDX_OAUTH2_LOGOUT_URL: http://localhost:18000/logout
SOCIAL_AUTH_EDX_OAUTH2_SECRET: ecommerce-sso-secret
SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT: http://127.0.0.1:8000
SOCIAL_AUTH_REDIRECT_IS_HTTPS: false
STATICFILES_STORAGE: ecommerce.theming.storage.ThemeStorage
STATIC_ROOT: /edx/var/ecommerce/staticfiles
THEME_SCSS: sass/themes/default.scss
TIME_ZONE: UTC
USERNAME_REPLACEMENT_WORKER: OVERRIDE THIS WITH A VALID USERNAME
SDN_CHECK_API_URL: https://data.trade.gov/consolidated_screening_list/v1/search
SDN_CHECK_API_KEY: sdn search key here
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,16 @@ services:
environment:
DJANGO_WATCHMAN_TIMEOUT: 30
ENABLE_DJANGO_TOOLBAR: 1
image: edxops/ecommerce:${OPENEDX_RELEASE:-latest}
image: edxops/ecommerce-dev:${OPENEDX_RELEASE:-latest}
networks:
default:
aliases:
- edx.devstack.ecommerce
ports:
- "18130:18130"
volumes:
- ${PWD}/configuration_files/ecommerce.yml:/edx/etc/ecommerce.yml


edx_notes_api:
# Sleep as a part of start up to give elasticsearch enough time to start up.
Expand Down