-
Notifications
You must be signed in to change notification settings - Fork 27
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Publisher deployment #152
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78768d5
to
e4beab2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 looks absolutely amazing, thanks!
I spotted a few minor things, but generally this looks great.
terraform/deployments/govuk-publishing-platform/app_publisher.tf
Outdated
Show resolved
Hide resolved
terraform/deployments/govuk-publishing-platform/app_publisher.tf
Outdated
Show resolved
Hide resolved
terraform/deployments/govuk-publishing-platform/app_publisher.tf
Outdated
Show resolved
Hide resolved
be1338a
to
a43d52d
Compare
Makes the domain consistently named throughout the codebase. We had a suprising number of variable names for just three domains. New names: ``` external_app_domain = test.govuk.digital internal_app_domain = test.govuk-internal.digital publishing_service_domain = test.publishing.service.gov.uk ```
Container names don't need to include the app running - they just need to match the container name specified on any load balancer. This changes the name of all containers that currently use the service_name as the container name, to 'app'. Now most ECS Services will have two containers: envoy and app. This won't make it harder to see what container is running, since the image is usually displayed next to the container name.
This will enable us to output container definitions with the image CMD overridden (e.g. foreman run web / foreman run worker).
a43d52d
to
de77ada
Compare
terraform/deployments/govuk-publishing-platform/app_publisher.tf
Outdated
Show resolved
Hide resolved
de77ada
to
80f32ae
Compare
This rewrites the way we deploy the Publisher app, following on from the refactor of content store in PR #150. The intent is to simplify the way we deploy publisher (web and worker) and run tasks using the publisher task definition. This change: - removes the deployment modules for publisher-web and publisher-worker - adds logic to the govuk-publishing-platform/publisher_app file to generate the JSON required to register the web and worker task definitions for publisher - removes the now unecessary task definition module for publisher - modifies the deploy pipeline for publisher to register the publisher task definitions using the AWS CLi, rather than Terraform - modifies the deploy pipeline to store the JSON generated by the big Terraform apply (govuk-publishing-platform) in S3, so we can use it to register task definitions, overriding only the IMAGE key. - modifies the deploy pipeline so that we can run db migrations for publisher, which will break smokey, and anything that uses run-task temporarily. This introduces additional complexity into the Concourse pipeline, which will be addressed in future PRs.
This changes the Concourse pipeline so that we can deploy Publisher in the new way - rather than having a Terraform apply create the task definitions for Publisher, we're using the AWS CLI for this bit). The Concourse pipeline is a bit more complex and verbose than it would ideally be. The smoke tests, and any other task using run-task is also broken by this commit, but those should soon be fixed.
80f32ae
to
deeef9d
Compare
richardTowers
approved these changes
Feb 3, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
fredericfran-gds
added a commit
that referenced
this pull request
Feb 4, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This PR refactors (draft-)static app to use this new deployment style Ref: 1. [trello card](https://trello.com/c/5JT7LE7k/382-update-the-static-application-to-use-the-new-deployment-approach) This should look similar to #152. We no longer register new task definitions in Terraform. Instead, our Big Terraform (:muscle:) apply outputs a task definition JSON which is passed to aws ecs register-task-definition. This should make the Terraform simpler. See PRs #150 and #152, and the design doc (internal) for the motivation behind this refactoring. <https://github.com/alphagov/govuk-infrastructure|alphagov/govuk-infrastructure>alphagov/govuk-infrastructure | Today at 4:54 PM | Added by GitHub
fredericfran-gds
added a commit
that referenced
this pull request
Feb 4, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)static app to use this new deployment style. Similar PRs are #152 and #153 for other apps. Ref: 1. [trello card](https://trello.com/c/5JT7LE7k/382-update-the-static-application-to-use-the-new-deployment-approach)
fredericfran-gds
added a commit
that referenced
this pull request
Feb 4, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)static app to use this new deployment style. Similar PRs are #152 and #153 for other apps. Ref: 1. [trello card](https://trello.com/c/5JT7LE7k/382-update-the-static-application-to-use-the-new-deployment-approach)
fredericfran-gds
added a commit
that referenced
this pull request
Feb 4, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)static app to use this new deployment style. Similar PRs are #152 and #153 for other apps. Ref: 1. [trello card](https://trello.com/c/5JT7LE7k/382-update-the-static-application-to-use-the-new-deployment-approach)
fredericfran-gds
added a commit
that referenced
this pull request
Feb 4, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)router-api app to use this new deployment style. Similar PRs are #152, #153 and #154 for other apps. Ref: 1. [trello card](https://trello.com/c/HDvhDo1t/379-update-the-router-api-application-to-use-the-new-deployment-approach)
Merged
fredericfran-gds
added a commit
that referenced
this pull request
Feb 4, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)router-api app to use this new deployment style. Similar PRs are #152, #153 and #154 for other apps. Ref: 1. [trello card](https://trello.com/c/HDvhDo1t/379-update-the-router-api-application-to-use-the-new-deployment-approach)
fredericfran-gds
added a commit
that referenced
this pull request
Feb 4, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)router-api app to use this new deployment style. Similar PRs are #152, #153 and #154 for other apps. Ref: 1. [trello card](https://trello.com/c/HDvhDo1t/379-update-the-router-api-application-to-use-the-new-deployment-approach)
fredericfran-gds
added a commit
that referenced
this pull request
Feb 4, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)router-api app to use this new deployment style. Similar PRs are #152, #153 and #154 for other apps. Ref: 1. [trello card](https://trello.com/c/HDvhDo1t/379-update-the-router-api-application-to-use-the-new-deployment-approach)
fredericfran-gds
added a commit
that referenced
this pull request
Feb 4, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)router-api app to use this new deployment style. Similar PRs are #152, #153 and #154 for other apps. Ref: 1. [trello card](https://trello.com/c/HDvhDo1t/379-update-the-router-api-application-to-use-the-new-deployment-approach)
fredericfran-gds
added a commit
that referenced
this pull request
Feb 5, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)router-api app to use this new deployment style. Similar PRs are #152, #153 and #154 for other apps. Ref: 1. [trello card](https://trello.com/c/HDvhDo1t/379-update-the-router-api-application-to-use-the-new-deployment-approach)
fredericfran-gds
added a commit
that referenced
this pull request
Feb 5, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)router app to use this new deployment style. Similar PRs are #152, #153 and #154 for other apps. Ref: 1. [trello card](https://trello.com/c/1lZxLN8V/380-update-the-router-application-to-use-the-new-deployment-approach)
fredericfran-gds
added a commit
that referenced
this pull request
Feb 5, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)router app to use this new deployment style. Similar PRs are #152, #153 and #154 for other apps. Ref: 1. [trello card](https://trello.com/c/1lZxLN8V/380-update-the-router-application-to-use-the-new-deployment-approach)
rtrinque
pushed a commit
that referenced
this pull request
Mar 11, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)router-api app to use this new deployment style. Similar PRs are #152, #153 and #154 for other apps. Ref: 1. [trello card](https://trello.com/c/HDvhDo1t/379-update-the-router-api-application-to-use-the-new-deployment-approach)
rtrinque
pushed a commit
that referenced
this pull request
Mar 11, 2021
In PR #150, we refactored the way we deploy applications by outputting the application task definition json when applying the govuk platforming terraform. This json file is then diffed with previous version and if changes exist, a new task definition is created for the app using AWS cli. This PR refactors (draft-)router app to use this new deployment style. Similar PRs are #152, #153 and #154 for other apps. Ref: 1. [trello card](https://trello.com/c/1lZxLN8V/380-update-the-router-application-to-use-the-new-deployment-approach)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This rewrites the way we deploy the Publisher app, following on from the refactor of content store in PR #150.
The intent is to simplify the way we deploy publisher (web and worker) and run tasks using the publisher task definition.
This change:
This introduces additional complexity into the Concourse pipeline (particularly run-task is not that simple), I'll address this in a future PR.