Skip to main content

Build and deploy

Rules​

  • The cluster is arm64. Build every image for linux/arm64.
  • Use the pinned production kube context only. Do not rely on the default context.
  • Tag every image uniquely and never reuse a tag. Do not deploy :latest.
  • Do not apply a whole committed manifest to production without reading the live object first. Some committed manifests describe a different registry or carry an architecture note that does not match the live cluster. Patch the one object that changes.
  • Never put a secret value in git, in an image or in a log.

Build a service image​

Backend services build with JDK 21. A shell's default Java may be older, so set it first.

export JAVA_HOME=~/.sdkman/candidates/java/21.0.9-amzn
mvn package -pl services/lms-service -am -DskipTests
podman build --platform linux/arm64 \
-f services/lms-service/Dockerfile \
-t ap-hyderabad-1.ocir.io/<tenancy-namespace>/startupos/lms-service:<unique-dated-tag> .

The Dockerfile context is the repository root. Run the module's tests with mvn test -pl services/<name>.

Push to OCIR​

podman login ap-hyderabad-1.ocir.io
podman push ap-hyderabad-1.ocir.io/<tenancy-namespace>/startupos/lms-service:<unique-dated-tag>

The tenancy namespace is in .kiro/steering/project-commands.md. Check that the pushed manifest is linux/arm64 before you roll it out. The repository Makefile defaults REGISTRY to a different region, so pass the Hyderabad registry explicitly.

Roll out​

kubectl -n startupos set image deploy/lms-service lms-service=<image>
kubectl -n startupos rollout status deploy/lms-service

Roll one service at a time, and roll it back if readiness fails. Use kubectl set env or kubectl patch for configuration changes. Read the container name from the live Deployment first.

Frontend​

The frontend builds from frontend/ (npm run build). The previous frontend deploys paused the rollout, set environment variables and the image, then resumed. The frontend must have its NEXT_PUBLIC_*_URL settings empty so calls stay same-origin.

Verify after every deploy​

kubectl showing pods as Running is not enough. Hit the real URL and check the response:

curl -s -o /dev/null -w "%{http_code}\n" https://rtih.peoplewave.in/status
curl -s https://rtih.peoplewave.in/api/status

Then exercise the changed feature in a browser.

Sources: .kiro/steering/project-commands.md, .agents/tasks/reconcile-main/deploy-contract.md, .agents/tasks/lms-video-studio/plan.md, .agents/tasks/status-page/deploy-frontend.md, Makefile.