Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃毟(apps) run the db_migrate job before starting application pods #411

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Run `db_migrate` jobs before starting new pods in a deployment

## [4.3.0] - 2019-12-13

### Added
Expand Down
6 changes: 4 additions & 2 deletions apps/edxapp/templates/services/cms/job_05_db_migrate.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ metadata:
namespace: "{{ project_name }}"
labels:
app: edxapp
deployment_stamp: "{{ deployment_stamp }}"
job_stamp: "{{ job_stamp }}"
# Jobs with the "pre" job type will be executed prior to deployments
job_type: "pre"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be conditioned to non-trashable environments.

service: cms
version: "{{ edxapp_image_tag }}"
job_stamp: "{{ job_stamp }}"
deployment_stamp: "{{ deployment_stamp }}"
spec:
template:
metadata:
Expand Down
6 changes: 4 additions & 2 deletions apps/edxapp/templates/services/lms/job_04_db_migrate.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ metadata:
namespace: "{{ project_name }}"
labels:
app: edxapp
deployment_stamp: "{{ deployment_stamp }}"
job_stamp: "{{ job_stamp }}"
# Jobs with the "pre" job type will be executed prior to deployments
job_type: "pre"
service: lms
version: "{{ edxapp_image_tag }}"
job_stamp: "{{ job_stamp }}"
deployment_stamp: "{{ deployment_stamp }}"
spec:
template:
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ metadata:
namespace: "{{ project_name }}"
labels:
app: learninglocker
deployment_stamp: "{{ deployment_stamp }}"
job_stamp: "{{ job_stamp }}"
# Jobs with the "pre" job type will be executed prior to deployments
job_type: "pre"
service: learninglocker
version: "{{ learninglocker_image_tag }}"
job_stamp: "{{ job_stamp }}"
deployment_stamp: "{{ deployment_stamp }}"
spec:
template:
metadata:
Expand Down
6 changes: 4 additions & 2 deletions apps/marsha/templates/services/app/job_db_migrate.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ metadata:
namespace: "{{ project_name }}"
labels:
app: marsha
service: marsha
version: "{{ marsha_image_tag }}"
deployment_stamp: "{{ deployment_stamp }}"
job_stamp: "{{ job_stamp }}"
# Jobs with the "pre" job type will be executed prior to deployments
job_type: "pre"
service: marsha
version: "{{ marsha_image_tag }}"
spec:
template:
metadata:
Expand Down
6 changes: 4 additions & 2 deletions apps/richie/templates/services/app/job_02_db_migrate.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ metadata:
namespace: "{{ project_name }}"
labels:
app: richie
service: richie
version: "{{ richie_image_tag }}"
deployment_stamp: "{{ deployment_stamp }}"
job_stamp: "{{ job_stamp }}"
# Jobs with the "pre" job type will be executed prior to deployments
job_type: "pre"
service: richie
version: "{{ richie_image_tag }}"
spec:
template:
metadata:
Expand Down