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
9f67f7d5
Commit
9f67f7d5
authored
Mar 07, 2014
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to have a new flag for updating the staticfiles KEY_PREFIX.
parent
a668b86e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
4 deletions
+9
-4
playbooks/roles/edxapp/defaults/main.yml
+2
-0
playbooks/roles/edxapp/tasks/deploy.yml
+4
-4
playbooks/roles/edxapp/templates/lms.env.json.j2
+3
-0
No files found.
playbooks/roles/edxapp/defaults/main.yml
View file @
9f67f7d5
...
...
@@ -147,6 +147,8 @@ EDXAPP_LOCAL_GIT_IDENTITY: !!null
# Configuration for database migration
EDXAPP_TEST_MIGRATE_DB_NAME
:
"
{{
COMMON_ENVIRONMENT
}}_{{
COMMON_DEPLOYMENT
}}_test_{{
EDXAPP_MYSQL_DB_NAME
}}"
EDXAPP_UPDATE_STATIC_FILES_KEY
:
false
#-------- Everything below this line is internal to the role ------------
#Use YAML references (& and *) and hash merge <<: to factor out shared settings
...
...
playbooks/roles/edxapp/tasks/deploy.yml
View file @
9f67f7d5
...
...
@@ -10,16 +10,16 @@
-
name
:
Get current time
shell
:
'
date
+%s'
register
:
time_in_seconds
when
:
EDXAPP_UPDATE_STATIC_FILES_KEY
-
name
:
Update the static_files_key_prefix
set_fact
:
EDXAPP_ENV_EXTRA
:
CACHES
:
staticfiles
:
KEY_PREFIX
:
'
{{time_in_seconds.stdout}}'
edxapp_dynamic_cache_key
:
'
{{time_in_seconds.stdout}}'
when
:
EDXAPP_UPDATE_STATIC_FILES_KEY
-
name
:
Print out the staticfiles prefix
debug
:
msg="Setting static_files_cache_prefix to {{time_in_seconds.stdout}}"
when
:
EDXAPP_UPDATE_STATIC_FILES_KEY
# Optional auth for git
-
name
:
create ssh script for git (not authenticated)
...
...
playbooks/roles/edxapp/templates/lms.env.json.j2
View file @
9f67f7d5
{% do lms_env_config.update(EDXAPP_ENV_EXTRA) %}
{% if EDXAPP_UPDATE_STATIC_FILES_KEY %}
{%- do lms_env_config['CACHES']['staticfiles'].update({'KEY_PREFIX': edxapp_dynamic_cache_key}) %}
{% endif %}
{{ lms_env_config | to_nice_json }}
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