How bevid11/cloudcamsnew works
Project type and purpose
• CloudCams is an embedded/full-stack “instrument control + image processing” system for astronomy cloud cameras.
• It bundles control logic (image capture, shutter control, exposure scheduling), image solving and plotting, and pushes data to storage and a web front end.
File structure
• Top level:
• Dockerfile, docker-compose.yml, GitLab CI (.gitlab-ci.yml) → container build & deploy
• src/ → Python scripts for automation (take_image, shutter_control, timeslapse, auto_brightness, etc.)
• solve/ & plot/ → C programs (solve-field.c, plot-constellations.c) for astrometric reduction and plotting
• astrometry-net-indexes/, astrometrynet_files/, data/ → static data (star catalogs, index files, ephemeris)
• Conceptual_design/ → design docs
• No frontend code here; the PHP web front end and NAS storage live on separate hosts.
• Build scripts and requirements.txt indicate use of Python 3, C, and standard Linux toolchain.
Key info from README
• You build a “cloudcams” Docker image.
• No mention of the website or NAS—those are external.
• Deployment is triggered by GitLab Runner in CI.
Main components and their interactions
a. CI/CD & Container Build
• GitLab Runner → executes .gitlab-ci.yml → runs Dockerfile → produces cloudcams:latest
b. Deployment Host (could be an on-prem server or cloud VM)
• Runs “cloudcams” container (via docker-compose or direct docker run)
c. CloudCams Container
• Automation service (Python scripts under src/)
• Image solver (solve-field) & plot generator (plot-constellations)
• Data directory mounts (astrometry-net-indexes, data/, astrometrynet_files)
• Network client to statserv for sunrise/sunset and status logging
• Network client to NAS storage for image/data upload
• Network client to Raspberry Pi for GPIO signals
d. Raspberry Pi (external hardware)
• Receives control signals from CloudCams container → toggles camera shutter hardware
• Captures raw images via camera sensor
e. Camera & Shutter (attached to Raspberry Pi)
f. External Services
• statserv (sunrise/sunset API + telemetry logging)
• NAS Storage (SMB/NFS share for raw/processed images and logs)
• PHP Web Front End (on separate Website Server) ← reads from NAS and/or statserv
Architectural patterns & design principles
• Modular containerized services: separate build & run phases in CI/CD
• Separation of concerns:
• Control logic (Python) vs. processing logic (C)
• Data storage externalized to NAS
• Presentation tier decoupled (PHP site on its own host)
• Use of standard protocols (HTTP/S for statserv, SMB/NFS for NAS, possibly MQTT/HTTP/gRPC for Pi control)
• Infrastructure as code: Dockerfile & docker-compose.yml
Special notes (per custom requirements)
• GitLab Runner step as part of the pipeline.
• Essential services: statserv, Raspberry Pi with its camera and shutter hardware, NAS, Website Server.