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
0885342f
Commit
0885342f
authored
Nov 01, 2016
by
Max Rothman
Committed by
GitHub
Nov 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3436 from edx/max/update-pipeline-migrations
Max/update pipeline migrations
parents
5f0f88bd
3d01d076
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
playbooks/continuous_delivery/run_migrations.yml
+8
-8
No files found.
playbooks/continuous_delivery/run_migrations.yml
View file @
0885342f
...
@@ -18,8 +18,8 @@
...
@@ -18,8 +18,8 @@
# - HIPCHAT_URL - URL of the hipchat API (defaults to v1 of the api)
# - HIPCHAT_URL - URL of the hipchat API (defaults to v1 of the api)
#
#
# Other variables:
# Other variables:
# -
unapplied_migrations_output
- the filename where the unapplied migration YAML output is stored
# -
migration_plan
- the filename where the unapplied migration YAML output is stored
# - migration_
outpu
t - the filename where the migration output is saved
# - migration_
resul
t - the filename where the migration output is saved
# - SUB_APPLICATION_NAME - used for migrations in edxapp {lms|cms}, must be specified
# - SUB_APPLICATION_NAME - used for migrations in edxapp {lms|cms}, must be specified
# when APPLICATION_NAME is edxapp
# when APPLICATION_NAME is edxapp
# - EDX_PLATFORM_SETTINGS - The settings to use for the edx platform {aws|devstack} DEFAULT: aws
# - EDX_PLATFORM_SETTINGS - The settings to use for the edx platform {aws|devstack} DEFAULT: aws
...
@@ -34,8 +34,8 @@
...
@@ -34,8 +34,8 @@
-
hosts
:
all
-
hosts
:
all
vars
:
vars
:
unapplied_migrations_output
:
unapplied_migrations
.yml
migration_plan
:
migration_plan
.yml
migration_
output
:
migration_outpu
t.yml
migration_
result
:
migration_resul
t.yml
HIPCHAT_URL
:
https://api.hipchat.com/v2/
HIPCHAT_URL
:
https://api.hipchat.com/v2/
EDX_PLATFORM_SETTINGS
:
"
aws"
EDX_PLATFORM_SETTINGS
:
"
aws"
COMMAND_PREFIX
:
"
.
{{
APPLICATION_PATH
}}/{{
APPLICATION_NAME
}}_env;
DB_MIGRATION_USER={{
DB_MIGRATION_USER
}}
DB_MIGRATION_PASS={{
DB_MIGRATION_PASS
}}
/edx/bin/python.{{
APPLICATION_NAME
}}
/edx/bin/manage.{{
APPLICATION_NAME
}}"
COMMAND_PREFIX
:
"
.
{{
APPLICATION_PATH
}}/{{
APPLICATION_NAME
}}_env;
DB_MIGRATION_USER={{
DB_MIGRATION_USER
}}
DB_MIGRATION_PASS={{
DB_MIGRATION_PASS
}}
/edx/bin/python.{{
APPLICATION_NAME
}}
/edx/bin/manage.{{
APPLICATION_NAME
}}"
...
@@ -51,23 +51,23 @@
...
@@ -51,23 +51,23 @@
register
:
temp_output_dir
register
:
temp_output_dir
-
name
:
generate list of unapplied migrations
-
name
:
generate list of unapplied migrations
shell
:
'
{{
COMMAND_PREFIX
}}
show_unapplied_migrations
--output_file
"{{
temp_output_dir.stdout
}}/{{
unapplied_migrations_output
}}"'
shell
:
'
{{
COMMAND_PREFIX
}}
show_unapplied_migrations
--output_file
"{{
temp_output_dir.stdout
}}/{{
migration_plan
}}"'
become_user
:
"
{{
APPLICATION_USER
}}"
become_user
:
"
{{
APPLICATION_USER
}}"
when
:
APPLICATION_NAME != "edxapp"
when
:
APPLICATION_NAME != "edxapp"
-
name
:
generate list of edxapp unapplied migrations
-
name
:
generate list of edxapp unapplied migrations
shell
:
'
{{
COMMAND_PREFIX
}}
{{
SUB_APPLICATION_NAME
}}
show_unapplied_migrations
--database
"{{
item
}}"
--output_file
"{{
temp_output_dir.stdout
}}/{{
item
}}_{{
unapplied_migrations_output
}}"
--settings
"{{
EDX_PLATFORM_SETTINGS
}}"'
shell
:
'
{{
COMMAND_PREFIX
}}
{{
SUB_APPLICATION_NAME
}}
show_unapplied_migrations
--database
"{{
item
}}"
--output_file
"{{
temp_output_dir.stdout
}}/{{
item
}}_{{
migration_plan
}}"
--settings
"{{
EDX_PLATFORM_SETTINGS
}}"'
become_user
:
"
{{
APPLICATION_USER
}}"
become_user
:
"
{{
APPLICATION_USER
}}"
when
:
APPLICATION_NAME == "edxapp" and item != "read_replica"
when
:
APPLICATION_NAME == "edxapp" and item != "read_replica"
with_items
:
edxapp_databases.keys()
with_items
:
edxapp_databases.keys()
-
name
:
migrate to apply any unapplied migrations
-
name
:
migrate to apply any unapplied migrations
shell
:
'
{{
COMMAND_PREFIX
}}
run_migrations
"{{
temp_output_dir.stdout
}}/{{
unapplied_migrations_output
}}"
--output_file
"{{
temp_output_dir.stdout
}}/{{
migration_outpu
t
}}"'
shell
:
'
{{
COMMAND_PREFIX
}}
run_migrations
--output_file
"{{
temp_output_dir.stdout
}}/{{
migration_resul
t
}}"'
become_user
:
"
{{
APPLICATION_USER
}}"
become_user
:
"
{{
APPLICATION_USER
}}"
when
:
APPLICATION_NAME != "edxapp"
when
:
APPLICATION_NAME != "edxapp"
-
name
:
migrate to apply any edxapp unapplied migrations
-
name
:
migrate to apply any edxapp unapplied migrations
shell
:
'
{{
COMMAND_PREFIX
}}
{{
SUB_APPLICATION_NAME
}}
run_migrations
"{{
temp_output_dir.stdout
}}/{{
item
}}_{{
unapplied_migrations_output
}}"
--database
"{{
item
}}"
--settings
"{{
EDX_PLATFORM_SETTINGS
}}"
--output_file
"{{
temp_output_dir.stdout
}}/{{
migration_outpu
t
}}"'
shell
:
'
{{
COMMAND_PREFIX
}}
{{
SUB_APPLICATION_NAME
}}
run_migrations
--database
"{{
item
}}"
--settings
"{{
EDX_PLATFORM_SETTINGS
}}"
--output_file
"{{
temp_output_dir.stdout
}}/{{
migration_resul
t
}}"'
become_user
:
"
{{
APPLICATION_USER
}}"
become_user
:
"
{{
APPLICATION_USER
}}"
when
:
APPLICATION_NAME == "edxapp" and item != "read_replica"
when
:
APPLICATION_NAME == "edxapp" and item != "read_replica"
with_items
:
edxapp_databases.keys()
with_items
:
edxapp_databases.keys()
...
...
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