Commit ffae5d8f by Edward Zarecor

Merge pull request #2346 from edx/e0d/common-refactor-hackathon

E0d/common refactor hackathon
parents faef3acd b82a1b68
......@@ -29,7 +29,7 @@ ANALYTICS_API_DATABASES:
NAME: '{{ ANALYTICS_API_DEFAULT_DB_NAME }}'
USER: 'api001'
PASSWORD: 'password'
HOST: 'localhost'
HOST: '{{ analytics_api_db_default_hostname }}'
PORT: '3306'
# read-only user
reports:
......@@ -37,7 +37,7 @@ ANALYTICS_API_DATABASES:
NAME: '{{ ANALYTICS_API_REPORTS_DB_NAME }}'
USER: 'reports001'
PASSWORD: 'password'
HOST: 'localhost'
HOST: '{{ analytics_api_db_reports_hostname }}'
PORT: '3306'
ANALYTICS_API_VERSION: "master"
......@@ -45,10 +45,27 @@ ANALYTICS_API_VERSION: "master"
ANALYTICS_API_USERS:
"dummy-api-user": "changeme"
#on docker, use {{ analytics_api_service_name }}
ANALYTICS_API_HOSTNAME: ""
#on docker, use {{ analytics_api_service_name }}-default-mysql
ANALYTICS_API_DB_DEFAULT_HOSTNAME: ""
# on docker, use {{ analytics_api_service_name }}-reports-mysql
ANALYTICS_API_DB_REPORTS_HOSTNAME: ""
#on docker, use {{ analytics_api_service_name }}-email
ANALYTICS_API_EMAIL_HOSTNAME: ""
#common_domain is "localhost", or ".local.edx.org" on docker
ANALYTICS_API_FQDN: "{{ ANALYTICS_API_HOSTNAME }}{{ COMMON_DOMAIN }}"
ANALYTICS_API_DB_DEFAULT_FQDN: "{{ ANALYTICS_API_DB_DEFAULT_HOSTNAME }}{{ COMMON_DOMAIN }}"
ANALYTICS_API_DB_REPORTS_FQDN: "{{ ANALYTICS_API_DB_REPORTS_HOSTNAME }}{{ COMMON_DOMAIN }}"
ANALYTICS_API_EMAIL_FQDN: "{{ ANALYTICS_API_EMAIL_HOSTNAME }}{{ COMMON_DOMAIN }}"
ANALYTICS_API_SECRET_KEY: 'Your secret key here'
ANALYTICS_API_TIME_ZONE: 'UTC'
ANALYTICS_API_LANGUAGE_CODE: 'en-us'
ANALYTICS_API_EMAIL_HOST: 'localhost'
ANALYTICS_API_EMAIL_HOST_USER: 'mail_user'
ANALYTICS_API_EMAIL_HOST_PASSWORD: 'mail_password'
ANALYTICS_API_EMAIL_PORT: 587
......@@ -60,7 +77,7 @@ ANALYTICS_API_SERVICE_CONFIG:
TIME_ZONE: '{{ ANALYTICS_API_TIME_ZONE }}'
LANGUAGE_CODE: '{{ANALYTICS_API_LANGUAGE_CODE }}'
# email config
EMAIL_HOST: '{{ ANALYTICS_API_EMAIL_HOST }}'
EMAIL_HOST: '{{ ANALYTICS_API_EMAIL_HOSTNAME }}'
EMAIL_HOST_PASSWORD: '{{ ANALYTICS_API_EMAIL_HOST_PASSWORD }}'
EMAIL_HOST_USER: '{{ ANALYTICS_API_EMAIL_HOST_USER }}'
EMAIL_PORT: '{{ ANALYTICS_API_EMAIL_PORT }}'
......
Common variables are defined in the common_vars role on which this role depends. This is to allow sharing vars without creating side-effects. Any vars requred by this role should be added to common_vars/defaults/main.yml
\ No newline at end of file
---
dependencies:
- common_vars
- role: user
user_info: "{{ COMMON_USER_INFO }}"
- role: security
......
There should never be any side-effecting tasks included in this role.
It is used solely for making shared variables available across roles.
\ No newline at end of file
......@@ -3,6 +3,9 @@
# to change the base directory
# where edX is installed
#In docker, set to .local.edx.org (NOTICE LEADING .)
COMMON_DOMAIN: localhost
# Set global htpasswd credentials
COMMON_ENABLE_BASIC_AUTH: False
COMMON_HTPASSWD_USER: edx
......
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