Commit 91d333f7 by Bill Filler

Merge remote-tracking branch 'origin/clintonb/es-update' into bfiller/fix-discovery

parents f4b61ae9 93cda757
......@@ -38,6 +38,7 @@
- analytics_api
- ecommerce
- credentials
- discovery
- oauth_client_setup
- role: datadog
when: COMMON_ENABLE_DATADOG
......
......@@ -21,7 +21,6 @@
edx_platform_version: 'master'
# Set to false if deployed behind another proxy/load balancer.
NGINX_SET_X_FORWARDED_HEADERS: True
DISCOVERY_URL_ROOT: 'http://localhost:{{ DISCOVERY_NGINX_PORT }}'
roles:
- role: swapfile
SWAPFILE_SIZE: 4GB
......
......@@ -17,9 +17,14 @@
#
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 }}"
......@@ -51,9 +56,10 @@ DISCOVERY_ELASTICSEARCH_INDEX_NAME: 'catalog'
DISCOVERY_MEMCACHE: [ 'memcache' ]
DISCOVERY_VERSION: "master"
DISCOVERY_VERSION: 'master'
DISCOVERY_DJANGO_SETTINGS_MODULE: "course_discovery.settings.production"
DISCOVERY_URL_ROOT: 'http://discovery:{{ DISCOVERY_NGINX_PORT }}'
DISCOVERY_HOSTNAME: 'localhost'
DISCOVERY_URL_ROOT: 'http://{{ DISCOVERY_HOSTNAME }}:{{ DISCOVERY_NGINX_PORT }}'
DISCOVERY_LOGOUT_URL: '{{ DISCOVERY_URL_ROOT }}/logout/'
DISCOVERY_SECRET_KEY: 'Your secret key here'
......
......@@ -50,3 +50,4 @@ dependencies:
edx_django_service_extra_apps: '{{ DISCOVERY_EXTRA_APPS }}'
edx_django_service_session_expire_at_browser_close: '{{ DISCOVERY_SESSION_EXPIRE_AT_BROWSER_CLOSE }}'
edx_django_service_automated_users: '{{ DISCOVERY_AUTOMATED_USERS }}'
edx_django_service_hostname: '{{ DISCOVERY_HOSTNAME }}'
......@@ -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
......@@ -18,7 +18,6 @@
COMMON_SECURITY_UPDATES: true
SECURITY_UPGRADE_ON_ANSIBLE: true
MONGO_AUTH: false
DISCOVERY_URL_ROOT: 'http://localhost:{{ DISCOVERY_NGINX_PORT }}'
vars_files:
- roles/edxapp/vars/devstack.yml
roles:
......
......@@ -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,13 @@ 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_HOSTNAME: "discovery-${deploy_host}"
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