Testing github with jira atlassian.
Spring Boot backend for students/departments with a built-in static web UI (index.html), Docker packaging, and Kubernetes manifests for local K3s deployment.
Sprint 3 evolves the backend into a microservices architecture with:
eureka-server(service discovery)api-gateway(single entrypoint + routing via discovery)rest-spring-apiasetudiant-service(students + departments)grading-service(notes CRUD + validation via Feign)
Ports (local):
- Eureka:
8761 - API Gateway:
8080 - Etudiant service:
8081 - Grading service:
8082
Run locally (Docker Compose):
docker compose up --buildVerify:
- Eureka UI:
http://localhost:8761 - Through gateway:
GET http://localhost:8080/api/departementsGET http://localhost:8080/api/etudiantsGET http://localhost:8080/api/notes
Sprint 3 delivery summary and git/PR steps are in READACT3.md.
If you want to present the project quickly, start here.
Video link (replace with your final recording):
Click me for full demo running k3s services
- Show Docker Hub image tags:
v1.0.0andlatest. - Show Kubernetes files in
k8s/. - Apply manifests on K3s VM.
- Show pods/services running in namespace
students. - Open UI from
http://<VM_IP>:<NODE_PORT>/. - Show API from
http://<VM_IP>:<NODE_PORT>/api/etudiants. - Perform one CRUD action in UI and refresh API result.
sudo k3s kubectl apply -f k8s/namespace.yaml
sudo k3s kubectl apply -f k8s/postgres-secret.yaml
sudo k3s kubectl apply -f k8s/postgres-pvc.yaml
sudo k3s kubectl apply -f k8s/postgres-deployment.yaml
sudo k3s kubectl apply -f k8s/redis-deployment.yaml
sudo k3s kubectl apply -f k8s/rest-spring-api-deployment.yaml
sudo k3s kubectl -n students get pods,svc
sudo k3s kubectl -n students get svc rest-spring-apirest-spring-api/: Spring Boot service (Sprint 3: runs asetudiant-service) + static UI + Dockerfilegrading-service/: Spring Boot microservice for notes (Sprint 3)eureka-server/: Eureka service discovery (Sprint 3)api-gateway/: Spring Cloud Gateway (Sprint 3)k8s/: Kubernetes manifests (namespace, postgres, redis, app)activity_part1.md,activity_part2.md,activity_part3.md: assignment statementsIMPLEMENTATION_PLAN_PART3_MICROSERVICES.md,IMPLEMENTATION_PLAN_PART3_Q3_Q4_Q7.md: implementation plansREADACT3.md: Sprint 3 “what’s done” + verification + git workflowK3S_Q6_DEPLOYMENT_GUIDE.md: additional deployment notes
- Full CRUD API for students and departments
- Business logic for student age
- BDD test feature (Gherkin/Cucumber)
- Static web admin UI served by Spring Boot at
/ - Global exception handling
- OpenAPI/Swagger integration
- Redis cache integration
- Docker image build and publish flow
- K3s manifests for API + PostgreSQL + Redis
Sprint 3 additions:
- Eureka discovery (server + clients)
- API Gateway routing via service discovery
- Grading microservice (CRUD notes) + Feign validation
- Unified
docker-compose.ymlorchestration for local run
- Java 21
- Spring Boot
- Maven Wrapper (
./mvnw) - PostgreSQL
- Redis
- Docker
- K3s / Kubernetes
Sprint 3:
- Spring Cloud (Eureka, Gateway, OpenFeign)
- Image:
kadhemsellami/rest-spring-api:v1.0.0 - Runtime port:
8080
Build and push from rest-spring-api/:
docker build -t kadhemsellami/rest-spring-api:v1.0.0 .
docker tag kadhemsellami/rest-spring-api:v1.0.0 kadhemsellami/rest-spring-api:latest
docker login
docker push kadhemsellami/rest-spring-api:v1.0.0
docker push kadhemsellami/rest-spring-api:latestRequired manifests in k8s/:
namespace.yamlpostgres-secret.yamlpostgres-pvc.yamlpostgres-deployment.yamlredis-deployment.yamlrest-spring-api-deployment.yaml
Run from the project root on the K3s machine:
sudo k3s kubectl apply -f k8s/namespace.yaml
sudo k3s kubectl apply -f k8s/postgres-secret.yaml
sudo k3s kubectl apply -f k8s/postgres-pvc.yaml
sudo k3s kubectl apply -f k8s/postgres-deployment.yaml
sudo k3s kubectl apply -f k8s/redis-deployment.yaml
sudo k3s kubectl apply -f k8s/rest-spring-api-deployment.yamlVerify:
sudo k3s kubectl -n students get pods,svc
sudo k3s kubectl -n students get svc rest-spring-apiThen open:
http://<VM_IP>:<NODE_PORT>/http://<VM_IP>:<NODE_PORT>/api/etudiants
Configured in the app:
SERVER_PORT(default8080)DB_HOST(defaultlocalhost)DB_PORT(default5433)DB_NAME(defaultstudents_db)DB_USERNAME(defaultpostgres)DB_PASSWORD(defaultpostgres)REDIS_HOST(defaultlocalhost)REDIS_PORT(default6379)
In Kubernetes, these are provided through deployment env values and postgres-secret.
- Image pull issue: confirm Docker Hub image/tag and public visibility.
- API pod crash: check env values and app logs.
- DB connectivity: verify
postgresservice and secret values. - NodePort inaccessible: check VM network mode and firewall/NAT rules.
- Build/push does not have to be executed on the K3s machine.
- K3s machine must be able to pull the published image from Docker Hub.
All pull requests must go through a mandatory review process before merging into main or version-3 branches. This ensures code quality, knowledge sharing, and consistency across the codebase.
- Minimum Approvals: At least 1 approval required before merge
- Review Deadline: Reviews should be completed within 48 hours of PR creation
- Mandatory Checks: All CI/CD checks and tests must pass
- Conversation Resolution: All review comments must be resolved before merge
-
Create a Branch
git checkout version-3 git checkout -b feature/your-feature-name
-
Create a Pull Request
- Push your changes and create a PR targeting
version-3 - Fill out the PR template completely
- Link the related Jira ticket
- Request reviewers
- Push your changes and create a PR targeting
-
Address Feedback
- Reviewers will add comments and suggestions
- Address all blocking comments before merge
- Push follow-up commits to the same branch
- Reply to comments explaining changes
-
Approval & Merge
- Once approved and all checks pass, merge the PR
- Delete the feature branch after merging
- Update the related Jira ticket to "Done"
- Understand the Context: Read the PR description and related Jira ticket
- Review Code Quality: Check for readability, maintainability, and adherence to project standards
- Verify Tests: Ensure tests cover the changes appropriately
- Check for Regressions: Consider potential side effects or breaking changes
- Be Constructive: Provide helpful, specific feedback with suggestions for improvement
- Respect Timeline: Aim to complete reviews within 48 hours
- Keep PRs focused and reasonably sized (aim for <400 lines of code)
- Provide clear, descriptive commit messages
- Include relevant unit and integration tests
- Update documentation if needed
- Run tests locally before pushing
- Approve only when you're confident in the changes
- Use "Request Changes" for blocking issues
- Use "Comment" for suggestions or discussions
- Ask questions if you don't understand the rationale
- Acknowledge good code with positive feedback
bug— Bug fixenhancement— New feature or improvementdocumentation— Documentation updatedevops— DevOps or infrastructure changestesting— Test-related changesWIP— Work in progress (do not merge)blocked— Blocked by another PR or issue
If a review is not completed within 48 hours:
- Send a reminder to the reviewer
- Contact the team lead if still unresolved after 24 more hours
- In urgent cases, escalate to the project manager