Commit c317bf93 by Clinton Blackburn Committed by Ibrahim

Fixing discovery for sandboxes

ECOM-3877
parent e391baab
......@@ -38,6 +38,7 @@
- analytics_api
- ecommerce
- credentials
- discovery
- oauth_client_setup
- role: datadog
when: COMMON_ENABLE_DATADOG
......
......@@ -18,9 +18,14 @@ DISCOVERY_GIT_IDENTITY: !!null
#
discovery_service_name: "discovery"
discovery_gunicorn_port: 8381
discovery_create_demo_data: false
# TODO Determine how to access edx_django_service_environment
discovery_code_dir: "{{ discovery_home }}/{{ discovery_service_name }}"
discovery_environment:
DISCOVERY_CFG: "{{ COMMON_CFG_DIR }}/{{ discovery_service_name }}.yml"
DJANGO_SETTINGS_MODULE: '{{ DISCOVERY_DJANGO_SETTINGS_MODULE }}'
PATH: '{{ discovery_home }}/nodeenvs/{{ discovery_service_name }}/bin:{{ discovery_home }}/venvs/{{ discovery_service_name }}/bin:{{ ansible_env.PATH }}'
discovery_user: "{{ discovery_service_name }}"
discovery_home: "{{ COMMON_APP_DIR }}/{{ discovery_service_name }}"
......
......@@ -20,3 +20,13 @@
# Example play:
#
#
- name: Create demo data
shell: './manage.py create_or_update_partner --site-id 1 --site-domain {{ DISCOVERY_URL_ROOT.split("://")[1] }} --code edx --name edX --courses-api-url "{{ DISCOVERY_LMS_URL_ROOT }}/api/courses/v1/" --ecommerce-api-url "{{ DISCOVERY_ECOMMERCE_URL_ROOT }}/api/v2/" --organizations-api-url "{{ DISCOVERY_LMS_URL_ROOT }}/api/organizations/v0/" --oidc-url-root "{{ DISCOVERY_LMS_URL_ROOT }}/oauth2" --oidc-key {{ DISCOVERY_SOCIAL_AUTH_EDX_OIDC_KEY }} --oidc-secret {{ DISCOVERY_SOCIAL_AUTH_EDX_OIDC_SECRET }}'
args:
chdir: "{{ discovery_code_dir }}"
become_user: "{{ discovery_user }}"
environment: "{{ discovery_environment }}"
when: discovery_create_demo_data
tags:
- install
......@@ -207,6 +207,7 @@ CREDENTIALS_VERSION: $credentials_version
DISCOVERY_NGINX_PORT: 80
DISCOVERY_SSL_NGINX_PORT: 443
DISCOVERY_VERSION: $discovery_version
NGINX_SET_X_FORWARDED_HEADERS: True
NGINX_REDIRECT_TO_HTTPS: True
EDX_ANSIBLE_DUMP_VARS: true
......@@ -296,10 +297,12 @@ CREDENTIALS_LMS_URL_ROOT: "https://${deploy_host}"
CREDENTIALS_DOMAIN: "credentials-${deploy_host}"
CREDENTIALS_URL_ROOT: "https://{{ CREDENTIALS_DOMAIN }}"
CREDENTIALS_SOCIAL_AUTH_REDIRECT_IS_HTTPS: true
COURSE_DISCOVERY_ECOMMERCE_API_URL: "https://ecommerce-${deploy_host}/api/v2"
discovery_create_demo_data: true
DISCOVERY_URL_ROOT: "https://discovery-${deploy_host}"
DISCOVERY_SOCIAL_AUTH_REDIRECT_IS_HTTPS: true
DISCOVERY_ECOMMERCE_URL_ROOT: "https://ecommerce-${deploy_host}"
DISCOVERY_LMS_URL_ROOT: "https://${deploy_host}"
EOF
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment