Skip to content

Dhruv Patel 22070122054 #2

Open
dhruvpatel99269 wants to merge 1 commit into
aditisharmas1186:mainfrom
dhruvpatel99269:dhruv-patel-054
Open

Dhruv Patel 22070122054 #2
dhruvpatel99269 wants to merge 1 commit into
aditisharmas1186:mainfrom
dhruvpatel99269:dhruv-patel-054

Conversation

@dhruvpatel99269

Copy link
Copy Markdown

Student Dashboard CI/CD Pipeline Implementation

This PR implements a complete CI/CD pipeline for the Student Dashboard application using Docker, Kubernetes, and Jenkins.

🔄 Pipeline Implementation Overview

  • Application: Student Dashboard web app (HTML/JS/CSS)
  • Container: Docker with nginx:alpine base
  • Registry: DockerHub (username: dhruv99269)
  • Orchestration: Kubernetes with separate test/prod environments
  • CI/CD: Jenkins Pipeline with branch-based deployments
  • Branch Strategy:
    • dev → Test environment
    • main → Production environment

🛠️ Key Components

1. Application (student-dashboard/)

  • Responsive web dashboard showing student information
  • Environment-aware banner (test/production)
  • Containerized with nginx

2. Kubernetes Deployments (k8s/)

  • deployment-test.yaml: Test environment (1 replica)
  • deployment-prod.yaml: Production environment (3 replicas)
  • Namespace separation for isolation

3. Jenkins Pipeline (Jenkinsfile)

  • Automated build and push to DockerHub
  • Environment-specific deployments
  • Credential management for DockerHub

✅ Testing Instructions

  1. Local Docker Test
cd student-dashboard
docker build -t test .
docker run -p 8080:80 test
# Access at http://localhost:8080
  1. Test Environment
kubectl get all -n test
kubectl port-forward svc/student-dashboard-service-test 8080:80 -n test
  1. Production Environment
kubectl get all -n production
kubectl port-forward svc/student-dashboard-service-prod 8081:80 -n production

📝 Configuration Updates

Jenkins Requirements

  • Pipeline plugin
  • Docker Pipeline plugin
  • Kubernetes CLI plugin
  • Credentials: dockerhub-credentials (configured)

Kubernetes Resources

  • Test namespace:

    • 1 replica
    • Memory: 64Mi-128Mi
    • CPU: 100m-200m
  • Production namespace:

    • 3 replicas
    • Memory: 128Mi-256Mi
    • CPU: 200m-500m

🚀 Deployment Process

  1. Push to dev branch:

    • Triggers test environment deployment
    • Deploys to test namespace
    • Single replica for testing
  2. Push to main branch:

    • Triggers production deployment
    • Deploys to production namespace
    • 3 replicas for high availability

📄 Documentation Added

  • README.md: Main documentation
  • PROJECT_OVERVIEW.md: Architecture and design
  • QUICK_START.md: Quick setup guide
  • SETUP_CHECKLIST.md: Deployment verification
  • HOW_TO_TEST.md: Testing procedures
  • JENKINS_CREDENTIALS_SETUP.md: Jenkins configuration

🔍 Testing Done

✅ Docker image builds successfully
✅ Image pushes to DockerHub
✅ Jenkins pipeline executes all stages
✅ Test environment deploys correctly
✅ Production environment deploys correctly
✅ Application functions in both environments
✅ Environment banners show correctly
✅ Kubernetes health checks pass

📊 Resource Considerations

  • Separate resource limits for test/prod
  • Health checks configured
  • Zero-downtime deployments
  • Namespace isolation

🔄 Rollback Strategy

# If needed, rollback deployment with:
kubectl rollout undo deployment/student-dashboard-prod -n production

🛡️ Security Considerations

  • Namespace isolation
  • Resource limits enforced
  • DockerHub credentials managed securely
  • No sensitive data in images

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