How ansible/jewel works
Jewel is a Django-based gateway connecting Ansible services and exposing shared resources. The principal workflow is an API client request entering the gateway, passing authentication and API routing, then interacting with gateway state or upstream services through the resource client. Separate branches cover service registration/routing, Envoy control-plane support, preferences, and legacy service-data migration. Edges are limited to relationships shown in the README or SOURCE INDEX; unsampled runtime wiring is not inferred.
Main entry points: models Gateway State · resources_client.py Upstream Resource Client · views API Views · service_token_auth.py Service Authentication
Components 19
Gateway API
- API Routing
aap_gateway_api/router.py - API Views
aap_gateway_api/views - Service Endpoints
aap_gateway_api/views/api/v1/service.py - User Endpoints
aap_gateway_api/views/api/v1/user.py
Identity And Resources
- Service Authentication
aap_gateway_api/authentication/service_token_auth.py - Shared Auth
aap_gateway_api/common/authentication.py - Gateway State
aap_gateway_api/models - Resource API
aap_gateway_api/resource_api.py - Upstream Resource Client
aap_gateway_api/utils/resources_client.py
Service Routing
- Service ID Sync
aap_gateway_api/utils/service_id_sync.py - Service Configuration
aap_gateway_api/models/service_cluster.py - Envoy Control Plane
aap_gateway_api/proxy/control_plane.py - Envoy API
aap_gateway_api/views/api/envoy/rest_control_plane.py
Gateway Operations
- Preferences
aap_gateway_api/utils/preferences.py - Migration Command
aap_gateway_api/management/commands/migrate_service_data.py - Migration Stages
aap_gateway_api/management/commands/_migrate_service_data - Startup Signals
aap_gateway_api/apps.py
Other components
- API Client
- Ansible Services
Connections 24
- API Client → API Routing: sends requests
aap_gateway_api/router.py - API Routing → API Views: routes to
aap_gateway_api/router.py - API Views → Gateway State: uses state
aap_gateway_api/views/__init__.py - API Views → Preferences: reads preferences
aap_gateway_api/views/__init__.py - Service Endpoints → Gateway State: uses state
aap_gateway_api/views/api/v1/service.py - Service Endpoints → API Views: uses shared views
aap_gateway_api/views/api/v1/service.py - User Endpoints → Gateway State: uses state
- Service Authentication → Shared Auth: uses auth helpers
aap_gateway_api/authentication/service_token_auth.py - Service Authentication → Resource API: authorizes access
- Service Authentication → Gateway State: checks migration state
aap_gateway_api/authentication/service_token_auth.py - Resource API → Upstream Resource Client: contacts services
- Upstream Resource Client → Ansible Services: sends HTTP requests
- Upstream Resource Client → Preferences: reads configuration
aap_gateway_api/utils/resources_client.py - Service ID Sync → Upstream Resource Client: fetches metadata
aap_gateway_api/utils/service_id_sync.py - Service ID Sync → Gateway State: queries routes
aap_gateway_api/utils/service_id_sync.py - Service Configuration → Gateway State: stores service settings
aap_gateway_api/models/service_cluster.py - Envoy API → Envoy Control Plane: serves control plane
- Envoy Control Plane → Shared Auth: uses auth helpers
aap_gateway_api/proxy/control_plane.py - Migration Command → Migration Stages: orchestrates stages
aap_gateway_api/management/commands/migrate_service_data.py - Migration Command → Gateway State: reads migration state
aap_gateway_api/management/commands/migrate_service_data.py - Migration Stages → Upstream Resource Client: calls upstream services
aap_gateway_api/management/commands/_migrate_service_data/service_orchestration.py - Migration Stages → Gateway State: loads service types
aap_gateway_api/management/commands/_migrate_service_data/service_orchestration.py - Startup Signals → Preferences: initializes preferences
aap_gateway_api/apps.py - Startup Signals → Envoy API: clears control cache
aap_gateway_api/apps.py