The system uses a two-level identification system:
plant_name: Identifies individual plants (e.g., "plant1", "plant2")gene_variety: Links plants to their genetic variety (e.g., "11430")
Each plant entry contains:
- Plant Name and Gene Variety
- Sensor Data (temperature, humidity, light)
- Images (stored in GridFS, referenced by
image_id) - Genomic Data (linked via Gene Variety)
data/
├── plant1/
│ ├── images/
│ │ ├── image1.png
│ │ └── ...
│ └── sensor_data.csv
├── plant2/
│ ├── images/
│ │ ├── image1.png
│ │ └── ...
│ └── sensor_data.csv
└── genomic_data.json
- Each plant has its own directory (
plant1,plant2, etc.) - Plant images are stored in the
imagessubdirectory - Sensor data is stored in
sensor_data.csvwithin each plant directory - Genomic data is stored in the root of the data directory
Images are stored using MongoDB's GridFS system:
- Images are split into chunks for efficient storage
- Each image is referenced by an
image_idin the plant data - Images can be accessed through MongoDB Express or the MongoDB shell
Through MongoDB Express:
- Navigate to
http://plant-data.local/mongo-express - Go to the
plant_datadatabase - Look for the
fs.filesandfs.chunkscollections - Images can be found in
fs.fileswith their metadata - The actual image data is stored in
fs.chunks
Through MongoDB Shell:
# Connect to MongoDB
kubectl exec -it $(kubectl get pod -l app=mongodb -o jsonpath='{.items[0].metadata.name}') -- mongosh
# Switch to plant_data database
use plant_data
# Find image metadata by ID
db.fs.files.find({"_id": ObjectId("YOUR_IMAGE_ID")})
# Export image (from your local machine)
kubectl exec -it $(kubectl get pod -l app=mongodb -o jsonpath='{.items[0].metadata.name}') -- mongofiles --db=plant_data get_id 'YOUR_IMAGE_ID' --local=downloaded_image.jpg- The data directory is mounted into the kind cluster at
/data - The plant-sender pod accesses data through
/app/data - Directory structure must match the expected format