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

EASI-4672: Deploy to EKS as part of PR pipeline #2915

Merged
merged 11 commits into from
Dec 10, 2024

Conversation

Jdwoodson
Copy link
Contributor

EASI-4672

Description

This pull request includes several changes to the GitHub workflows to improve the build, deployment, and teardown processes for the frontend application. The most important changes include adding new workflows for building the frontend image, deploying to EKS, and tearing down environments on PR close.

New Workflows:

  • Added a new workflow to build the easi-frontend Docker image (.github/workflows/build_frontend_image.yml).
  • Added a new workflow to deploy the branch environment to EKS, which is triggered by a workflow call (.github/workflows/deploy_to_eks.yml).
  • Added a new workflow for manual deployment to EKS, which includes building the frontend image and application images before deployment (.github/workflows/manual_deploy_to_eks.yml).
  • Added a new workflow to teardown the branch environment in EKS when a pull request is closed (.github/workflows/pr_teardown_env_on_close.yml).

Modifications to Existing Workflows:

  • Updated the main build and test workflow to include steps for building the frontend image and deploying to EKS (.github/workflows/build_and_test.yml).

How to test this change

  1. Open new PR
  2. Pipeline should deploy env to DEV EKS cluster
  3. Once PR closed, EKS env should be deleted

PR Author Checklist

  • I have provided a detailed description of the changes in this PR.
  • I have provided clear instructions on how to test the changes in this PR.
  • I have updated tests or written new tests as appropriate in this PR.

PR Reviewer Guidelines

  • It's best to pull the branch locally and test it, rather than just looking at the code online!
  • When approving a PR, provide a reason why you're approving it
    • e.g. "Approving because I tested it locally and all functionality works as expected"
    • e.g. "Approving because the change is simple and matches the Figma design"
  • Don't be afraid to leave comments or ask questions, especially if you don't understand why something was done! (This is often a great time to suggest code comments or documentation updates)
  • Check that all code is adequately covered by tests - if it isn't feel free to suggest the addition of tests.

@Jdwoodson Jdwoodson self-assigned this Dec 9, 2024
@Jdwoodson Jdwoodson requested a review from a team as a code owner December 9, 2024 21:23
@Jdwoodson Jdwoodson requested review from mynar7 and removed request for a team December 9, 2024 21:23
Copy link
Collaborator

@ClayBenson94 ClayBenson94 left a comment

Choose a reason for hiding this comment

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

Just a few minor suggestions / edits, but overall looks great!

@ClayBenson94
Copy link
Collaborator

Trying out the teardown functionality in #2916

@ClayBenson94
Copy link
Collaborator

@Jdwoodson Creating #2916 made this ingress for EASi: http://k8s-easipr29-easiingr-b628391f4a-618523033.us-west-2.elb.amazonaws.com/

Is something truncating the PR number? easipr29 doesn't seem quite right. (Also, shouldn't it be easi-pr-#, with the dashes?

@Jdwoodson
Copy link
Contributor Author

Jdwoodson commented Dec 10, 2024

@Jdwoodson Creating #2916 made this ingress for EASi: http://k8s-easipr29-easiingr-b628391f4a-618523033.us-west-2.elb.amazonaws.com/

Is something truncating the PR number? easipr29 doesn't seem quite right. (Also, shouldn't it be easi-pr-#, with the dashes?

Yep @ClayBenson94 - AWS truncates the namespace to 8 characters, removes any special characters, and then adds the random number bits.
From what I can tell, the format is:
k8s - 8 char namespace - 8 character object name - randoms

Copy link

github-actions bot commented Dec 10, 2024

EKS Ingress URLs

Copy link
Collaborator

@ClayBenson94 ClayBenson94 left a comment

Choose a reason for hiding this comment

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

Let's go!! 🎉

Comment functionality is great, and things all seem to work as expected!

@Jdwoodson Jdwoodson merged commit b7fbc6d into main Dec 10, 2024
14 checks passed
@Jdwoodson Jdwoodson deleted the EASI-4672/deploy-to-eks-as-part-of-pr-pipeline branch December 10, 2024 17:59
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.

2 participants