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
OpenEdx
configuration
Commits
aff8db61
Commit
aff8db61
authored
Jun 24, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
run collectstatic
parent
9a75c7fa
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
2 deletions
+31
-2
playbooks/roles/analytics-api/defaults/main.yml
+2
-0
playbooks/roles/analytics-api/tasks/deploy.yml
+10
-0
playbooks/roles/analytics-api/templates/edx/app/analytics-api/analytics-api.sh.j2
+1
-0
playbooks/roles/edx_service/tasks/main.yml
+13
-2
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/analytics-api.j2
+5
-0
No files found.
playbooks/roles/analytics-api/defaults/main.yml
View file @
aff8db61
...
...
@@ -62,6 +62,8 @@ ANALYTICS_API_CONFIG:
EMAIL_HOST_USER
:
"
"
EMAIL_PORT
:
587
API_AUTH_TOKEN
:
'
put-your-api-token-here'
STATICFILES_DIRS
:
[]
STATIC_ROOT
:
"
{{
COMMON_DATA_DIR
}}/{{
analytics_api_service_name
}}/staticfiles"
# db config
DATABASE_OPTIONS
:
connect_timeout
:
10
...
...
playbooks/roles/analytics-api/tasks/deploy.yml
View file @
aff8db61
...
...
@@ -10,8 +10,18 @@
dest={{ analytics_api_code_dir }} repo={{ analytics_api_source_repo }} version={{ ANALYTICS_API_VERSION }}
accept_hostkey=yes
ssh_opts="{{ analytics_api_git_ssh_opts }}"
register
:
analytics_api_code_checkout
sudo_user
:
"
{{
analytics_api_user
}}"
-
name
:
run collectstatic
shell
:
>
chdir={{ analytics_api_code_dir }}
{{ analytics_api_venv_bin }}/python manage.py collectstatic --settings analyticsdataserver.settings.production --noinput --settings analyticsdataserver.settings.production
sudo_user
:
"
{{
analytics_api_user
}}"
environment
:
ANALYTICS_API_CFG
:
"
{{
COMMON_CFG_DIR
}}/{{
analytics_api_service_name
}}.yaml"
tags
:
tst
-
name
:
install application requirements
pip
:
>
requirements="{{ analytics_api_requirements_base }}/{{ item }}"
...
...
playbooks/roles/analytics-api/templates/edx/app/analytics-api/analytics-api.sh.j2
View file @
aff8db61
...
...
@@ -13,6 +13,7 @@ export NEW_RELIC_APP_NAME="{{ ANALYTICS_API_NEWRELIC_APPNAME }}"
export
NEW_RELIC_LICENSE_KEY
=
"{{ NEWRELIC_LICENSE_KEY }}"
{
% endif -%
}
export
SERVICE_VARIANT
={{
analytics_api_service_name
}}
export
DJANGO_SETTINGS_MODULE
=
"analyticsdataserver.settings.production"
export
ANALYTICS_API_CFG
=
"{{ COMMON_CFG_DIR }}/{{ analytics_api_service_name }}.yaml"
...
...
playbooks/roles/edx_service/tasks/main.yml
View file @
aff8db61
...
...
@@ -44,13 +44,24 @@
-
"
{{
COMMON_APP_DIR
}}/{{
edx_service_name
}}"
-
"
{{
COMMON_APP_DIR
}}/{{
edx_service_name
}}/venvs"
-
name
:
create edx_service
log
dir
-
name
:
create edx_service
data and staticfiles
dir
file
:
>
path="{{ item }}"
state=directory
owner="{{
common_web_user
}}"
owner="{{
edx_service_name
}}"
group="{{ common_web_group }}"
with_items
:
-
"
{{
COMMON_DATA_DIR
}}/{{
edx_service_name
}}/data"
-
"
{{
COMMON_DATA_DIR
}}/{{
edx_service_name
}}/staticfiles"
-
name
:
create edx_service log dir
file
:
>
path="{{ item }}"
state=directory
owner="syslog"
group="syslog"
with_items
:
-
"
{{
COMMON_LOG_DIR
}}/{{
edx_service_name
}}"
# Replace dashes with underscores to support roles that use
...
...
playbooks/roles/nginx/templates/edx/app/nginx/sites-available/analytics-api.j2
View file @
aff8db61
...
...
@@ -7,6 +7,11 @@ upstream analytics_api_app_server {
server {
listen {{ ANALYTICS_API_NGINX_PORT }} default_server;
location ~ ^/static/(?P<file>.*) {
root {{ COMMON_DATA_DIR }}/{{ analytics_api_service_name }};
try_files /staticfiles/$file =404;
}
location / {
{% include "basic-auth.j2" %}
try_files $uri @proxy_to_app;
...
...
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