Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
14db9ed8
Commit
14db9ed8
authored
Jun 24, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
read config from yaml
parent
9c8baf9d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
16 deletions
+21
-16
playbooks/edx-east/analytics-api.yml
+1
-0
playbooks/roles/analytics-api/defaults/main.yml
+8
-8
playbooks/roles/analytics-api/tasks/deploy.yml
+1
-0
playbooks/roles/analytics-api/templates/edx/app/analytics-api/analytics-api.sh.j2
+2
-1
playbooks/roles/edx_service/tasks/main.yml
+0
-1
playbooks/roles/edxlocal/tasks/main.yml
+9
-6
No files found.
playbooks/edx-east/analytics-api.yml
View file @
14db9ed8
...
...
@@ -8,6 +8,7 @@
ENABLE_NEWRELIC
:
False
roles
:
-
aws
-
edxlocal
-
analytics-api
-
role
:
datadog
when
:
COMMON_ENABLE_DATADOG
...
...
playbooks/roles/analytics-api/defaults/main.yml
View file @
14db9ed8
...
...
@@ -30,7 +30,7 @@ analytics_api_home: "{{ COMMON_APP_DIR }}/{{ analytics_api_service_name }}"
analytics_api_venv_base
:
"
{{
analytics_api_home
}}/venvs"
analytics_api_venv_dir
:
"
{{
analytics_api_venv_base
}}/{{
analytics_api_service_name
}}"
analytics_api_venv_bin
:
"
{{
analytics_api_venv_dir
}}/bin"
analytics_api_code_dir
:
"
{{
analytics_api_app_dir
}}/
src/
edx-analytics-data-api"
analytics_api_code_dir
:
"
{{
analytics_api_app_dir
}}/edx-analytics-data-api"
analytics_api_conf_dir
:
"
{{
analytics_api_home
}}"
analytics_api_gunicorn_host
:
"
0.0.0.0"
analytics_api_gunicorn_port
:
"
8080"
...
...
@@ -63,22 +63,22 @@ ANALYTICS_API_CONFIG:
API_AUTH_TOKEN
:
'
put-your-api-token-here'
# db config
DATABASES
:
# rw user
default
:
ENGINE
:
'
django.db.backends.mysql'
NAME
:
'
reports
'
USER
:
'
pipeline
'
NAME
:
'
analytics-api
'
USER
:
'
api001
'
PASSWORD
:
'
password'
HOST
:
'
localhost'
PORT
:
'
3306'
analytics
:
# read-only user
reports
:
ENGINE
:
'
django.db.backends.mysql'
NAME
:
'
analytics-api
'
USER
:
'
api
'
NAME
:
'
reports
'
USER
:
'
reports001
'
PASSWORD
:
'
password'
HOST
:
'
localhost'
PORT
:
'
3306'
#
# OS packages
#
...
...
playbooks/roles/analytics-api/tasks/deploy.yml
View file @
14db9ed8
...
...
@@ -10,6 +10,7 @@
dest={{ analytics_api_code_dir }} repo={{ analytics_api_source_repo }} version={{ ANALYTICS_API_VERSION }}
accept_hostkey=yes
ssh_opts="{{ analytics_api_git_ssh_opts }}"
sudo_user
:
"
{{
analytics_api_user
}}"
-
name
:
install application requirements
pip
:
>
...
...
playbooks/roles/analytics-api/templates/edx/app/analytics-api/analytics-api.sh.j2
View file @
14db9ed8
...
...
@@ -13,6 +13,7 @@ export NEW_RELIC_APP_NAME="{{ ANALYTICS_API_NEWRELIC_APPNAME }}"
export
NEW_RELIC_LICENSE_KEY
=
"{{ NEWRELIC_LICENSE_KEY }}"
{
% endif -%
}
export
DJANGO_SETTINGS_MODULE
=
"analyticsdataserver.settings.production"
export
ANALYTICS_API_CFG
=
"{{ COMMON_CFG_DIR }}/{{ analytics_api_service_name }}.yaml"
{{
executable
}}
-b
{{
analytics_api_gunicorn_host
}}
:
{{
analytics_api_gunicorn_port
}}
-w
{{
analytics_api_gunicorn_workers
}}
--timeout
={{
analytics_api_gunicorn_timeout
}}
analyticsdataserver.wsgi:application
{{
executable
}}
-
-pythonpath
={{
analytics_api_code_dir
}}
-
b
{{
analytics_api_gunicorn_host
}}
:
{{
analytics_api_gunicorn_port
}}
-w
{{
analytics_api_gunicorn_workers
}}
--timeout
={{
analytics_api_gunicorn_timeout
}}
analyticsdataserver.wsgi:application
playbooks/roles/edx_service/tasks/main.yml
View file @
14db9ed8
...
...
@@ -43,7 +43,6 @@
with_items
:
-
"
{{
COMMON_APP_DIR
}}/{{
edx_service_name
}}"
-
"
{{
COMMON_APP_DIR
}}/{{
edx_service_name
}}/venvs"
-
"
{{
COMMON_APP_DIR
}}/{{
edx_service_name
}}/data"
-
name
:
create edx_service log dir
file
:
>
...
...
playbooks/roles/edxlocal/tasks/main.yml
View file @
14db9ed8
...
...
@@ -18,12 +18,14 @@
name={{ EDXAPP_MYSQL_USER_MIGRATE }}
password={{ EDXAPP_MYSQL_PASSWORD_MIGRATE}}
priv='{{EDXAPP_MYSQL_DB_NAME}}.*:ALL'
when
:
EDXAPP_MYSQL_USER_MIGRATE is defined
-
name
:
setup the edxapp db user
mysql_user
:
>
name={{ EDXAPP_MYSQL_USER }}
password={{ EDXAPP_MYSQL_PASSWORD }}
priv='{{EDXAPP_MYSQL_DB_NAME}}.*:ALL'
when
:
EDXAPP_MYSQL_USER is defined
-
name
:
create a database for edxapp
mysql_db
:
>
...
...
@@ -51,6 +53,7 @@
name={{ ORA_MYSQL_USER }}
password={{ ORA_MYSQL_PASSWORD }}
priv='{{ORA_MYSQL_DB_NAME}}.*:ALL'
when
:
ORA_MYSQL_USER is defined
-
name
:
create a database for ora
mysql_db
:
>
...
...
@@ -84,18 +87,18 @@
-
'
analytics-api'
when
:
analytics_api_role_name is defined
-
name
:
create
database users
analytics api
-
name
:
create
api user for the
analytics api
mysql_user
:
>
name=
reports
name=
api001
password=password
priv='
reports
.*:ALL'
priv='
analytics-api
.*:ALL'
when
:
analytics_api_role_name is defined
-
name
:
create
database users analytics
api
-
name
:
create
read-only reports user for the analytics-
api
mysql_user
:
>
name=
api
name=
reports001
password=password
priv='
analytics-api.*:ALL
'
priv='
reports.*:SELECT
'
when
:
analytics_api_role_name is defined
-
name
:
install memcached
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment