Development Setup - seojedaperez/IgnisMap GitHub Wiki
This guide provides complete setup instructions for the IgnisMap emergency response system's Azure cloud infrastructure, including automated provisioning, service configuration, and monitoring setup.
Before starting the development setup, ensure you have:
- Azure account with $1,000 USD credits 1
- Azure CLI installed and configured 2
- Contributor permissions on Azure subscription 3
The system uses eight core Azure services organized into critical and supporting tiers:
graph TB
subgraph "Critical Services ($115-150/month)"
AzureMaps["emergency-app-maps<br/>Azure Maps S1"]
CosmosDB["emergency-app-cosmos<br/>Cosmos DB"]
Functions["emergency-app-functions<br/>Function App"]
OpenAI["emergency-openai<br/>Cognitive Services"]
end
subgraph "Supporting Services ($50-120/month)"
EventHub["emergency-app-events<br/>Event Hubs"]
CogServices["emergency-app-cognitive<br/>Cognitive Services"]
KeyVault["emergency-app-vault<br/>Key Vault"]
AppInsights["emergency-app-insights<br/>Application Insights"]
Storage["emergencystorage<br/>Storage Account"]
end
subgraph "External Data Sources"
NASA["NASA FIRMS API"]
Weather["Open-Meteo API"]
end
AzureMaps --> Functions
CosmosDB --> Functions
Functions --> OpenAI
Functions --> CogServices
EventHub --> Functions
KeyVault --> Functions
KeyVault --> CosmosDB
KeyVault --> AzureMaps
Functions --> AppInsights
Functions --> Storage
NASA --> EventHub
Weather --> Functions
The setup process is automated through shell scripts that create all necessary Azure resources: 4
flowchart TD
Start["azure-setup.sh"] --> Login["az login verification"]
Login --> ResourceGroup["Create emergency-rg<br/>Resource Group"]
ResourceGroup --> Maps["Create emergency-app-maps<br/>S1 SKU"]
Maps --> Cosmos["Create emergency-app-cosmos<br/>GlobalDocumentDB"]
Cosmos --> Containers["Create 8 Cosmos containers<br/>Organizations, FireAlerts, etc."]
Containers --> Storage["Create storage account<br/>Standard_LRS"]
Storage --> Functions["Create emergency-app-functions<br/>Node.js 18, v4"]
Functions --> Cognitive["Create emergency-app-cognitive<br/>CognitiveServices S0"]
Cognitive --> EventHubs["Create emergency-app-events<br/>Standard SKU"]
EventHubs --> KeyVault["Create emergency-app-vault<br/>Standard SKU"]
KeyVault --> Secrets["Store connection strings<br/>and API keys"]
Secrets --> Insights["Create emergency-app-insights<br/>Application Insights"]
Insights --> Config["Configure Function App<br/>environment variables"]
Config --> Output["Generate azure-config.json<br/>configuration file"]
Execute the automated setup script: 5
chmod +x scripts/setup-azure-emergency.sh
./scripts/setup-azure-emergency.sh
The system uses Cosmos DB with eight specialized containers optimized for different data types and access patterns: 6
graph TB
subgraph "EmergencyDB Database"
Orgs[Organizations<br/>Partition: /organizationType<br/>400 RU/s]
Zones[MonitoringZones<br/>Partition: /organizationId<br/>400 RU/s]
Alerts[FireAlerts<br/>Partition: /organizationId<br/>1000 RU/s]
Plans[TacticalPlans<br/>Partition: /organizationType<br/>400 RU/s]
Satellite[SatelliteData<br/>Partition: /satellite<br/>2000 RU/s<br/>TTL: 30 days]
Weather[WeatherData<br/>Partition: /location<br/>800 RU/s<br/>TTL: 7 days]
Resources[ResourceAllocation<br/>Partition: /organizationId<br/>400 RU/s]
Audit[AuditLog<br/>Partition: /organizationId<br/>400 RU/s]
end
subgraph "Access Patterns"
Orgs --> "Query by organization type"
Zones --> "Query by organization ID"
Alerts --> "Query by organization ID"
Plans --> "Query by organization type"
Satellite --> "Query by satellite source"
Weather --> "Query by geographic region"
Resources --> "Query by organization ID"
Audit --> "Query by organization ID"
end
The Function App receives configuration through environment variables managed by the provisioning script: 7
Variable | Source | Purpose |
---|---|---|
COSMOS_CONNECTION_STRING |
Cosmos DB primary connection string | Database access |
AZURE_MAPS_KEY |
Azure Maps primary key | Geospatial services |
COGNITIVE_SERVICES_ENDPOINT |
Cognitive Services endpoint URL | AI service access |
COGNITIVE_SERVICES_KEY |
Cognitive Services primary key | AI service authentication |
APPINSIGHTS_INSTRUMENTATIONKEY |
Application Insights key | Telemetry collection |
Critical secrets are stored in Key Vault for secure access: 8
graph LR
KeyVault["emergency-app-vault"] --> CosmosSecret["CosmosConnectionString"]
KeyVault --> MapsSecret["AzureMapsKey"]
KeyVault --> CognitiveSecret["CognitiveServicesKey"]
CosmosSecret --> CosmosDB["emergency-app-cosmos"]
MapsSecret --> AzureMaps["emergency-app-maps"]
CognitiveSecret --> CogServices["emergency-app-cognitive"]
The system processes real-time satellite data through Event Hubs: 9
sequenceDiagram
participant NASA as "NASA FIRMS API"
participant EventHub as "satellite-data Event Hub"
participant Functions as "Azure Functions"
participant Cosmos as "Cosmos DB"
participant AI as "Cognitive Services"
NASA->>EventHub: Satellite fire data
EventHub->>Functions: ProcessSatelliteData trigger
Functions->>AI: Analyze fire imagery
Functions->>Cosmos: Store processed data
Functions->>Functions: GenerateTacticalPlan
Functions->>Cosmos: Store tactical plans
All Azure resources follow the naming pattern {APP_NAME}-{SERVICE_TYPE}
where APP_NAME
is "emergency-app": 10
Service Type | Resource Name | Purpose |
---|---|---|
Maps | emergency-app-maps |
Geospatial mapping services |
Cosmos DB | emergency-app-cosmos |
Global document database |
Functions | emergency-app-functions |
Serverless compute platform |
Cognitive Services | emergency-app-cognitive |
AI and ML services |
Event Hubs | emergency-app-events |
Real-time data streaming |
Key Vault | emergency-app-vault-{timestamp} |
Secrets management |
App Insights | emergency-app-insights |
Application monitoring |
Storage | emergencystorage{timestamp} |
File and blob storage |
The Azure infrastructure operates with an estimated monthly cost of $165-270 USD: 11
Service Category | Cost Range | Services Included |
---|---|---|
Critical Tier | $115-150/month | Azure Maps ($50-80), Cosmos DB ($25-40), Functions ($10-20), OpenAI ($30-50) |
Supporting Tier | $50-120/month | Cognitive Services ($30-50), Event Hubs ($30-50), Storage/Vault/Insights ($20-30) |
Run the automated provisioning script: 5
After script execution, configure the generated keys in your application: 12
Test all service connections to ensure proper functionality: 13
Application Insights provides comprehensive monitoring: 14
- Performance monitoring: Function execution times and resource utilization
- Error tracking: Exception logging and failure analysis
- Custom telemetry: Fire detection accuracy and response time metrics
- Dependency tracking: External API call monitoring
Metric | Target | Purpose |
---|---|---|
Alert response time | < 30 seconds | Emergency response effectiveness |
Fire detection accuracy | > 95% | Prediction system reliability |
System availability | 99.9% | Service continuity |
Tactical plan generation | < 2 minutes | Operational readiness |
Satellite data latency | < 5 minutes | Real-time monitoring capability |
After completing the setup: 15
- Copy the generated API keys to your application settings
- Obtain NASA FIRMS API key from https://firms.modaps.eosdis.nasa.gov/api/
- Configure Azure OpenAI (optional) via Azure Portal
- Deploy Azure Functions
- Configure alerts in Azure Monitor
The setup information is based on the IgnisMap emergency response system's Azure infrastructure as documented in the IgnisMap repository. The system includes automated provisioning scripts (azure-setup.sh
and setup-azure-emergency.sh
) that create all necessary Azure resources with proper configuration. The React-based setup guide (AzureSetupGuide.tsx
) provides a user interface for managing the configuration process. All cost estimates and service configurations are based on the current Azure pricing and the specific requirements of the emergency response system.