Open edX Ecommerce setup

1,201 views
Skip to first unread message

Lawrence McDaniel

unread,
Apr 25, 2018, 1:55:59 PM4/25/18
to Open edX operations
Hello all! for anyone interested, i created some supplemental documentation for setting up Ecommerce on Ginkgo which goes as far as getting the Oscar Ecommerce dashboard / admin console up on your screen. if there's continued interest then i could ostensibly continue documenting up thru product setup and PayPal integration. 

thanks!!
lawrence mcdaniel

Nicola Tonon

unread,
May 3, 2018, 10:00:19 AM5/3/18
to Open edX operations
Hi Lawrence,
it would be super-nice, I followed your guide, but i cannot acces Oscar :/ I didn't get why. 

I get an error on executing the create_or_update_site manage.py create_or_update_site: error: unrecognized arguments: --discovery_api_url=https://openedx.eiuc.org:18381/

python manage.py create_or_update_site \
	--site-id=1 \
	--site-domain=preescolar.atentamente.mx:8002 \
	--partner-code=edX \
	--partner-name='Open edX' \
	--lms-url-root=https://preescolar.atentamente.mx \
	--payment-processors=paypal \
	--client-id=ecommerce-key \
	--client-secret=ecommerce-secret \
	--from-email=edx.atentamente@gmail.com \
	--discovery_api_url=https://preescolar.atentamente.mx:18381/

Lawrence McDaniel

unread,
May 3, 2018, 10:49:19 AM5/3/18
to opene...@googlegroups.com
hi nicola, you can run this command multiple times, so, i’d suggested that you continue to experiment by attempting to remove additional parameters until it no longer returns an error code. if i understand you complete message then you’ve already determined that “discovery_api_url” is your problem. in my case i also had to remove a couple of parameters from step 5 of the official documentation - https://openedx.atlassian.net/wiki/plugins/servlet/mobile?contentId=110330276#content/view/110330276.

separately, a possibility is that port 18381 is not currently open in your firewall settings thus invalidating the parameter value that you’re passing.

a final possibility is that your Nginx virtual server configuration file needs adjustments. for example, if you’re using https on your installation then the default ecommerce virtual server configuration file that was installed by Ansible would require modifications in or around row 20 as follows:

  listen 18381 ssl;
  ssl_certificate [PATH TO YOUR PUBLIC PEM FILE]
  ssl_certificate_key [PATH TO YOUR PRIVATE PEM FILE]
  [ ** POSSIBLY MORE LINES REGARDING SETUP OF SSL **]




--
You received this message because you are subscribed to a topic in the Google Groups "Open edX operations" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openedx-ops/BovacP98Sbc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openedx-ops...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-ops/119aa34b-a6af-4ac6-a139-a9e0110d826b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nicola Tonon

unread,
May 3, 2018, 10:52:18 AM5/3/18
to Open edX operations
I'm now starting from scratch, as I've made tons  of testing and nothing seems to work :)
I think that lately my biggest problem is Oscar not responding...
We'll see.
Thanks a lot for your reply and great documentation ^_^

Nicola Tonon

unread,
May 10, 2018, 12:35:18 PM5/10/18
to Open edX operations

Lawrence McDaniel

unread,
May 10, 2018, 1:06:09 PM5/10/18
to opene...@googlegroups.com
hi nicola, your problem is related to the Oauth setup in the django admin console, located in the following path: https://[YOUR-DOMAIN-NAME.COM]/admin/oauth2/client/. it appears that you’re missing an entry for your ecommerce module. you should also ensure that the port that you assign to this record entry, you’ve you create it, is consistent with your Nginx virtual server configuration settings located here: /etc/nginx/sites-enabled/ecommerce



Lawrence McDaniel
__________________________________
📡  Full-Stack Developer
CV: lawrencemcdaniel.comlinkedin.com/in/lawrencemcdaniel
Blog: blog.lawrencemcdaniel.com
Code Samples: horrors.lawrencemcdaniel.comgithub.com/lpm0073
Contact: lpm...@gmail.com | USA: +1 (415) 766-9012 | MEX: +52 1 (55) 4388-3070

Message has been deleted

Nicola Tonon

unread,
May 10, 2018, 2:55:44 PM5/10/18
to Open edX operations

Hi Lawrence,
thank you so much for your answer
here's the ecommerce nginx config 
#
# This file is created and updated by ansible, edit at your peril
#

upstream ecommerce_app_server {
    server 127.0.0.1:8130 fail_timeout=0;
}

# The Origin request header indicates where a fetch originates from. It doesn't include any path information,
# but only the server name (e.g. https://www.example.com).

# Here we set the value that is included in the Access-Control-Allow-Origin response header. If the origin is one
# of our known hosts--served via HTTP or HTTPS--we allow for CORS. Otherwise, we set the "null" value, disallowing CORS.

map $http_origin $cors_origin {
default "null";
}
server {
  #server_name ~^((stage|prod)-)?ecommerce.*;
  #listen 18130;
  listen 8002 ssl;
  server_name openedx.eiuc.org;


  ssl_certificate /etc/nginx/ssl/eiuc.org.crt;
  ssl_certificate_key /etc/nginx/ssl/eiuc.org.key;

location ~ ^/static/(?P<file>.*) {
  root /edx/var/ecommerce;
  add_header 'Access-Control-Allow-Origin' $cors_origin;
  # Inform downstream caches to take certain headers into account when reading/writing to cache.
  add_header 'Vary' 'Accept-Encoding,Origin';

  try_files /staticfiles/$file =404;
}

location ~ ^/media/(?P<file>.*) {
  root /edx/var/ecommerce;
  try_files /media/$file =404;
}

location / {
    try_files $uri @proxy_to_app;
}

location ~ ^/(api|payment|\.well-known/apple-developer-merchantid-domain-association)/ {
  try_files $uri @proxy_to_app;
}



location @proxy_to_app {
  proxy_set_header X-Forwarded-Proto $scheme;
  proxy_set_header X-Forwarded-Port $server_port;
  proxy_set_header X-Forwarded-For $remote_addr;

  # newrelic-specific header records the time when nginx handles a request.
  proxy_set_header X-Queue-Start "t=${msec}";

  proxy_set_header Host $http_host;

  proxy_redirect off;
}}


And the client config from django:

Nicola Tonon

unread,
May 10, 2018, 3:02:59 PM5/10/18
to Open edX operations
adn my lms.env.json
{
    "ACE_CHANNEL_SAILTHRU_DEBUG": true,
    "ACE_CHANNEL_SAILTHRU_TEMPLATE_NAME": null,
    "ACE_ENABLED_CHANNELS": [],
    "ACE_ENABLED_POLICIES": [],
    "ACE_ROUTING_KEY": "edx.lms.core.low",
    "ACTIVATION_EMAIL_SUPPORT_LINK": "",
    "AFFILIATE_COOKIE_NAME": "dev_affiliate_id",
    "ALTERNATE_WORKER_QUEUES": "cms",
    "ANALYTICS_API_URL": "http://localhost:18100",
    "ANALYTICS_DASHBOARD_NAME": "OPENedX - Insights",
    "ANALYTICS_DASHBOARD_URL": "http://localhost:18110/courses",
    "API_ACCESS_FROM_EMAIL": "api-re...@example.com",
    "API_ACCESS_MANAGER_EMAIL": "api-a...@example.com",
    "AUDIT_CERT_CUTOFF_DATE": null,
    "AWS_SES_REGION_ENDPOINT": "email.us-east-1.amazonaws.com",
    "AWS_SES_REGION_NAME": "us-east-1",
    "BASE_COOKIE_DOMAIN": "localhost",
    "BLOCK_STRUCTURES_SETTINGS": {
        "COURSE_PUBLISH_TASK_DELAY": 30,
        "PRUNING_ACTIVE": false,
        "TASK_DEFAULT_RETRY_DELAY": 30,
        "TASK_MAX_RETRIES": 5
    },
    "BUGS_EMAIL": "bu...@eiuc.org",
    "BULK_EMAIL_DEFAULT_FROM_EMAIL": "no-r...@eiuc.org",
    "BULK_EMAIL_EMAILS_PER_TASK": 500,
    "BULK_EMAIL_LOG_SENT_EMAILS": false,
    "BULK_EMAIL_ROUTING_KEY_SMALL_JOBS": "edx.lms.core.low",
    "CACHES": {
        "celery": {
            "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
            "KEY_FUNCTION": "util.memcache.safe_key",
            "KEY_PREFIX": "celery",
            "LOCATION": [
                "localhost:11211"
            ],
            "TIMEOUT": "7200"
        },
        "configuration": {
            "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
            "KEY_FUNCTION": "util.memcache.safe_key",
            "KEY_PREFIX": "openedx",
            "LOCATION": [
                "localhost:11211"
            ]
        },
        "course_structure_cache": {
            "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
            "KEY_FUNCTION": "util.memcache.safe_key",
            "KEY_PREFIX": "course_structure",
            "LOCATION": [
                "localhost:11211"
            ],
            "TIMEOUT": "7200"
        },
        "default": {
            "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
            "KEY_FUNCTION": "util.memcache.safe_key",
            "KEY_PREFIX": "default",
            "LOCATION": [
                "localhost:11211"
            ],
            "VERSION": "1"
        },
        "general": {
            "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
            "KEY_FUNCTION": "util.memcache.safe_key",
            "KEY_PREFIX": "general",
            "LOCATION": [
                "localhost:11211"
            ]
        },
        "mongo_metadata_inheritance": {
            "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
            "KEY_FUNCTION": "util.memcache.safe_key",
            "KEY_PREFIX": "mongo_metadata_inheritance",
            "LOCATION": [
                "localhost:11211"
            ],
            "TIMEOUT": 300
        },
        "staticfiles": {
            "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
            "KEY_FUNCTION": "util.memcache.safe_key",
            "KEY_PREFIX": "openedx_general",
            "LOCATION": [
                "localhost:11211"
            ]
        }
    },
    "CAS_ATTRIBUTE_CALLBACK": "",
    "CAS_EXTRA_LOGIN_PARAMS": "",
    "CAS_SERVER_URL": "",
    "CDN_VIDEO_URLS": {},
    "CELERY_BROKER_HOSTNAME": "localhost",
    "CELERY_BROKER_TRANSPORT": "amqp",
    "CELERY_BROKER_USE_SSL": false,
    "CELERY_BROKER_VHOST": "",
    "CELERY_EVENT_QUEUE_TTL": null,
    "CELERY_QUEUES": [
        "edx.lms.core.low",
        "edx.lms.core.default",
        "edx.lms.core.high",
        "edx.lms.core.high_mem"
    ],
    "CERTIFICATE_TEMPLATE_LANGUAGES": {
        "en": "English",
        "es": "Espa\u00f1ol"
    },
    "CERT_QUEUE": "certificates",
    "CMS_BASE": "studio.eiuc.org",
    "CODE_JAIL": {
        "limits": {
            "CPU": 1,
            "FSIZE": 1048576,
            "PROXY": 0,
            "REALTIME": 3,
            "VMEM": 536870912
        },
        "python_bin": "/edx/app/edxapp/venvs/edxapp-sandbox/bin/python",
        "user": "sandbox"
    },
    "COMMENTS_SERVICE_KEY": "rHxOUyRvQevO6FtArBzsUqpkMVuNxY7dIhS",
    "COMMENTS_SERVICE_URL": "http://localhost:18080",
    "COMPREHENSIVE_THEME_DIRS": [
        ""
    ],
    "COMPREHENSIVE_THEME_LOCALE_PATHS": [],
    "CONTACT_EMAIL": "in...@example.com",
    "CONTACT_MAILING_ADDRESS": "SET-ME-PLEASE",
    "CORS_ORIGIN_ALLOW_ALL": false,
    "CORS_ORIGIN_WHITELIST": [],
    "COURSES_WITH_UNSAFE_CODE": [],
    "COURSE_ABOUT_VISIBILITY_PERMISSION": "see_exists",
    "COURSE_CATALOG_API_URL": "http://openedx.eiuc.org:8008/api/v1",
    "COURSE_CATALOG_VISIBILITY_PERMISSION": "see_exists",
    "CREDENTIALS_INTERNAL_SERVICE_URL": "http://localhost:8005",
    "CREDENTIALS_PUBLIC_SERVICE_URL": "http://localhost:8005",
    "CREDIT_HELP_LINK_URL": "",
    "CROSS_DOMAIN_CSRF_COOKIE_DOMAIN": "",
    "CROSS_DOMAIN_CSRF_COOKIE_NAME": "",
    "CSRF_COOKIE_SECURE": false,
    "DEFAULT_COURSE_VISIBILITY_IN_CATALOG": "both",
    "DEFAULT_FEEDBACK_EMAIL": "feed...@eiuc.org",
    "DEFAULT_FILE_STORAGE": "django.core.files.storage.FileSystemStorage",
    "DEFAULT_FROM_EMAIL": "nor...@eiuc.org",
    "DEFAULT_MOBILE_AVAILABLE": false,
    "DEFAULT_SITE_THEME": "",
    "DEPRECATED_ADVANCED_COMPONENT_TYPES": [],
    "ECOMMERCE_API_URL": "https://ecommerce.eiuc.org/api/v2",
    "ECOMMERCE_PUBLIC_URL_ROOT": "https://ecommerce.eiuc.org",
    "EDXMKTG_USER_INFO_COOKIE_NAME": "edx-user-info",
    "EDXNOTES_INTERNAL_API": "http://localhost:18120/api/v1",
    "EDXNOTES_PUBLIC_API": "http://localhost:18120/api/v1",
    "EDX_PLATFORM_REVISION": "master",
    "ELASTIC_SEARCH_CONFIG": [
        {
            "host": "localhost",
            "port": 9200,
            "use_ssl": false
        }
    ],
    "EMAIL_BACKEND": "django.core.mail.backends.smtp.EmailBackend",
    "EMAIL_HOST": "localhost",
    "EMAIL_PORT": 25,
    "EMAIL_USE_TLS": false,
    "ENABLE_COMPREHENSIVE_THEMING": false,
    "ENTERPRISE_API_URL": "https://localhost:80/enterprise/api/v1",
    "ENTERPRISE_COURSE_ENROLLMENT_AUDIT_MODES": [
        "audit",
        "honor"
    ],
    "ENTERPRISE_ENROLLMENT_API_URL": "https://openedx.eiuc.org/api/enrollment/v1/enrollment",
    "ENTERPRISE_SUPPORT_URL": "",
    "ENTERPRISE_TAGLINE": "",
    "EXTRA_MIDDLEWARE_CLASSES": [],
    "FEATURES": {
        "AUTH_USE_OPENID_PROVIDER": true,
        "AUTOMATIC_AUTH_FOR_TESTING": false,
        "CUSTOM_COURSES_EDX": false,
        "ENABLE_COMBINED_LOGIN_REGISTRATION": true,
        "ENABLE_CORS_HEADERS": false,
        "ENABLE_COUNTRY_ACCESS": false,
        "ENABLE_CREDIT_API": false,
        "ENABLE_CREDIT_ELIGIBILITY": false,
        "ENABLE_CROSS_DOMAIN_CSRF_COOKIE": false,
        "ENABLE_CSMH_EXTENDED": true,
        "ENABLE_DISCUSSION_HOME_PANEL": true,
        "ENABLE_DISCUSSION_SERVICE": true,
        "ENABLE_EDXNOTES": false,
        "ENABLE_GRADE_DOWNLOADS": true,
        "ENABLE_INSTRUCTOR_ANALYTICS": false,
        "ENABLE_MKTG_SITE": false,
        "ENABLE_MOBILE_REST_API": false,
        "ENABLE_OAUTH2_PROVIDER": true,
        "ENABLE_ONLOAD_BEACON": false,
        "ENABLE_READING_FROM_MULTIPLE_HISTORY_TABLES": true,
        "ENABLE_SPECIAL_EXAMS": false,
        "ENABLE_SYSADMIN_DASHBOARD": false,
        "ENABLE_THIRD_PARTY_AUTH": true,
        "ENABLE_VIDEO_BEACON": false,
        "ENABLE_VIDEO_UPLOAD_PIPELINE": false,
        "PREVIEW_LMS_BASE": "preview.localhost:80",
        "SHOW_FOOTER_LANGUAGE_SELECTOR": false,
        "SHOW_HEADER_LANGUAGE_SELECTOR": false
    },
    "FEEDBACK_SUBMISSION_EMAIL": "",
    "FILE_UPLOAD_STORAGE_BUCKET_NAME": "SET-ME-PLEASE (ex. bucket-name)",
    "FILE_UPLOAD_STORAGE_PREFIX": "submissions_attachments",
    "FINANCIAL_REPORTS": {
        "BUCKET": null,
        "ROOT_PATH": "sandbox",
        "STORAGE_TYPE": "localfs"
    },
    "FOOTER_ORGANIZATION_IMAGE": "images/logo.png",
    "GITHUB_REPO_ROOT": "/edx/var/edxapp/data",
    "GIT_REPO_DIR": "/edx/var/edxapp/course_repos",
    "GOOGLE_SITE_VERIFICATION_ID": "",
    "GRADES_DOWNLOAD": {
        "BUCKET": "",
        "ROOT_PATH": "",
        "STORAGE_CLASS": "django.core.files.storage.FileSystemStorage",
        "STORAGE_KWARGS": {
            "location": "/tmp/edx-s3/grades"
        },
        "STORAGE_TYPE": ""
    },
    "HELP_TOKENS_BOOKS": {
    },
    "ICP_LICENSE": null,
    "ID_VERIFICATION_SUPPORT_LINK": "",
    "JWT_AUTH": {
        "JWT_AUDIENCE": "SET-ME-PLEASE",
        "JWT_ISSUER": "http://openedx.eiuc.org/oauth2",
        "JWT_SECRET_KEY": "SET-ME-PLEASE"
    },
    "JWT_EXPIRATION": 30,
    "JWT_EXPIRED_PRIVATE_SIGNING_KEYS": [],
    "JWT_ISSUER": "https://openedx.eiuc.org/oauth2",
    "JWT_PRIVATE_SIGNING_KEY": null,
    "LANGUAGE_CODE": "en",
    "LANGUAGE_COOKIE": "openedx-language-preference",
    "LMS_BASE": "openedx.eiuc.org",
    "LMS_INTERNAL_ROOT_URL": "https://openedx.eiuc.org",
    "LMS_ROOT_URL": "https://openedx.eiuc.org",
    "LOCAL_LOGLEVEL": "INFO",
    "LOGGING_ENV": "sandbox",
    "LOG_DIR": "/edx/var/logs/edx",
    "LTI_AGGREGATE_SCORE_PASSBACK_DELAY": 900,
    "LTI_USER_EMAIL_DOMAIN": "lti.example.com",
    "MAILCHIMP_NEW_USER_LIST_ID": null,
    "MAINTENANCE_BANNER_TEXT": "Sample banner message",
    "MEDIA_ROOT": "/edx/var/edxapp/media/",
    "MEDIA_URL": "/media/",
    "MICROSITE_CONFIGURATION": {},
    "MICROSITE_ROOT_DIR": "/edx/app/edxapp/edx-microsite",
    "MKTG_URLS": {},
    "MKTG_URL_LINK_MAP": {},
    "MOBILE_STORE_URLS": {},
    "OAUTH_DELETE_EXPIRED": true,
    "OAUTH_ENFORCE_SECURE": true,
    "OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS": 365,
    "OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS": 30,
    "OAUTH_OIDC_ISSUER": "https://openedx.eiuc.org/oauth2",
    "ONLOAD_BEACON_SAMPLE_RATE": 0.0,
    "ORA2_FILE_PREFIX": "default_env-default_deployment/ora2",
    "PAID_COURSE_REGISTRATION_CURRENCY": [
        "eur",
        "€"
    ],
    "PARENTAL_CONSENT_AGE_LIMIT": 13,
    "PARTNER_SUPPORT_EMAIL": "",
    "PASSWORD_COMPLEXITY": {},
    "PASSWORD_MAX_LENGTH": 75,
    "PASSWORD_MIN_LENGTH": 2,
    "PASSWORD_POLICY_COMPLIANCE_ROLLOUT_CONFIG": {
        "ENFORCE_COMPLIANCE_ON_LOGIN": false
    },
    "PASSWORD_RESET_SUPPORT_LINK": "",
    "PAYMENT_SUPPORT_EMAIL": "bil...@eiuc.org",
    "PDF_RECEIPT_BILLING_ADDRESS": "Enter your receipt billing\naddress here.\n",
    "PDF_RECEIPT_COBRAND_LOGO_PATH": "",
    "PDF_RECEIPT_DISCLAIMER_TEXT": "ENTER YOUR RECEIPT DISCLAIMER TEXT HERE.\n",
    "PDF_RECEIPT_FOOTER_TEXT": "Enter your receipt footer text here.\n",
    "PDF_RECEIPT_LOGO_PATH": "",
    "PDF_RECEIPT_TAX_ID": "00-0000000",
    "PDF_RECEIPT_TAX_ID_LABEL": "fake Tax ID",
    "PDF_RECEIPT_TERMS_AND_CONDITIONS": "Enter your receipt terms and conditions here.\n",
    "PERFORMANCE_GRAPHITE_URL": "SetPerformanceGraphiteHostName",
    "PLATFORM_DESCRIPTION": "Your Platform Description Here",
    "PLATFORM_FACEBOOK_ACCOUNT": "http://www.facebook.com/YourPlatformFacebookAccount",
    "PLATFORM_NAME": "edX",
    "PLATFORM_TWITTER_ACCOUNT": "@YourPlatformTwitterAccount",
    "POLICY_CHANGE_GRADES_ROUTING_KEY": "edx.lms.core.default",
    "PRESS_EMAIL": "pr...@example.com",
    "PROCTORING_SETTINGS": {},
    "PROFILE_IMAGE_BACKEND": {
        "class": "storages.backends.overwrite.OverwriteStorage",
        "options": {
            "base_url": "/media/profile-images/",
            "location": "/edx/var/edxapp/media/profile-images/"
        }
    },
    "PROFILE_IMAGE_MAX_BYTES": 1048576,
    "PROFILE_IMAGE_MIN_BYTES": 100,
    "PROFILE_IMAGE_SIZES_MAP": {
        "full": 500,
        "large": 120,
        "medium": 50,
        "small": 30
    },
    "RECALCULATE_GRADES_ROUTING_KEY": "edx.lms.core.default",
    "REGISTRATION_EXTRA_FIELDS": {
        "city": "hidden",
        "confirm_email": "hidden",
        "country": "required",
        "gender": "optional",
        "goals": "optional",
        "honor_code": "required",
        "level_of_education": "optional",
        "mailing_address": "hidden",
        "terms_of_service": "hidden",
        "year_of_birth": "optional"
    },
    "RETIRED_EMAIL_DOMAIN": "retired.invalid",
    "RETIRED_EMAIL_PREFIX": "retired__user_",
    "RETIRED_USERNAME_PREFIX": "retired__user_",
    "RETIRED_USER_SALTS": [
        "OVERRIDE ME WITH A RANDOM VALUE",
        "ROTATE SALTS BY APPENDING NEW VALUES"
    ],
    "RETIREMENT_SERVICE_WORKER_USERNAME": "OVERRIDE THIS WITH A VALID LMS USERNAME",
    "RETIREMENT_STATES": [
        "PENDING",
        "ERRORED",
        "ABORTED",
        "COMPLETE"
    ],
    "SERVER_EMAIL": "dev...@example.com",
    "SESSION_COOKIE_DOMAIN": "",
    "SESSION_COOKIE_NAME": "sessionid",
    "SESSION_COOKIE_SECURE": false,
    "SESSION_SAVE_EVERY_REQUEST": false,
    "SITE_NAME": "localhost",
    "SOCIAL_MEDIA_FOOTER_URLS": {},
    "SOCIAL_SHARING_SETTINGS": {
        "CERTIFICATE_FACEBOOK": false,
        "CERTIFICATE_TWITTER": false,
        "CUSTOM_COURSE_URLS": false,
        "DASHBOARD_FACEBOOK": false,
        "DASHBOARD_TWITTER": false
    },
    "STATIC_ROOT_BASE": "/edx/var/edxapp/staticfiles",
    "STATIC_URL_BASE": "/static/",
    "STUDIO_NAME": "Studio",
    "STUDIO_SHORT_NAME": "Studio",
    "SUPPORT_SITE_LINK": "",
    "SYSLOG_SERVER": "",
    "TECH_SUPPORT_EMAIL": "tech...@example.com",
    "TIME_ZONE": "America/New_York",
    "UNIVERSITY_EMAIL": "unive...@example.com",
    "VIDEO_CDN_URL": {
        "EXAMPLE_COUNTRY_CODE": "http://example.com/edx/video?s3_url="
    },
    "VIDEO_IMAGE_MAX_AGE": 31536000,
    "VIDEO_IMAGE_SETTINGS": {
        "DIRECTORY_PREFIX": "video-images/",
        "STORAGE_KWARGS": {
            "base_url": "/media/",
            "location": "/edx/var/edxapp/media/"
        },
        "VIDEO_IMAGE_MAX_BYTES": 2097152,
        "VIDEO_IMAGE_MIN_BYTES": 2048
    },
    "VIDEO_TRANSCRIPTS_MAX_AGE": 31536000,
    "VIDEO_TRANSCRIPTS_SETTINGS": {
        "DIRECTORY_PREFIX": "video-transcripts/",
        "STORAGE_KWARGS": {
            "base_url": "/media/",
            "location": "/edx/var/edxapp/media/"
        },
        "VIDEO_TRANSCRIPTS_MAX_BYTES": 3145728
    },
    "VIDEO_UPLOAD_PIPELINE": {
        "BUCKET": "",
        "ROOT_PATH": ""
    },
    "WIKI_ENABLED": true,
    "XBLOCK_FS_STORAGE_BUCKET": null,
    "XBLOCK_FS_STORAGE_PREFIX": null,
    "XBLOCK_SETTINGS": {},
    "ZENDESK_CUSTOM_FIELDS": {},
    "ZENDESK_URL": ""
}



Lawrence McDaniel

unread,
May 10, 2018, 3:49:50 PM5/10/18
to opene...@googlegroups.com
ok, the Oauth client config and nginx config from your 2nd message look consistent — that’s good. one suggestion: change the port in all cases from 8002 to 18130. while i’m not 100% certain that this is correct, i can confirm that the Ecommerce module runs correctly using this port on another current project of mine. 

also, i suggest that you take a close look at step #5 of https://blog.lawrencemcdaniel.com/open-edx-ecommerce/ as i can see that https://ecommerce.eiuc.org:8002/dashboard/ is still redirecting to 127.0.0.1:8000 

finally, i’d suggest that you do not use a custom subdomain for ecommerce. if i understand the setting below correctly then the correct addressing to get to Oscar Ecommerce dashboard should be http://openedx.eiuc.org:8002/dashboard instead of https://ecommerce.eiuc.org:8002/dashboard/





--
You received this message because you are subscribed to a topic in the Google Groups "Open edX operations" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openedx-ops/BovacP98Sbc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openedx-ops...@googlegroups.com.

Nicola Tonon

unread,
May 10, 2018, 6:02:36 PM5/10/18
to Open edX operations
I'm almost there :)
At least now it seems that oauth is working, but still i get a nasty server error 

  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/requests/models.py", line 382, in prepare_url
    raise InvalidURL("Invalid URL %r: No host supplied" % url)
InvalidURL: Invalid URL u'https:///openedx.eiuc.org/oauth2/access_token/': No host supplied

Lawrence McDaniel

unread,
May 10, 2018, 6:16:35 PM5/10/18
to opene...@googlegroups.com
i think you might be seeing this because of your incorporation of the additional subdomain ecommerce.eiuc.org. if you standardize all domains (except for perhaps the url for Studio which i’ve verified works reliably on it’s own independent sub-domain) then this might resolve the current error that you’re seeing. 



Nicola Tonon

unread,
May 10, 2018, 6:32:21 PM5/10/18
to Open edX operations
ecommerce.eiuc.org, has been trashed since your previous message :)

here are my relevant config files as they're now:

/edx/etc/ecommerce.yml
---
# This file is created and updated by ansible, edit at your peril


AFFILIATE_COOKIE_KEY: dev_affiliate_id
CACHES:
    default:
        BACKEND: django.core.cache.backends.memcached.MemcachedCache
        KEY_PREFIX: ecommerce
        LOCATION:
        - localhost:11211
COMPREHENSIVE_THEME_DIRS:
- /edx/var/edx-themes/edx-themes/ecommerce
- /edx/app/ecommerce/ecommerce/ecommerce/themes
CSRF_COOKIE_SECURE: false
DATABASES:
    default:
        ATOMIC_REQUESTS: true
        CONN_MAX_AGE: 60
        ENGINE: django.db.backends.mysql
        HOST: localhost
        NAME: ecommerce
        OPTIONS:
            connect_timeout: 10
            init_command: SET sql_mode='STRICT_TRANS_TABLES'
        PASSWORD: YghGMQTXi9ThNBt8RPq47cHKEMS2uApirpW
        PORT: '3306'
        USER: ecomm001
DEFAULT_SITE_THEME: null
ECOMMERCE_URL_ROOT: https://openedx.eiuc.org:18130
EDX_API_KEY: PUT_YOUR_API_KEY_HERE
EDX_DRF_EXTENSIONS:
    OAUTH2_USER_INFO_URL: https://openedx.eiuc.org/oauth2/user_info
ENABLE_COMPREHENSIVE_THEMING: false
ENTERPRISE_SERVICE_URL: https://openedx.eiuc.org/enterprise/
EXTRA_APPS: []
JWT_AUTH:
    JWT_ALGORITHM: HS256
    JWT_DECODE_HANDLER: ecommerce.extensions.api.handlers.jwt_decode_handler
    JWT_ISSUERS:
    - ecommerce_worker
    JWT_LEEWAY: 1
    JWT_SECRET_KEY: SET-ME-PLEASE
    JWT_SECRET_KEYS:
    - SET-ME-PLEASE
    JWT_VERIFY_EXPIRATION: true
LANGUAGE_CODE: en
LANGUAGE_COOKIE_NAME: openedx-language-preference
MEDIA_STORAGE_BACKEND:
    DEFAULT_FILE_STORAGE: django.core.files.storage.FileSystemStorage
    MEDIA_ROOT: /edx/var/ecommerce/media
    MEDIA_URL: /media/
OSCAR_FROM_EMAIL: os...@example.com
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
            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
SECRET_KEY: Nj0JhNngIGvlitTweoGqZM7WKYUoH3hWpbpmoxz36eKF2WejriWEFFLMm37mM8QcLisLXZLT4Z51rkKppMyeDIoW4huauVQBh3CH
SESSION_COOKIE_SECURE: true
SESSION_EXPIRE_AT_BROWSER_CLOSE: false
SOCIAL_AUTH_EDX_OIDC_ID_TOKEN_DECRYPTION_KEY: ecommerce-secret
SOCIAL_AUTH_EDX_OIDC_ISSUER: https://openedx.eiuc.org/oauth2
SOCIAL_AUTH_EDX_OIDC_KEY: ecommerce-key
SOCIAL_AUTH_EDX_OIDC_LOGOUT_URL: https://openedx.eiuc.org/logout
SOCIAL_AUTH_EDX_OIDC_PUBLIC_URL_ROOT: https://openedx.eiuc.org/oauth2
SOCIAL_AUTH_EDX_OIDC_SECRET: ecommerce-secret
SOCIAL_AUTH_EDX_OIDC_URL_ROOT: https://openedx.eiuc.org/oauth2
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





/edx/app/nginx/sites-available/ecommerce
#
# This file is created and updated by ansible, edit at your peril
#

upstream ecommerce_app_server {
    server 127.0.0.1:8130 fail_timeout=0;
}

# The Origin request header indicates where a fetch originates from. It doesn't include any path information,
# but only the server name (e.g. https://www.example.com).

# Here we set the value that is included in the Access-Control-Allow-Origin response header. If the origin is one
# of our known hosts--served via HTTP or HTTPS--we allow for CORS. Otherwise, we set the "null" value, disallowing CORS.

map $http_origin $cors_origin {
default "null";
}
server {
  #server_name ~^((stage|prod)-)?ecommerce.*;
  listen 18130 ssl;

lms.env.json
    "ECOMMERCE_API_URL": "https://openedx.eiuc.org:18130/api/v2",
    "ECOMMERCE_PUBLIC_URL_ROOT": "https://openedx.eiuc.org:18130",
        "ENABLE_SYSADMIN_DASHBOARD": true,
        "JWT_ISSUER": "https://openedx.eiuc.org/oauth2",
        "JWT_SECRET_KEY": "SET-ME-PLEASE"
    },
    "JWT_EXPIRATION": 30,
    "JWT_EXPIRED_PRIVATE_SIGNING_KEYS": [],
    "JWT_ISSUER": "https://openedx.eiuc.org/oauth2",
    "JWT_PRIVATE_SIGNING_KEY": null,
    "LANGUAGE_CODE": "en",
    "LANGUAGE_COOKIE": "openedx-language-preference",
    "LMS_BASE": "openedx.eiuc.org",
    "LMS_INTERNAL_ROOT_URL": "http://localhost:8000",


Nicola Tonon

unread,
May 11, 2018, 3:35:45 AM5/11/18
to opene...@googlegroups.com
Yeeeeeahhhhh! 
I’m finally done!
Thanks Lawrence for your patience and help!

Lawrence McDaniel

unread,
May 11, 2018, 7:27:43 AM5/11/18
to opene...@googlegroups.com
congratulations!!! 


<Screen Shot 2018-05-11 at 09.27.00.png>

--
You received this message because you are subscribed to a topic in the Google Groups "Open edX operations" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openedx-ops/BovacP98Sbc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openedx-ops...@googlegroups.com.

Eric Mensah

unread,
Jun 14, 2018, 9:26:14 AM6/14/18
to Open edX operations
Thank you guys! This thread helped me to finally troubleshoot my edX Ecommerce configuration that I had been struggling with for months. I finally got it working. I initially followed Lawrence's blog but that didn't help.

Lawrence, could you update your Blog to reflect the suggestions/recommendations you've provided here. The details you've provided here helped me a lot but I've spent more than a month without success, by following your blog.

Thanks!

Eric

Lawrence McDaniel

unread,
Jun 14, 2018, 9:44:30 AM6/14/18
to opene...@googlegroups.com
that’s excellent news Eric. would it be possible for us to speak offline anytime at your convenience to ferret out details of where my blog documentation is either misleading or is lacking detail? my schedule is flexible (other than during the next 2 hours in which the world cup opening ceremonies will be happening).

my personal email is lpm...@gmail.com in case you’d like to move the remainder of this conversation offline.

alternatively, we can talk by phone at either of these numbers: USA: +1 (415) 766-9012 | MEX: +52 1 (55) 4388-3070
or we can use Google Hangouts at lpm...@gmail.com
or Skype at mcdaniel0073

thanks!


--
You received this message because you are subscribed to a topic in the Google Groups "Open edX operations" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openedx-ops/BovacP98Sbc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openedx-ops...@googlegroups.com.

247cyber...@gmail.com

unread,
Jun 14, 2018, 11:20:10 AM6/14/18
to Open edX operations
Hi Lawrence,

Your blog documentation is not misleading per-se but I think it just needs a bit more details as you've provided on this discussion thread. I am at work at the moment but we can talk in the evening (any time after 6pm EST). I will contact you this evening.

I am so excited that I finally got the ecommerce working.

Eric


On Thursday, June 14, 2018 at 9:44:30 AM UTC-4, Lawrence McDaniel wrote:
that’s excellent news Eric. would it be possible for us to speak offline anytime at your convenience to ferret out details of where my blog documentation is either misleading or is lacking detail? my schedule is flexible (other than during the next 2 hours in which the world cup opening ceremonies will be happening).

my personal email is lpm...@gmail.com in case you’d like to move the remainder of this conversation offline.

alternatively, we can talk by phone at either of these numbers: USA: +1 (415) 766-9012 | MEX: +52 1 (55) 4388-3070
or we can use Google Hangouts at lpm...@gmail.com
or Skype at mcdaniel0073

thanks!

On Jun 14, 2018, at 01:29, Eric Mensah <iwebh...@gmail.com> wrote:

Thank you guys! This thread helped me to finally troubleshoot my edX Ecommerce configuration that I had been struggling with for months. I finally got it working. I initially followed Lawrence's blog but that didn't help.

Lawrence, could you update your Blog to reflect the suggestions/recommendations you've provided here. The details you've provided here helped me a lot but I've spent more than a month without success, by following your blog.

Thanks!

Eric

On Wednesday, April 25, 2018 at 1:55:59 PM UTC-4, Lawrence McDaniel wrote:
Hello all! for anyone interested, i created some supplemental documentation for setting up Ecommerce on Ginkgo which goes as far as getting the Oscar Ecommerce dashboard / admin console up on your screen. if there's continued interest then i could ostensibly continue documenting up thru product setup and PayPal integration. 

thanks!!
lawrence mcdaniel

--
You received this message because you are subscribed to a topic in the Google Groups "Open edX operations" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openedx-ops/BovacP98Sbc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openedx-ops+unsubscribe@googlegroups.com.

Mark Davies Tan

unread,
Jun 17, 2018, 10:56:44 PM6/17/18
to Open edX operations
Hi lawrence, I read that you stated that we can keep on running the create_or_update_site command to test things out. Do I have to keep on running the commands
python manage.py makemigrations
python manage.py migrate
every time i wanna run the create_or_update_site command?

Lawrence McDaniel

unread,
Jun 18, 2018, 9:10:50 AM6/18/18
to opene...@googlegroups.com
hi mark, the python migrations routines are used to synch your mysql database schema with any python/django code changes that might exist. in the type of devops roles that you and i presumably are playing we only encounter code changes of this nature when we install new software, thus, its a good idea to run migrations after having installed something new (like the Ecommerce module for example) but otherwise its probably unnecessary. 

* having said that, you can safely migrations as often as you like and no harm should come from it. 



Lawrence McDaniel
__________________________________
📡  Full-Stack Developer
CV: lawrencemcdaniel.comlinkedin.com/in/lawrencemcdaniel
Blog: blog.lawrencemcdaniel.com
Code Samples: horrors.lawrencemcdaniel.comgithub.com/lpm0073
Contact: lpm...@gmail.com | USA: +1 (415) 766-9012 | MEX: +52 1 (55) 4388-3070

--
You received this message because you are subscribed to a topic in the Google Groups "Open edX operations" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openedx-ops/BovacP98Sbc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openedx-ops...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-ops/b16f597a-6ed4-4451-85b6-137f996e54d6%40googlegroups.com.

Mark Davies Tan

unread,
Jun 20, 2018, 11:57:24 PM6/20/18
to Open edX operations
ok that's good to know~
Any idea why I'm getting a page not found? 
I'm actually using the ./manage.py runserver 0.0.0.0:8002 to run a dev server to test out ecommerce but whenever i try http://url:8002/login or http://url:8002/coupons I get a page not found page.

brice maroson

unread,
Mar 19, 2019, 7:55:06 AM3/19/19
to Open edX operations
Saisissez le code ici...

Hi Lawrence, I followed your blog to set up OSCAR ecommerce in Open edX, I was able to deploy it but I have some problems on Oauth2, I can not authenticate myself: it runs in loop on "https://edx-dev.mon-domaine.fr/login?next=/oauth2/authorize/confirm" and then it sends an error message 504
I am on the Open edX Ginkgo version
the configuration of ecommerce.yml
---
# This file is created and updated by ansible, edit at your peril

AFFILIATE_COOKIE_KEY: dev_affiliate_id
COMPREHENSIVE_THEME_DIRS: ["/edx/app/ecommerce/ecommerce/ecommerce/themes", ]
COURSE_CATALOG_API_URL: http://localhost:8008/api/v1/
DATABASES:
    default:
        ATOMIC_REQUESTS: true
        CONN_MAX_AGE: 60
        ENGINE: django.db.backends.mysql
        HOST: localhost
        NAME: ecommerce
        OPTIONS:
            connect_timeout: 10
        PASSWORD: N9NgtPR5HuDVGecZvSv3wvfvfc5Rncim0boVnyU
        PORT: 3306
        USER: ecomm001
DEFAULT_SITE_THEME: null
EDX_API_KEY: SET-ME-PLEASE
ENABLE_COMPREHENSIVE_THEMING: false
JWT_AUTH:
    JWT_ALGORITHM: HS256
    JWT_DECODE_HANDLER: ecommerce.extensions.api.handlers.jwt_decode_handler
    JWT_ISSUERS:
    - ecommerce_worker
    JWT_LEEWAY: 1
    JWT_SECRET_KEY: SET-ME-PLEASE
    JWT_SECRET_KEYS:
    - SET-ME-PLEASE
    JWT_VERIFY_EXPIRATION: true
LANGUAGE_CODE: en
LANGUAGE_COOKIE_NAME: openedx-language-preference
OSCAR_FROM_EMAIL: os...@example.com
PAYMENT_PROCESSOR_CONFIG:
    edx:
        cybersource:
            access_key: SET-ME-PLEASE
            merchant_id: SET-ME-PLEASE
            payment_page_url: https://set-me-please
            profile_id: SET-ME-PLEASE
            secret_key: SET-ME-PLEASE
            soap_api_url: https://set-me-please
            transaction_key: SET-ME-PLEASE
        paypal:
            client_id: SET-ME-PLEASE
            client_secret: SET-ME-PLEASE
            mode: sandbox
PLATFORM_NAME: Your Platform Name Here
SECRET_KEY: 7BPK2rjYkVgPS6BapJvfvfvfo2yUFththsLP41xvfvfvf7QCjbS0vfvfHQTFhUVVmrv6m5CiNPvffvfvfvfvfv
SESSION_EXPIRE_AT_BROWSER_CLOSE: false
SOCIAL_AUTH_EDX_OIDC_ID_TOKEN_DECRYPTION_KEY: ecommerce-secret
SOCIAL_AUTH_EDX_OIDC_ISSUER: https://edx-dev.mon-domaine.fr/oauth2
SOCIAL_AUTH_EDX_OIDC_KEY: ecommerce-key
SOCIAL_AUTH_EDX_OIDC_LOGOUT_URL: https://edx-dev.mon-domaine.fr/logout
SOCIAL_AUTH_EDX_OIDC_SECRET:  ecommerce-secret
SOCIAL_AUTH_EDX_OIDC_URL_ROOT: https://edx-dev.mon-domaine.fr/oauth2
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

the configuration of  lms.env.json

    "ACTIVATION_EMAIL_SUPPORT_LINK": "",
    "AFFILIATE_COOKIE_NAME": "dev_affiliate_id",
    "ALTERNATE_WORKER_QUEUES": "cms",
    "ANALYTICS_DASHBOARD_URL": "http://localhost:18110/courses",
    "ANALYTICS_DATA_URL": "",
    "ANALYTICS_SERVER_URL": "",
    "API_ACCESS_FROM_EMAIL": "api-requests@edx-dev.mon-domaine.fr",
    "API_ACCESS_MANAGER_EMAIL": "api-access@edx-dev.mon-domaine.fr",
    "AUDIT_CERT_CUTOFF_DATE": null,
    "AWS_SES_REGION_ENDPOINT": "email.us-east-1.amazonaws.com",
    "AWS_SES_REGION_NAME": "us-east-1",
    "BLOCK_STRUCTURES_SETTINGS": {
        "COURSE_PUBLISH_TASK_DELAY": 30,
        "TASK_DEFAULT_RETRY_DELAY": 30,
        "TASK_MAX_RETRIES": 5
    },
    "BOOK_URL": "",
    "BUGS_EMAIL": "bu...@edx-dev.univ.run",
    "BULK_EMAIL_DEFAULT_FROM_EMAIL": "no-reply@edx-dev.mon-domaine.fr",
    "BULK_EMAIL_EMAILS_PER_TASK": 500,
    "BULK_EMAIL_LOG_SENT_EMAILS": false,
    "BULK_EMAIL_ROUTING_KEY_SMALL_JOBS": "edx.lms.core.low",
    "CACHES": {
        "celery": {
            "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
            "KEY_FUNCTION": "util.memcache.safe_key",
            "KEY_PREFIX": "celery",
            "LOCATION": [
                "localhost:11211"
            ],
            "TIMEOUT": "7200"
        },
        "configuration": {
            "BACKEND": "django.core.cache.backends.memcached.MemcachedCache",
            "KEY_FUNCTION": "util.memcache.safe_key",
            "KEY_PREFIX": "edx-dev",
            "KEY_PREFIX": "edx-dev_general",
            "LOCATION": [
                "localhost:11211"
            ]
        }
    },
    "CAS_ATTRIBUTE_CALLBACK": "",
    "CAS_EXTRA_LOGIN_PARAMS": "",
    "CAS_SERVER_URL": "",
    "CDN_VIDEO_URLS": {},
    "CELERY_BROKER_HOSTNAME": "localhost",
    "CELERY_BROKER_TRANSPORT": "amqp",
    "CELERY_BROKER_USE_SSL": false,
    "CELERY_BROKER_VHOST": "",
    "CELERY_EVENT_QUEUE_TTL": null,
    "CELERY_QUEUES": [
        "edx.lms.core.low",
        "edx.lms.core.default",
        "edx.lms.core.high",
        "edx.lms.core.high_mem"
    ],
    "CERT_QUEUE": "certificates",
    "CMS_BASE": "studio.edx-dev.mon-domaine.fr",
    "CODE_JAIL": {
        "limits": {
            "CPU": 1,
            "FSIZE": 1048576,
            "PROXY": 0,
            "REALTIME": 3,
            "VMEM": 536870912
        },
        "python_bin": "/edx/app/edxapp/venvs/edxapp-sandbox/bin/python",
        "user": "sandbox"
    },
    "COMMENTS_SERVICE_KEY": "lLs0FWTdQWX3XxdOBCr4hWpDI6pyfMn66bi",
    "COMMENTS_SERVICE_URL": "http://localhost:18080",
    "COMPREHENSIVE_THEME_DIR": "/edx/app/edxapp/themes/raccoongang_theme/themes_for_themex.io-marvel-blue-theme-ginkgo",
    "COMPREHENSIVE_THEME_DIRS": [
        "/edx/app/edxapp/themes/raccoongang_theme"
    ],
    "COMPREHENSIVE_THEME_LOCALE_PATHS": [],
    "CONTACT_EMAIL": "info@edx-dev.mon-domaine.fr",
    "CONTACT_MAILING_ADDRESS": "edx@mon-domaine.fr",
    "CORS_ORIGIN_ALLOW_ALL": false,
    "CORS_ORIGIN_WHITELIST": [],
    "COURSES_WITH_UNSAFE_CODE": [],
    "COURSE_ABOUT_VISIBILITY_PERMISSION": "see_exists",
    "COURSE_CATALOG_API_URL": "http://localhost:8008/api/v1",
    "COURSE_CATALOG_VISIBILITY_PERMISSION": "see_exists",
    "CREDENTIALS_INTERNAL_SERVICE_URL": "http://localhost:8005",
    "CREDENTIALS_PUBLIC_SERVICE_URL": "http://localhost:8005",
    "CREDIT_HELP_LINK_URL": "",
    "CROSS_DOMAIN_CSRF_COOKIE_DOMAIN": "",
    "CROSS_DOMAIN_CSRF_COOKIE_NAME": "",
    "CSRF_COOKIE_SECURE": false,
    "DEFAULT_FEEDBACK_EMAIL": "feedback@edx-dev.mon-domaine.fr",
    "DEFAULT_FILE_STORAGE": "django.core.files.storage.FileSystemStorage",
    "DEFAULT_FROM_EMAIL": "unr.e...@gmail.com",
    "DEFAULT_SITE_THEME": "themes_for_themex.io-marvel-blue-theme-ginkgo",
    "DEPRECATED_ADVANCED_COMPONENT_TYPES": [],
    "ECOMMERCE_API_URL": "https://ecommerce.edx-dev.mon-domaine.fr/api/v2",
    "ECOMMERCE_PUBLIC_URL_ROOT": "https://ecommerce.edx-dev.mon-domaine.fr",
    "EDXMKTG_USER_INFO_COOKIE_NAME": "edx-user-info",
    "EDXNOTES_INTERNAL_API": "http://localhost:18120/api/v1",
    "EDXNOTES_PUBLIC_API": "http://localhost:18120/api/v1",
    "ELASTIC_SEARCH_CONFIG": [
        {
            "host": "localhost",
            "port": 9200,
            "use_ssl": false
        }
    ],
    "EMAIL_BACKEND": "django.core.mail.backends.smtp.EmailBackend",
    "EMAIL_HOST": "smtp.gmail.com",
    "EMAIL_PORT": 25,
    "EMAIL_USE_TLS": true,
    "ENABLE_COMPREHENSIVE_THEMING": "true",
    "ENTERPRISE_API_URL": "https://edx-dev.mon-domaine.fr/enterprise/api/v1",
    "ENTERPRISE_COURSE_ENROLLMENT_AUDIT_MODES": [
        "audit",
        "honor"
    ],
    "ENTERPRISE_ENROLLMENT_API_URL": "https://edx-dev.mon-domaine.fr/api/enrollment/v1/enrollment",
    "ENTERPRISE_SUPPORT_URL": "",
    "ENTERPRISE_TAGLINE": "",
    "EXTRA_MIDDLEWARE_CLASSES": [],
    "FEATURES": {
        "ALLOW_PUBLIC_ACCOUNT_CREATION": false,
        "PREVIEW_LMS_BASE": "preview.edx-dev.univ-reunion.fr",
        "SHOW_FOOTER_LANGUAGE_SELECTOR": false,
        "SHOW_HEADER_LANGUAGE_SELECTOR": false
    },
    "FEEDBACK_SUBMISSION_EMAIL": "",
    "FILE_UPLOAD_STORAGE_BUCKET_NAME": "SET-ME-PLEASE (ex. bucket-name)",
    "FILE_UPLOAD_STORAGE_PREFIX": "submissions_attachments",
    "FINANCIAL_REPORTS": {
        "BUCKET": null,
        "ROOT_PATH": "sandbox",
        "STORAGE_TYPE": "localfs"
    },
    "FOOTER_ORGANIZATION_IMAGE": "images/logo.png",
    "GITHUB_REPO_ROOT": "/edx/var/edxapp/data",
    "GIT_REPO_DIR": "/edx/var/edxapp/course_repos",
    "GRADES_DOWNLOAD": {
        "BUCKET": "",
        "ROOT_PATH": "",
        "STORAGE_CLASS": "django.core.files.storage.FileSystemStorage",
        "STORAGE_KWARGS": {
            "location": "/tmp/edx-s3/grades"
        },
        "STORAGE_TYPE": ""
    },
    "HELP_TOKENS_BOOKS": {
    },
    "ICP_LICENSE": null,
    "JWT_AUTH": {
        "JWT_AUDIENCE": "SET-ME-PLEASE",
        "JWT_ISSUER": "https://edx-dev.mon-domaine.fr/oauth2",
        "JWT_SECRET_KEY": "SET-ME-PLEASE"
    },
    "JWT_EXPIRATION": 30,
    "JWT_EXPIRED_PRIVATE_SIGNING_KEYS": [],
    "JWT_ISSUER": "https://edx-dev.mon-domaine.fr/oauth2",
    "JWT_PRIVATE_SIGNING_KEY": null,
    "LANGUAGE_CODE": "fr",
    "LANGUAGE_COOKIE": "openedx-language-preference",
    "LMS_BASE": "edx-dev.univ-reunion.fr",
    "LMS_INTERNAL_ROOT_URL":"http://localhost:8000",
    "LMS_ROOT_URL": "https://edx-dev.mon-domaine.fr",
    "LOCAL_LOGLEVEL": "INFO",
    "LOGGING_ENV": "sandbox",
    "LOG_DIR": "/edx/var/logs/edx",
    "LTI_AGGREGATE_SCORE_PASSBACK_DELAY": 900,
    "LTI_USER_EMAIL_DOMAIN": "lti.example.com",
    "MAILCHIMP_NEW_USER_LIST_ID": null,
    "MEDIA_ROOT": "/edx/var/edxapp/media/",
    "MEDIA_URL": "/media/",
    "MICROSITE_CONFIGURATION": {},
    "MICROSITE_ROOT_DIR": "/edx/app/edxapp/edx-microsite",
    "MKTG_URLS": {},
    "MKTG_URL_LINK_MAP": {},
    "MOBILE_STORE_URLS": {},
    "OAUTH_DELETE_EXPIRED": true,
    "OAUTH_ENFORCE_SECURE": false,
    "OAUTH_EXPIRE_CONFIDENTIAL_CLIENT_DAYS": 365,
    "OAUTH_EXPIRE_PUBLIC_CLIENT_DAYS": 30,
    "OAUTH_OIDC_ISSUER": "https://edx-dev.mon-domaine.fr/oauth2",
    "ONLOAD_BEACON_SAMPLE_RATE": 0.0,
    "ORA2_FILE_PREFIX": "default_env-default_deployment/ora2",
    "PAID_COURSE_REGISTRATION_CURRENCY": [
        "usd",
        "$"
    ],
    "PARTNER_SUPPORT_EMAIL": "",
    "PASSWORD_RESET_SUPPORT_LINK": "",
    "PAYMENT_SUPPORT_EMAIL": "bil...@example.com",
    "PDF_RECEIPT_BILLING_ADDRESS": "Enter your receipt billing\naddress here.\n",
    "PDF_RECEIPT_COBRAND_LOGO_PATH": "",
    "PDF_RECEIPT_DISCLAIMER_TEXT": "ENTER YOUR RECEIPT DISCLAIMER TEXT HERE.\n",
    "PDF_RECEIPT_FOOTER_TEXT": "Enter your receipt footer text here.\n",
    "PDF_RECEIPT_LOGO_PATH": "",
    "PDF_RECEIPT_TAX_ID": "00-0000000",
    "PDF_RECEIPT_TAX_ID_LABEL": "fake Tax ID",
    "PDF_RECEIPT_TERMS_AND_CONDITIONS": "Enter your receipt terms and conditions here.\n",
    "PERFORMANCE_GRAPHITE_URL": "SetPerformanceGraphiteHostName",
    "PLATFORM_FACEBOOK_ACCOUNT": "http://www.facebook.com/unr-dev",
    "PLATFORM_NAME": "UNR-DEV",
    "PLATFORM_TWITTER_ACCOUNT": "@obsunnumerique",
    "PRESS_EMAIL": "press@edx-dev.mon-domaine.fr",
    "PROCTORING_SETTINGS": {},
    "PROFILE_IMAGE_BACKEND": {
        "class": "storages.backends.overwrite.OverwriteStorage",
        "options": {
            "base_url": "/media/profile-images/",
            "location": "/edx/var/edxapp/media/profile-images/"
        }
    },
    "PROFILE_IMAGE_MAX_BYTES": 1048576,
    "PROFILE_IMAGE_MIN_BYTES": 100,
    "RECALCULATE_GRADES_ROUTING_KEY": "edx.lms.core.default",
    "REGISTRATION_EXTRA_FIELDS": {
        "city": "hidden",
        "confirm_email": "hidden",
        "country": "required",
        "gender": "optional",
        "goals": "optional",
        "honor_code": "required",
        "level_of_education": "optional",
        "mailing_address": "hidden",
        "terms_of_service": "hidden",
        "year_of_birth": "optional"
    },
    "SERVER_EMAIL": "devops@edx-dev.mon-domaine.fr",
    "SESSION_COOKIE_DOMAIN": "",
    "SESSION_COOKIE_NAME": "sessionid",
    "SESSION_COOKIE_SECURE": false,
    "SESSION_SAVE_EVERY_REQUEST": false,
    "SITE_NAME": "edx-dev.univ.run",
    "SOCIAL_MEDIA_FOOTER_URLS": {},
    "SOCIAL_SHARING_SETTINGS": {
        "CERTIFICATE_FACEBOOK": false,
        "CERTIFICATE_TWITTER": false,
        "CUSTOM_COURSE_URLS": false,
        "DASHBOARD_FACEBOOK": false,
        "DASHBOARD_TWITTER": false
    },
    "STATIC_ROOT_BASE": "/edx/var/edxapp/staticfiles",
    "STATIC_URL_BASE": "/static/",
    "STUDIO_NAME": "Studio",
    "STUDIO_SHORT_NAME": "Studio",
    "SUPPORT_SITE_LINK": "",
    "SYSLOG_SERVER": "",
    "TECH_SUPPORT_EMAIL": "technical@edx-dev.mon-domaine.fr",
    "TIME_ZONE": "Indian/Reunion",
    "UNIVERSITY_EMAIL": "university@edx-dev.mon-domaine.fr",
    "USE_CUSTOM_THEME": "false",
    "VIDEO_CDN_URL": {
        "EXAMPLE_COUNTRY_CODE": "http://example.com/edx/video?s3_url="
    },
    "VIDEO_IMAGE_MAX_AGE": 31536000,
    "VIDEO_IMAGE_SETTINGS": {
        "VIDEO_IMAGE_MAX_BYTES": 2097152,
        "VIDEO_IMAGE_MIN_BYTES": 2048
    },
    "VIDEO_UPLOAD_PIPELINE": {
        "BUCKET": "",
        "ROOT_PATH": ""
    },
    "VIRTUAL_UNIVERSITIES": [],
    "WIKI_ENABLED": true,
    "XBLOCK_FS_STORAGE_BUCKET": null,
    "XBLOCK_FS_STORAGE_PREFIX": null,
    "XBLOCK_SETTINGS": {},
    "ZENDESK_CUSTOM_FIELDS": {},
    "ZENDESK_URL": ""                                                                                                                                                                                                    

Configure Oscar Ecommerce

oidc.png























python manage.py create_or_update_site --site-id=1 --site-domain=edx-dev.mon-domaine.fr
--partner-code=edX --partner-name='Open edX' --lms-url-root=https://edx-dev.mon-domaine.fr
--payment-processors=cybersource,paypal --client-id=ecommerce-client
--client-secret=ecommerce-secret --from-email=my-...@gmail.com






Error log ecommerce
==> /edx/var/log/ecommerce/edx.log <==
Mar 19 08:06:26 edx-dev [service_variant=ecommerce][django.request] ERROR [edx-dev  19091] [/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/exception.py:132] - Internal Server Error: /complete/edx-oidc/
Traceback (most recent call last):
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 42, in inner
    response = get_response(request)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/utils/decorators.py", line 185, in inner
    return func(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_django/utils.py", line 50, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_django/views.py", line 32, in complete
    redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/actions.py", line 41, in do_complete
    user = backend.complete(user=user, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/base.py", line 40, in complete
    return self.auth_complete(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/auth_backends/backends.py", line 164, in auth_complete
    user = super(EdXOpenIdConnect, self).auth_complete(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/utils.py", line 252, in wrapper
    return func(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/oauth.py", line 395, in auth_complete
    method=self.ACCESS_TOKEN_METHOD
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/open_id_connect.py", line 180, in request_access_token
    response = self.get_json(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/base.py", line 238, in get_json
    return self.request(url, *args, **kwargs).json()
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/base.py", line 233, in request
    raise AuthFailed(self, str(err))
AuthFailed: Authentication failed: HTTPSConnectionPool(host='edx-dev.univ-reunion.fr', port=443): Max retries exceeded with url: /oauth2/access_token/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0693d0a1d0>: Failed to establish a new connection: [Errno 110] Connection timed out',))
Mar 19 08:06:26 edx-dev [service_variant=ecommerce][django.request] ERROR [edx-dev  19091] [/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/exception.py:132] - Internal Server Error: /complete/edx-oidc/
Traceback (most recent call last):
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 42, in inner
    response = get_response(request)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/utils/decorators.py", line 185, in inner
    return func(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_django/utils.py", line 50, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_django/views.py", line 32, in complete
    redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/actions.py", line 41, in do_complete
    user = backend.complete(user=user, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/base.py", line 40, in complete
    return self.auth_complete(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/auth_backends/backends.py", line 164, in auth_complete
    user = super(EdXOpenIdConnect, self).auth_complete(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/utils.py", line 252, in wrapper
    return func(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/oauth.py", line 395, in auth_complete
    method=self.ACCESS_TOKEN_METHOD
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/open_id_connect.py", line 180, in request_access_token
    response = self.get_json(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/base.py", line 238, in get_json
    return self.request(url, *args, **kwargs).json()
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/base.py", line 233, in request
    raise AuthFailed(self, str(err))
AuthFailed: Authentication failed: HTTPSConnectionPool(host='edx-dev.univ-reunion.fr', port=443): Max retries exceeded with url: /oauth2/access_token/ (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0693d0a1d0>: Failed to establish a new connection: [Errno 110] Connection timed out',))
Mar 19 08:06:26 edx-dev [service_variant=ecommerce][django.request] ERROR [edx-dev  19091] [/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/exception.py:132] - Internal Server Error: /complete/edx-oidc/
Traceback (most recent call last):
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 42, in inner
    response = get_response(request)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/utils/decorators.py", line 185, in inner
    return func(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 57, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
    return view_func(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_django/utils.py", line 50, in wrapper
    return func(request, backend, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_django/views.py", line 32, in complete
    redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/actions.py", line 41, in do_complete
    user = backend.complete(user=user, *args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/base.py", line 40, in complete
    return self.auth_complete(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/auth_backends/backends.py", line 164, in auth_complete
    user = super(EdXOpenIdConnect, self).auth_complete(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/utils.py", line 252, in wrapper
    return func(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/oauth.py", line 395, in auth_complete
    method=self.ACCESS_TOKEN_METHOD
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/open_id_connect.py", line 180, in request_access_token
    response = self.get_json(*args, **kwargs)
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/base.py", line 238, in get_json
    return self.request(url, *args, **kwargs).json()
  File "/edx/app/ecommerce/venvs/ecommerce/local/lib/python2.7/site-packages/social_core/backends/base.py", line 233, in request
    raise AuthFailed(self, str(err))

Capture du 2019-03-19 11-09-15.png









ecommerce.yml
Reply all
Reply to author
Forward
0 new messages