From d93f470161601915feacd4e23fc254eb8865304e Mon Sep 17 00:00:00 2001 From: dschwartz0815 Date: Wed, 25 Feb 2026 20:40:59 -0500 Subject: [PATCH 1/2] moved the documentation/instructions out of original readme --- sre/IMPLEMENTATION.md | 40 ++++++++++++++++++++++++++++++++++++++++ sre/README.md | 41 +---------------------------------------- 2 files changed, 41 insertions(+), 40 deletions(-) create mode 100644 sre/IMPLEMENTATION.md diff --git a/sre/IMPLEMENTATION.md b/sre/IMPLEMENTATION.md new file mode 100644 index 000000000..53c8eea60 --- /dev/null +++ b/sre/IMPLEMENTATION.md @@ -0,0 +1,40 @@ +# Solution - David Schwartz + +# Implementation Notes +- Backend containerization lives in `../backend/Dockerfile`. +- CI/CD pipeline is in `../.github/workflows/ci.yml` and pushes to Docker Hub. +- Helm chart is located at `./charts/backend`. +- Observability is provided via application logs to stdout and a health endpoint at `/actuator/health`. + +# Prerequisites (Local Kubernetes via Docker Desktop) +- Docker Desktop with Kubernetes enabled +- NGINX Ingress Controller enabled (Docker Desktop: Settings -> Kubernetes -> Enable Kubernetes, then enable the built-in ingress or install NGINX ingress) +- kubectl +- Helm 3 +- Docker Hub account (for pushing/pulling images) + +# Build and Run (Local) +## Option A: Build locally and deploy (no registry push needed for Docker Desktop) +- From repository root: +- `docker build -t interview-backend:local ./backend` +- `helm install interview-backend ./sre/charts/backend --set image.repository=interview-backend --set image.tag=local` +- Add a hosts entry: `127.0.0.1 interview-backend.local` +- `curl http://interview-backend.local/api/welcome` +- `curl http://interview-backend.local/actuator/health` + +## Option B: Push to Docker Hub and deploy +- `docker login` +- `docker build -t /interview-backend:dev ./backend` +- `docker push /interview-backend:dev` +- `helm install interview-backend ./sre/charts/backend --set image.repository=/interview-backend --set image.tag=dev` +- Add a hosts entry: `127.0.0.1 interview-backend.local` +- `curl http://interview-backend.local/api/welcome` +- `curl http://interview-backend.local/actuator/health` + +# CI/CD (Docker Hub) +- Set repository secrets: +- `DOCKERHUB_USERNAME` +- `DOCKERHUB_TOKEN` +- On push to `main`, the pipeline builds and pushes tags: +- `sha-` +- `latest` diff --git a/sre/README.md b/sre/README.md index 2828b80fb..7af3d4aa5 100644 --- a/sre/README.md +++ b/sre/README.md @@ -44,43 +44,4 @@ For the interview, make sure you have the following ready: - An IDE with your submission code - A running K8s or K3s cluster (local or cloud-based) to demonstrate your Helm chart deployment - Make sure you can explain your design choices and answer any questions related to the exercise. -- You will have only 10 minutes to showcase your submission during the interview, so please be concise and focus on the key aspects of your implementation. - -# Implementation Notes -- Backend containerization lives in `../backend/Dockerfile`. -- CI/CD pipeline is in `../.github/workflows/ci.yml` and pushes to Docker Hub. -- Helm chart is located at `./charts/backend`. -- Observability is provided via application logs to stdout and a health endpoint at `/actuator/health`. - -# Prerequisites (Local Kubernetes via Docker Desktop) -- Docker Desktop with Kubernetes enabled -- NGINX Ingress Controller enabled (Docker Desktop: Settings -> Kubernetes -> Enable Kubernetes, then enable the built-in ingress or install NGINX ingress) -- kubectl -- Helm 3 -- Docker Hub account (for pushing/pulling images) - -# Build and Run (Local) -## Option A: Build locally and deploy (no registry push needed for Docker Desktop) -- From repository root: -- `docker build -t interview-backend:local ./backend` -- `helm install interview-backend ./sre/charts/backend --set image.repository=interview-backend --set image.tag=local` -- Add a hosts entry: `127.0.0.1 interview-backend.local` -- `curl http://interview-backend.local/api/welcome` -- `curl http://interview-backend.local/actuator/health` - -## Option B: Push to Docker Hub and deploy -- `docker login` -- `docker build -t /interview-backend:dev ./backend` -- `docker push /interview-backend:dev` -- `helm install interview-backend ./sre/charts/backend --set image.repository=/interview-backend --set image.tag=dev` -- Add a hosts entry: `127.0.0.1 interview-backend.local` -- `curl http://interview-backend.local/api/welcome` -- `curl http://interview-backend.local/actuator/health` - -# CI/CD (Docker Hub) -- Set repository secrets: -- `DOCKERHUB_USERNAME` -- `DOCKERHUB_TOKEN` -- On push to `main`, the pipeline builds and pushes tags: -- `sha-` -- `latest` +- You will have only 10 minutes to showcase your submission during the interview, so please be concise and focus on the key aspects of your implementation. \ No newline at end of file From 71d76af614a4657e90fedcddf8a486f4aa00e328 Mon Sep 17 00:00:00 2001 From: dschwartz0815 Date: Wed, 25 Feb 2026 20:45:52 -0500 Subject: [PATCH 2/2] default branch from fork is call 'master' not main --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f44a8d90c..126ad60ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: ci on: push: - branches: ["main"] + branches: ["main", "master"] pull_request: workflow_dispatch: