A Kubernetes-based scalable data pipeline for multi-modal plant experimental data, incorporating real-time validation, MIAPPE metadata compliance and system monitoring.
- Data Structure Guide
- StatefulSet Configuration
- Storage Configuration
- Monitoring and Validation
- MIAPPE Checker Documentation
The system consists of the following components:
- Plant Sender: Sends sensor data and plant images
- Receiver: REST API service that processes incoming data
- MongoDB: Database for storing sensor data, images, and genomic information
- MongoDB Express: Web-based MongoDB admin interface
- MIAPPE Checker: Web-based tool for validating and managing plant experiment metadata
- PostgreSQL: Database for storing validated MIAPPE metadata
- Docker
- Kubernetes (Kind)
- kubectl
- Python 3.8+ (for MIAPPE Checker development)
- Clone the repository:
git clone https://github.com/dannashao/NPEC-prototype.git
cd plant-monitoring-system-
Prepare your data directory structure (see Data Structure Guide)
-
Setup the cluster:
./scripts/setup.sh- Deploy the system components:
WARNING: These scripts delete existing resources. Use only for first-time deployment or system reset.
# Deploy core components
./scripts/deploy.sh
# Deploy MIAPPE Checker
cd miappe_checker/scripts
./setup_miappe.sh [--clean]The setup_miappe.sh script:
- Verifies cluster prerequisites
- Sets up PostgreSQL database
- Deploys MIAPPE Checker web interface
- Configures necessary Kubernetes resources
Use
--cleanflag for fresh installation
POST /receive_data: Receives plant data and imagesGET /health: Health check endpointGET /validate: Real-time data validation statusGET /validate/system: System-wide validation status
- MongoDB Express:
http://plant-data.local/mongo-express- Credentials: admin/pass
- MIAPPE Checker:
http://plant-data.local/miappe- Interface for managing plant experiment metadata
# View system status
kubectl get pods
# Check validation status
curl "http://plant-data.local/validate/system"
# View recent logs
kubectl logs -l app=receiver --tail=100
# View MIAPPE Checker logs
kubectl logs -l app=miappe-checkerSee Monitoring and Validation for detailed monitoring information.
Remove all resources:
# Clean up MIAPPE Checker (optional)
cd miappe_checker/scripts
./setup_miappe.sh --clean
# Remove entire cluster
kind delete cluster --name plant-clusterIf you encounter issues:
- Check pod status:
kubectl get pods - View application logs:
kubectl logs -l app=<component-name> - Ensure all prerequisites are installed
- Verify network connectivity:
kubectl get ingress - Check MongoDB Express access at
/mongo-express - Check MIAPPE Checker access at
/miappe - For MIAPPE Checker specific issues:
- Verify PostgreSQL is running:
kubectl get pods -l app=miappe-postgres - Check persistent volumes:
kubectl get pv,pvc - View MIAPPE logs:
kubectl logs -l app=miappe-checker
- Verify PostgreSQL is running:
Plant Sender:
PLANT_NAME: Name of the plant (default: "plant1")GENE_VARIETY: Genetic variety ID (default: "11430")RECEIVER_URL: URL of the receiver service
Receiver:
MONGODB_URI: MongoDB connection stringGENOMIC_DATA_PATH: Path to genomic data file
MongoDB Express:
ME_CONFIG_BASICAUTH_USERNAME: Admin username (default: "admin")ME_CONFIG_BASICAUTH_PASSWORD: Admin password (default: "pass")
MIAPPE Checker:
FLASK_APP: Application entry point (default: "app.py")FLASK_ENV: Environment mode (development/production)POSTGRES_URI: PostgreSQL connection stringMONGODB_URI: MongoDB connection string