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
4ce88416
Commit
4ce88416
authored
Feb 06, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding fake_migrations flag
parent
259d9977
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
10 deletions
+41
-10
playbooks/roles/edxapp/defaults/main.yml
+2
-7
playbooks/roles/edxapp/tasks/service_variant_config.yml
+39
-3
No files found.
playbooks/roles/edxapp/defaults/main.yml
View file @
4ce88416
...
...
@@ -134,14 +134,9 @@ EDXAPP_AUTOMATOR_AUTHORIZED_KEYS: []
EDXAPP_USE_GIT_IDENTITY
:
false
# Example: "{{ secure_dir }}/files/git-identity"
EDXAPP_LOCAL_GIT_IDENTITY
:
!!null
# Configuration for database migration
EDXAPP_MIGRATE_ENGINE
:
django.db.backends.mysql
EDXAPP_MIGRATE_NAME
:
"
{{
EDXAPP_MYSQL_DB_NAME
}}"
EDXAPP_MIGRATE_USER
:
"
{{
EDXAPP_MYSQL_USER
}}"
EDXAPP_MIGRATE_PASSWORD
:
"
{{
EDXAPP_MYSQL_PASSWORD
}}"
EDXAPP_MIGRATE_HOST
:
"
{{
EDXAPP_MYSQL_HOST
}}"
EDXAPP_MIGRATE_PORT
:
"
{{
EDXAPP_MYSQL_PORT
}}"
# Configuration for database migration
EDXAPP_TEST_MIGRATE_DB_NAME
:
"
{{
COMMON_ENVIRONMENT
}}_{{
COMMON_DEPLOYMENT
}}_test_{{
EDXAPP_MYSQL_DB_NAME
}}"
#-------- Everything below this line is internal to the role ------------
...
...
playbooks/roles/edxapp/tasks/service_variant_config.yml
View file @
4ce88416
...
...
@@ -44,23 +44,59 @@
when
:
celery_worker is defined and not devstack
sudo_user
:
"
{{
supervisor_user
}}"
# Fake migrations, only when fake_migrations is defined
# This overrides the database name to be the test database which
# the default application user has full write access to
-
name
:
syncdb and migrate
shell
:
>
chdir={{ edxapp_code_dir }}
{{ edxapp_venv_bin}}/python manage.py lms syncdb --migrate --noinput --settings=aws_migrate
when
:
migrate_db is defined and migrate_db|lower == "yes"
when
:
fake_migrations is defined and
migrate_db is defined and migrate_db|lower == "yes"
sudo_user
:
"
{{
edxapp_user
}}"
environment
:
"
{{
edxapp_migrate_environment
}}"
environment
:
DB_MIGRATION_NAME
:
"
{{
EDXAPP_TEST_MIGRATE_DB_NAME
}}"
notify
:
-
"
restart
edxapp"
-
"
restart
edxapp_workers"
# Regular migrations
-
name
:
syncdb and migrate
shell
:
>
chdir={{ edxapp_code_dir }}
{{ edxapp_venv_bin}}/python manage.py lms syncdb --migrate --noinput --settings=aws_migrate
when
:
fake_migrations is not defined and migrate_db is defined and migrate_db|lower == "yes"
sudo_user
:
"
{{
edxapp_user
}}"
notify
:
-
"
restart
edxapp"
-
"
restart
edxapp_workers"
# Fake migrations, only when fake_migrations is defined
# This overrides the database name to be the test database which
# the default application user has full write access to
-
name
:
syncdb and migrate
shell
:
>
chdir={{ edxapp_code_dir }}
{{ edxapp_venv_bin}}/python manage.py lms syncdb --migrate --noinput --settings=aws_migrate
when
:
fake_migrations is defined and migrate_db is defined and migrate_db|lower == "yes"
sudo_user
:
"
{{
edxapp_user
}}"
environment
:
DB_MIGRATION_NAME
:
"
{{
EDXAPP_TEST_MIGRATE_DB_NAME
}}"
notify
:
-
"
restart
edxapp"
-
"
restart
edxapp_workers"
# Regular migrations
-
name
:
db migrate
shell
:
>
chdir={{ edxapp_code_dir }}
{{ edxapp_venv_bin}}/python manage.py lms migrate --noinput --settings=aws_migrate
when
:
migrate_only is defined and migrate_only|lower == "yes"
when
:
fake_migrations is not defined and
migrate_only is defined and migrate_only|lower == "yes"
sudo_user
:
"
{{
edxapp_user
}}"
notify
:
-
"
restart
edxapp"
-
"
restart
edxapp_workers"
# Gather assets using rake if possible
...
...
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