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
95563a7f
Commit
95563a7f
authored
Feb 06, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #737 from edx/jarv/migration-config
Jarv/migration config
parents
2e71d493
cd544f88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
5 deletions
+51
-5
playbooks/roles/edxapp/defaults/main.yml
+3
-0
playbooks/roles/edxapp/tasks/service_variant_config.yml
+43
-5
util/vpc-tools/abbey.py
+5
-0
No files found.
playbooks/roles/edxapp/defaults/main.yml
View file @
95563a7f
...
...
@@ -135,6 +135,9 @@ EDXAPP_USE_GIT_IDENTITY: false
# Example: "{{ secure_dir }}/files/git-identity"
EDXAPP_LOCAL_GIT_IDENTITY
:
!!null
# 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 ------------
#Use YAML references (& and *) and hash merge <<: to factor out shared settings
...
...
playbooks/roles/edxapp/tasks/service_variant_config.yml
View file @
95563a7f
...
...
@@ -44,21 +44,60 @@
when
:
celery_worker is defined and not devstack
sudo_user
:
"
{{
supervisor_user
}}"
# Fake syncdb with migrate, 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
:
SERVICE_VARIANT=lms {{ edxapp_venv_bin}}/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
when
:
migrate_db is defined and migrate_db|lower == "yes"
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 syncdb with migrate
-
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 migrate, 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
:
db migrate
shell
:
SERVICE_VARIANT=lms {{ edxapp_venv_bin }}/django-admin.py migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
when
:
migrate_only is defined and migrate_only|lower == "yes"
shell
:
>
chdir={{ edxapp_code_dir }}
{{ edxapp_venv_bin}}/python manage.py lms migrate --noinput --settings=aws_migrate
when
:
fake_migrations is defined and migrate_only is defined and migrate_only|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
:
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
...
...
@@ -75,4 +114,3 @@
-
"
restart
edxapp_workers"
environment
:
"
{{
edxapp_environment
}}"
util/vpc-tools/abbey.py
View file @
95563a7f
...
...
@@ -336,6 +336,11 @@ secure_vars: $secure_vars_file
# to true in the extra vars for this
# variable to be used.
EDXAPP_LOCAL_GIT_IDENTITY: $secure_identity
# abbey will always run fake migrations
# this is so that the application can come
# up healthy
fake_migrations: true
EOF
chmod 400 $secure_identity
...
...
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