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

Update k8s manifests to deploy the home app #1037

Merged
merged 3 commits into from
Sep 12, 2023
Merged

Conversation

ian-noaa
Copy link
Collaborator

@ian-noaa ian-noaa commented Aug 5, 2023

Add some k8s manifests so that we can deploy the new home app.

I needed to add a second ingress file to handle rewriting the requests the app receives - in essence, I'm using Nginx to rewrite requests for /mats-dev/ to /. There were some subtleties here with ingress preferring to match requests to paths with longer lengths & the regex capture groups Nginx rewrite-target needs artificially inflating the char "length" of the path.

I've duplicated the changes to gsl-dev to the local setup as well.

PR stacked on top of #1032

Add an additional ingress route to make the home app reachable. This
needed to be in another file so we could have different nginx rewrite
rules.
@ian-noaa ian-noaa self-assigned this Aug 5, 2023
@ian-noaa ian-noaa mentioned this pull request Aug 5, 2023
@ian-noaa ian-noaa marked this pull request as ready for review September 12, 2023 17:31
Base automatically changed from 1029-create-new-home-application to development September 12, 2023 18:38
ian-noaa added a commit that referenced this pull request Sep 12, 2023
Create a home app using Go & Gin with templated HTML and minimal JS. 

This PR mimics the style of the original home app as much as possible.
However, it updates the UI to use Bootstrap 5. I did add a favicon & a
page title as well to make the MATS landing page look more official.

I've done a few additional things as they were easy to do now that we
have a Go server:
- I added a `/health` endpoint to the application so that we can use
[automated health
checks](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
in Kubernetes.
- I added some basic Prometheus metrics so we can tell if the app is up
and if it's taking longer than expected to respond to users. In the
future we may be able to instrument the app links so we can tell how
often certain apps are used. Otherwise, we could implement something
like Google Analytics to get that info.
- Added containerization and CI around the project so we can deploy it.

This is intended to slot into our current docker-compose stacks and
replace `matsapps/production:mats-http` which is this Go file server:
https://github.com/halverneus/static-file-server. Obviously, we could
also deploy this in Kubernetes.

This PR is stacked on top of #1031 and under #1037.
@ian-noaa ian-noaa merged commit 2897a08 into development Sep 12, 2023
31 checks passed
@ian-noaa ian-noaa deleted the deploy-home-app branch September 12, 2023 18:52
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.

1 participant