Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

uniquejava/play-cicd001

Repository files navigation

Ticket Management System

English | ็ฎ€ไฝ“ไธญๆ–‡

A modern ticket management system based on Spring Boot + Vue 3, demonstrating complete DevOps and CI/CD workflows.

Development: Dev CI

Production: Prod CI

screenshot

๐ŸŽฏ Project Overview

This is a microservices architecture project with separated frontend and backend, showcasing complete DevOps practices from development to production:

  • ๐Ÿ—๏ธ Modern Architecture: Spring Boot 3.5.6 + Vue 3 + TypeScript
  • ๐Ÿš€ Containerized Deployment: Docker + Kubernetes + EKS
  • ๐Ÿ”„ CI/CD Pipeline: GitHub Actions + Kubernetes + ArgoCD
  • ๐Ÿ“Š Observability: Log monitoring + Health checks
  • ๐Ÿ›ก๏ธ Security Best Practices: Principle of least privilege + Security scanning

โšก Quick Start

๐Ÿ“‹ Prerequisites

  • AWS CLI: Configured credentials
  • kubectl: Kubernetes command line tool
  • Terraform: Infrastructure as code tool
  • Docker: Containerization tool
  • Helm: Kubernetes package manager

๐Ÿš€ One-Click Deployment

# Clone project
git clone <repository-url>
cd play-cicd001
# Complete deployment (infrastructure + applications)
./scripts/deploy.sh
# Access application
# Frontend: http://<load-balancer-address>/
# Backend API: http://<load-balancer-address>/api/tickets

๐Ÿ”ง Local Development

# Start backend (port: 8080)
cd backend
mvn spring-boot:run
# Start frontend (port: 5173)
cd frontend
pnpm install && pnpm dev

๐Ÿ—๏ธ System Architecture

Technology Stack

Backend (Spring Boot)

  • Java 17 + Spring Boot 3.5.6
  • Maven build tool
  • RESTful API design
  • In-memory data storage (for demo)
  • Health check endpoints

Frontend (Vue 3)

  • Vue 3 + Composition API + TypeScript
  • Vite 7.1.7 + pnpm
  • Responsive UI design
  • API service encapsulation

Infrastructure (AWS)

  • Amazon EKS 1.34 (Kubernetes)
  • 2x t3.medium worker nodes
  • Network Load Balancer (NLB)
  • NGINX Ingress Controller
  • Amazon ECR (Container Registry)
  • VPC + subnets + security groups

Deployment Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Frontend (Vue 3) โ”‚โ”€โ”€โ”€โ”€โ”‚ NGINX Ingress โ”‚โ”€โ”€โ”€โ”€โ”‚ Network Load Balancer โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
 โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ Backend (Spring) โ”‚โ”€โ”€โ”€โ”€โ”‚ K8s Services โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“š Documentation

๐Ÿ—๏ธ Core Documentation

๐Ÿ“‹ Other Documentation

๐Ÿ› ๏ธ Development Guide

๐Ÿ“ Project Structure

play-cicd001/
โ”œโ”€โ”€ backend/ # Spring Boot backend application
โ”œโ”€โ”€ frontend/ # Vue 3 frontend application
โ”œโ”€โ”€ cicd/ # CI/CD configurations
โ”‚ โ”œโ”€โ”€ docker/ # Docker build configurations
โ”‚ โ”œโ”€โ”€ kubernetes/ # Kubernetes manifests (Kustomize)
โ”‚ โ”‚ โ”œโ”€โ”€ base/ # Base configurations
โ”‚ โ”‚ โ”œโ”€โ”€ overlays/ # Environment-specific configs
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ dev/ # Development environment
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ prod/ # Production environment
โ”‚ โ”‚ โ””โ”€โ”€ tools/ # K8s tool configurations
โ”‚ โ”œโ”€โ”€ argocd/ # ArgoCD GitOps configurations
โ”‚ โ”‚ โ”œโ”€โ”€ apps/ # ArgoCD Application definitions
โ”‚ โ”‚ โ””โ”€โ”€ project.yaml # ArgoCD Project configuration
โ”‚ โ””โ”€โ”€ github_action/ # GitHub Actions scripts
โ”œโ”€โ”€ infra/ # Terraform infrastructure
โ”‚ โ”œโ”€โ”€ modules/ # Terraform modules
โ”‚ โ”‚ โ”œโ”€โ”€ vpc/ # VPC network configuration
โ”‚ โ”‚ โ””โ”€โ”€ ecr/ # ECR image repository
โ”‚ โ”œโ”€โ”€ main.tf # Main configuration file
โ”‚ โ”œโ”€โ”€ variables.tf # Variable definitions
โ”‚ โ””โ”€โ”€ outputs.tf # Output configuration
โ”œโ”€โ”€ scripts/ # Automation scripts
โ”‚ โ”œโ”€โ”€ deploy.sh # One-click deployment script
โ”‚ โ”œโ”€โ”€ destroy.sh # One-click cleanup script
โ”‚ โ”œโ”€โ”€ docker/ # Docker build scripts
โ”‚ โ”œโ”€โ”€ k8s/ # Kubernetes management scripts
โ”‚ โ””โ”€โ”€ terraform/ # Terraform management scripts
โ”œโ”€โ”€ .github/workflows/ # GitHub Actions workflows
โ”œโ”€โ”€ docs/ # Project documentation
โ”‚ โ”œโ”€โ”€ INFRASTRUCTURE.md # Terraform + EKS deployment guide
โ”‚ โ”œโ”€โ”€ CICD.md # CI/CD complete workflow
โ”‚ โ”œโ”€โ”€ SCRIPTS.md # Automation scripts guide
โ”‚ โ”œโ”€โ”€ INSTRUCTION.md # Project background and architecture
โ”‚ โ””โ”€โ”€ plan.md # Development milestones
โ”œโ”€โ”€ records.txt # Deployment records
โ”œโ”€โ”€ CLAUDE.md # Claude Code configuration
โ””โ”€โ”€ cicd/README.md # CI/CD directory structure guide

๐Ÿ”ง Common Commands

# ๐Ÿš€ Deployment Management
./scripts/deploy.sh # Complete deployment (infrastructure + applications)
./scripts/deploy.sh --skip-infra # Deploy applications to existing cluster only
./scripts/deploy.sh --skip-apps # Deploy infrastructure only
./scripts/destroy.sh # One-click cleanup of all resources (save costs)
# ๐Ÿ—๏ธ Infrastructure Management
cd infra
terraform init # Initialize Terraform
terraform plan # Show execution plan
terraform apply # Deploy infrastructure
terraform destroy # Destroy infrastructure
aws eks --region ap-northeast-1 update-kubeconfig --name tix-eks-fresh-magpie # Configure kubectl
# โ˜ธ๏ธ Kubernetes Operations
kubectl get pods -n ticket-dev # Check pod status
kubectl get services -n ticket-dev # Check services
kubectl get ingress -n ticket-dev # Check ingress
kubectl logs -f deployment/backend-deployment -n ticket-dev # View backend logs
kubectl logs -f deployment/frontend-deployment -n ticket-dev # View frontend logs
# ๐Ÿšข ArgoCD Management
argocd app list # List all applications
argocd app get ticket-system-dev # Get application status
argocd app sync ticket-system-dev # Manual sync application
argocd app logs ticket-system-dev # View application sync logs
argocd cluster list # List clusters
kubectl get applications -n argocd # View ArgoCD application resources
kubectl get appprojects -n argocd # View ArgoCD projects
# ๐Ÿ” ArgoCD Image Updater Debugging
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-image-updater -f # View Image Updater logs
kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-image-updater # Check Image Updater status
# ๐Ÿ” ECR Credentials Management (ArgoCD Image Updater)
./scripts/setup-ecr-credentials.sh # Generate ECR credentials
kubectl apply -k cicd/kubernetes/tools/argocd/ # Deploy ECR credentials to ArgoCD
# ๐Ÿณ Local Development
cd backend && mvn spring-boot:run # Start backend (port: 8080)
cd frontend && pnpm install && pnpm dev # Start frontend (port: 5173)
# ๐Ÿ”จ Local Build
docker build -f cicd/docker/backend/Dockerfile -t ticket-backend ./backend
docker build -f cicd/docker/frontend/Dockerfile -t ticket-frontend ./frontend
./scripts/docker/build-frontend.sh production # Frontend production build
./scripts/docker/build-frontend.sh development # Frontend development build
# ๐Ÿงช Testing
cd backend && mvn test # Backend tests
cd frontend && pnpm test # Frontend tests
curl http://localhost:8080/api/tickets # API testing
# ๐Ÿ“Š Deployment Verification
LB_URL=$(kubectl get ingress ticket-management-ingress -n ticket-dev -o jsonpath='{.status.loadBalancer.ingress[0].hostname}') # Get load balancer address
curl http://$LB_URL/api/tickets # Test production API
curl -I http://$LB_URL/ # Test frontend page
# ๐Ÿ“ฑ GitHub Actions Monitoring
gh run list --repo uniquejava/play-cicd001 # View CI/CD run status
gh run view <run-id> --repo uniquejava/play-cicd001 # View specific run details
gh run rerun <run-id> --repo uniquejava/play-cicd001 # Rerun failed workflow

๐Ÿ“Š Cost Estimation

Resource Monthly Cost Description
EKS Control Plane ~73ใƒ‰ใƒซ Kubernetes cluster management
EC2 Instances (2x t3.medium) ~60ใƒ‰ใƒซ Worker nodes
NAT Gateway ~35ใƒ‰ใƒซ Private subnet outbound gateway
EIP ~3ใƒ‰ใƒซ.65 Elastic IP address
Data Transfer ~5ใƒ‰ใƒซ-10 Traffic fees
Total ~170ใƒ‰ใƒซ Estimated monthly cost

๐Ÿ’ก Cost Control: Run ./scripts/destroy.sh when not using to avoid unnecessary charges.

๐ŸŽฏ Features

Core Features

  • โœ… Ticket Management: Create, edit, delete tickets
  • โœ… Status Tracking: Open โ†’ In Progress โ†’ Completed
  • โœ… RESTful API: Standardized API interfaces
  • โœ… Responsive Design: Multi-device support
  • โœ… Real-time Updates: Frontend-backend data synchronization

Technical Features

  • โœ… Containerization: Docker image building
  • โœ… Microservices: Frontend-backend separated architecture
  • โœ… Load Balancing: NGINX Ingress Controller
  • โœ… Health Checks: Service status monitoring
  • โœ… Auto-scaling: Kubernetes HPA (configurable)

๐Ÿ”„ CI/CD Pipeline

Development Workflow

  1. Code Commit โ†’ GitHub repository
  2. Auto Build โ†’ GitHub Actions CI
  3. Image Build โ†’ Docker + ECR push
  4. Auto Deploy โ†’ ArgoCD Image Updater
  5. Service Release โ†’ Kubernetes cluster

Branch Strategy

  • main: Production branch
  • develop: Development branch
  • feature/*: Feature development branches
  • hotfix/*: Emergency fix branches

๐Ÿงช Testing

Test commands are included in the "๐Ÿงช Testing" section of the "Common Commands" above.

๐Ÿ›ก๏ธ Security Features

  • Least Privilege: IAM role permission minimization
  • Network Isolation: VPC private subnet deployment
  • Container Security: Non-root user execution
  • Image Scanning: ECR automatic security scanning
  • Secret Management: AWS Secrets Manager (extensible)

โš ๏ธ Important Reminder

Run ./scripts/destroy.sh when not using the project to delete all AWS resources and avoid charges!

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿ“… Last Updated: 2025ๅนด10ๆœˆ17ๆ—ฅ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

AltStyle ใซใ‚ˆใฃใฆๅค‰ๆ›ใ•ใ‚ŒใŸใƒšใƒผใ‚ธ (->ใ‚ชใƒชใ‚ธใƒŠใƒซ) /