How ceph/calamari works
Calamari is a Ceph management and monitoring server that exposes a high-level REST API. The main user workflow is to request cluster status or an administrative change through the API; the server exposes cluster, OSD, pool, CRUSH, and request endpoints, while its management service monitors clusters and coordinates remote work. Persistent cluster state and request/event handling support the service. The tree and excerpts establish these components, but do not show all runtime call wiring, so uncertain links are omitted.
Main entry points: manager.py Service manager · v2.py Cluster API views · rpc.py RPC service · wsgi.py Django web app
Components 20
REST interface
- Django web app
calamari-web/calamari_web/wsgi.py - API routes
rest-api/calamari_rest/urls/v2.py - Cluster API views
rest-api/calamari_rest/views/v2.py - API serializers
rest-api/calamari_rest/serializers/v2.py - Database views
rest-api/calamari_rest/views/database_view_set.py - Remote API views
rest-api/calamari_rest/views/remote_view_set.py
Management service
- Service manager
cthulhu/cthulhu/manager/manager.py - Cluster monitor
cthulhu/cthulhu/manager/cluster_monitor.py - Request handling
cthulhu/cthulhu/manager/request_collection.py - RPC service
cthulhu/cthulhu/manager/rpc.py
Ceph integration
- Salt remote
calamari-common/calamari_common/remote/salt_remote.py - Monitor remote
calamari-common/calamari_common/remote/mon_remote.py - RBD API
calamari-common/calamari_common/remote/rbd_api.py
State and telemetry
- State persister
cthulhu/cthulhu/persistence/persister.py - Persistence models
rest-api/calamari_rest/models.py - Event manager
cthulhu/cthulhu/manager/eventer.py - Metrics cache
calamari-lite/calamari_lite/server.py - Graphite service
calamari-web/calamari_web/settings.py
Other components
- Operator or UI
- Ceph cluster
Connections 18
- Operator or UI → Django web app: uses
- Django web app → API routes: dispatches
- API routes → Cluster API views: routes requests
- Cluster API views → API serializers: formats data
- Cluster API views → Database views: queries state
- Service manager → Cluster monitor: tracks clusters
- Service manager → Request handling: starts request handling
- Service manager → RPC service: starts RPC
- Service manager → State persister: starts persistence
- Service manager → Event manager: starts event handling
- RPC service → Salt remote: dispatches remote work
- Salt remote → Monitor remote: runs Ceph jobs
- Monitor remote → Ceph cluster: queries cluster
- Remote API views → RPC service: requests remote work
- State persister → Persistence models: stores state
- Database views → Persistence models: reads state
- Metrics cache → Graphite service: serves metrics
- RBD API → Ceph cluster: accesses RBD