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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JASPER-223: Deploy JASPER application to Test #102

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

ronaldo-macapobre
Copy link

@ronaldo-macapobre ronaldo-macapobre commented Dec 13, 2024

Pull Request for JIRA Ticket: JASPER-223

Issue ticket number and link

https://jag.gov.bc.ca/jira/browse/JASPER-223

Description

Github Actions

  • Updated build-infra pipeline to simplify logic for building, scanning and executing terraform plan command.
  • Updated publish-infra pipeline to combine jobs to a single job that deploys the initial stack, deploys the dummy-image (for ECR and Lambda) and finally, the main stack to provision Jasper's cloud infrastructure
  • Enable deploy2test job to deploy the frontend (web) and backend (api) applications

Openshift

  • Updated sync-secrets and update-aws-creds scripts to be able to target environment to deploy.
  • Separate each Openshift objects per environment

Terraform

  • Combined the initial stack and main stack to a one file so that it would be easy to use one Terraform state file.
  • Added missing db_subnet_group for the Postgres db which was originally created via Console
  • Moved initial stack to modules.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • Deployed using working branch to the dev and test
  • Verified that Jasper is accessing using the test environment URL.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

…anning and deploying infra resources

- Updated initial stack to be part of the main stack file to preserve single state file
- Added db subnet group for rds
- Updated openshift jobs to allow to target different environment
Copy link
Member

@WadeBarnes WadeBarnes left a comment

Choose a reason for hiding this comment

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

Overall LGTM. I'll defer to @amlanc1 for final review and approval.

One question though. Would using Terraform workspaces simplify the management of the various environments? e.g. Reduce the number of files and any duplication.

- Added logic to set default env variable when GHA is triggered by pull request
@ronaldo-macapobre
Copy link
Author

Overall LGTM. I'll defer to @amlanc1 for final review and approval.

One question though. Would using Terraform workspaces simplify the management of the various environments? e.g. Reduce the number of files and any duplication.

Thank you for the advanced review. I was meaning to mark this as ready for PR review once I resolved the build errors found by the pre-checks and cleanup.

Copy link

@amlanc1 amlanc1 left a comment

Choose a reason for hiding this comment

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

Approved... looks good to be deployed. For now the environment folders are ok. We can look at Terragrunt for better environment management in Terraform. The Terraform workspace wont work for our use case as Workspace is mostly applicable when working with single state file. But here we have separate state files in each environment.

@ronaldo-macapobre ronaldo-macapobre merged commit 837f39e into master Dec 17, 2024
5 checks passed
@ronaldo-macapobre ronaldo-macapobre deleted the feature/JASPER-223 branch December 17, 2024 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants