consumerfinance.gov icon indicating copy to clipboard operation
consumerfinance.gov copied to clipboard

Add `ingress-nginx` to local deployments

Open jslay-excella opened this issue 2 years ago • 0 comments

Instead of exposing ports, it is more "prod-like" to access it through an ingress. This PR adds instructions to helm/README.md explaining how to install ingress-nginx, and how to access the deployment through the ingress locally.

Additions

  • Adds notes on how to install ingress-nginx
  • Changes helm-install.sh to use RELEASE variable for ingress hostname.
    • default is cfgov.localhost, otherwise <release>.localhost.

Changes

  • default LoadBalancer on port 8000, changed to ClusterIP for default.

How to test this PR

  1. Make sure you have 8 CPUs and 8GB of RAM allocated in Docker Desktop Settings -> Resources.
  2. Install ingress-nginx following the instructions.
  3. Run ./build-images.sh && ./helm-install.sh
  4. Run RELEASE=my-test ./helm-install.sh
  5. Scale my-test-cfgov Deployment to 0 and load different data (ex, test.sql.gz, follow Manually Load Data in README.md). Scale my-test-cfgov back to 1 once data is loaded.
  6. Access cfgov.localhost and my-test.localhost

Screenshots

image image

jslay-excella avatar Aug 02 '22 07:08 jslay-excella