Deployment: Via Azure Arc Extension
This guide explains how to deploy DataStream using Azure Arc Extensions, enabling consistent management across hybrid and multi-cloud environments. This deployment model is ideal for organizations with resources spanning on-premises datacenters, multiple cloud providers, or edge environments.
Benefits
Deploying DataStream as an Azure Arc Extension provides several advantages:
- Unified management: Manage all DataStream deployments from a single control plane
- Hybrid consistency: Deploy identical configurations across on-premises and cloud environments
- Central governance: Apply consistent policies and compliance rules
- Simplified operations: Automated deployment and updates across diverse infrastructure
- Azure integration: Leverage Azure's security, monitoring, and management capabilities
Architecture Overview
Azure Arc extends Azure's control plane to non-Azure environments. The DataStream extension architecture consists of:
- Azure Arc-enabled servers: On-premises or other cloud VMs registered with Azure Arc
- DataStream extension: The extension package containing DataStream software
- Azure Resource Manager: Central control plane for deployment and configuration
- Azure Policy: Optional component for automated compliance and configuration
Prerequisites
Before deploying DataStream via Azure Arc, ensure you have:
- Azure Arc-enabled servers: Register target servers with Azure Arc
- Required permissions: Contributor role on resource groups
- Network connectivity: Outbound access from servers to Azure services
- System requirements:
- OS: Windows Server 2012 R2+ or Linux (Ubuntu 16.04+, RHEL 7+, etc.)
- CPU: 2+ cores recommended
- Memory: 4GB+ RAM
- Storage: 10GB+ free space
Deployment Steps
1. Register Azure Arc Servers
If not already done, register servers with Azure Arc:
-
Install Azure CLI and the Arc extension:
- Windows
- Linux
- macOS
-
Install Azure CLI if not already installed
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi
Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet' -
Add Arc extension
az extension add --name connectedmachine
-
Install Azure CLI if not already installed
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
-
Add Arc extension
az extension add --name connectedmachine
-
Install Azure CLI if not already installed
brew update && brew install azure-cli
-
Add Arc extension
az extension add --name connectedmachine
-
Generate onboarding script from Azure Portal or CLI:
- Windows
- Linux
- macOS
az connectedmachine generate-installation-script --resource-group myResourceGroup --location eastus --output-dir .
az connectedmachine generate-installation-script --resource-group myResourceGroup --location eastus --output-dir .
az connectedmachine generate-installation-script --resource-group myResourceGroup --location eastus --output-dir .
-
Run the script on each target server:
- Windows
- Linux
- macOS
Run the generated script
.\OnboardingScript.ps1
-
Make the script executable
chmod +x ./install_arc_agent.sh
-
Run the script
sudo ./install_arc_agent.sh
Arc agent is not directly supported on macOS. Use this for managing remote servers only.
2. Register DataStream Extension
-
Register the DataStream extension provider in your Azure subscription:
- Windows
- Linux
- macOS
az provider register --namespace Microsoft.HybridCompute
az provider register --namespace Microsoft.GuestConfiguration
az provider register --namespace Microsoft.Extensionsaz provider register --namespace Microsoft.HybridCompute
az provider register --namespace Microsoft.GuestConfiguration
az provider register --namespace Microsoft.Extensionsaz provider register --namespace Microsoft.HybridCompute
az provider register --namespace Microsoft.GuestConfiguration
az provider register --namespace Microsoft.Extensions -
Create an extension deployment template:
- Windows
- Linux
- macOS
Create a new ARM template for DataStream extension
@"
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"machineName": {
"type": "string",
"metadata": {
"description": "Name of the Azure Arc-enabled server"
}
},
"location": {
"type": "string",
"metadata": {
"description": "Location of the machine"
}
}
},
"resources": [
{
"type": "Microsoft.HybridCompute/machines/extensions",
"name": "[concat(parameters('machineName'), '/DataStreamExtension')]",
"apiVersion": "2020-08-15-preview",
"location": "[parameters('location')]",
"properties": {
"publisher": "DataStream",
"type": "CustomExtension",
"autoUpgradeMinorVersion": true,
"settings": {
"devices": [
{
"id": 1,
"name": "syslog_collector",
"type": "syslog",
"properties": {
"port": 514
}
}
],
"targets": [
{
"name": "azure_monitor",
"type": "azure_monitor",
"workspace_id": "${WORKSPACE_ID}",
"workspace_key": "${WORKSPACE_KEY}"
}
]
},
"protectedSettings": {
"WORKSPACE_ID": "<your-workspace-id>",
"WORKSPACE_KEY": "<your-workspace-key>"
}
}
}
]
}
"@ | Out-File -FilePath "datastream-extension.json" -Encoding utf8Create a new ARM template for DataStream extension
cat > datastream-extension.json << 'EOF'
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"machineName": {
"type": "string",
"metadata": {
"description": "Name of the Azure Arc-enabled server"
}
},
"location": {
"type": "string",
"metadata": {
"description": "Location of the machine"
}
}
},
"resources": [
{
"type": "Microsoft.HybridCompute/machines/extensions",
"name": "[concat(parameters('machineName'), '/DataStreamExtension')]",
"apiVersion": "2020-08-15-preview",
"location": "[parameters('location')]",
"properties": {
"publisher": "DataStream",
"type": "CustomExtension",
"autoUpgradeMinorVersion": true,
"settings": {
"devices": [
{
"id": 1,
"name": "syslog_collector",
"type": "syslog",
"properties": {
"port": 514
}
}
],
"targets": [
{
"name": "azure_monitor",
"type": "azure_monitor",
"workspace_id": "${WORKSPACE_ID}",
"workspace_key": "${WORKSPACE_KEY}"
}
]
},
"protectedSettings": {
"WORKSPACE_ID": "<your-workspace-id>",
"WORKSPACE_KEY": "<your-workspace-key>"
}
}
}
]
}
EOFCreate a new ARM template for DataStream extension
cat > datastream-extension.json << 'EOF'
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"machineName": {
"type": "string",
"metadata": {
"description": "Name of the Azure Arc-enabled server"
}
},
"location": {
"type": "string",
"metadata": {
"description": "Location of the machine"
}
}
},
"resources": [
{
"type": "Microsoft.HybridCompute/machines/extensions",
"name": "[concat(parameters('machineName'), '/DataStreamExtension')]",
"apiVersion": "2020-08-15-preview",
"location": "[parameters('location')]",
"properties": {
"publisher": "DataStream",
"type": "CustomExtension",
"autoUpgradeMinorVersion": true,
"settings": {
"devices": [
{
"id": 1,
"name": "syslog_collector",
"type": "syslog",
"properties": {
"port": 514
}
}
],
"targets": [
{
"name": "azure_monitor",
"type": "azure_monitor",
"workspace_id": "${WORKSPACE_ID}",
"workspace_key": "${WORKSPACE_KEY}"
}
]
},
"protectedSettings": {
"WORKSPACE_ID": "<your-workspace-id>",
"WORKSPACE_KEY": "<your-workspace-key>"
}
}
}
]
}
EOF
3. Deploy the Extension
-
Deploy to a single server using Azure CLI:
- Windows
- Linux
- macOS
az deployment group create `
--resource-group myResourceGroup `
--template-file datastream-extension.json `
--parameters machineName=myArcServer location=eastusaz deployment group create \
--resource-group myResourceGroup \
--template-file datastream-extension.json \
--parameters machineName=myArcServer location=eastusaz deployment group create \
--resource-group myResourceGroup \
--template-file datastream-extension.json \
--parameters machineName=myArcServer location=eastus -
Deploy to multiple servers using Azure Policy:
- Navigate to Azure Policy in the portal
- Create a new policy definition for extension deployment
- Assign policy to a management group or subscription
- Target Arc-enabled servers using appropriate filters
4. Configure DataStream Settings
Configure DataStream through the extension settings:
-
Use Azure Portal:
- Navigate to Arc-enabled server > Extensions
- Select DataStream extension
- Update configuration parameters
-
Use Azure Resource Manager template:
- Windows
- Linux
- macOS
# Create updated configuration template
@"
{
"settings": {
"collectors": [
{
"id": 1,
"name": "windows_collector",
"type": "windows",
"properties": {
"address": "localhost",
"username": "datastream",
"password": "${WINDOWS_PASSWORD}"
}
}
],
"pipelines": [
{
"name": "windows_events",
"processors": [
{
"grok": {
"field": "message",
"patterns": ["%{WINLOG}"]
}
}
]
}
]
},
"protectedSettings": {
"WINDOWS_PASSWORD": "your-secure-password"
}
}
"@ | Out-File -FilePath "updated-config.json" -Encoding utf8cat > updated-config.json << 'EOF'
{
"settings": {
"collectors": [
{
"id": 1,
"name": "syslog_collector",
"type": "syslog",
"properties": {
"port": 514
}
}
],
"pipelines": [
{
"name": "linux_events",
"processors": [
{
"grok": {
"field": "message",
"patterns": ["%{SYSLOGLINE}"]
}
}
]
}
]
}
}
EOFcat > updated-config.json << 'EOF'
{
"settings": {
"collectors": [
{
"id": 1,
"name": "syslog_collector",
"type": "syslog",
"properties": {
"port": 514
}
}
],
"pipelines": [
{
"name": "macos_events",
"processors": [
{
"grok": {
"field": "message",
"patterns": ["%{SYSLOGLINE}"]
}
}
]
}
]
}
}
EOF -
Apply configuration update:
- Windows
- Linux
- macOS
az deployment group create `
--resource-group myResourceGroup `
--template-file updated-config.jsonaz deployment group create \
--resource-group myResourceGroup \
--template-file updated-config.jsonaz deployment group create \
--resource-group myResourceGroup \
--template-file updated-config.json
5. Verify Deployment
-
Check extension status via Azure Portal:
- Navigate to Arc-enabled server > Extensions
- Verify DataStream extension shows "Provisioning succeeded"
-
Check extension logs on the server:
- Windows
- Linux
- macOS
# Check log files in the extension directory
Get-Content -Path "C:\ProgramData\AzureConnectedMachineAgent\Log\DataStreamExtension\*.log"sudo cat /var/log/azure/datastream-extension/*
# Not applicable for macOS hosts
-
Verify DataStream service is running:
- Windows
- Linux
- macOS
Get-Service DataStream
sudo systemctl status datastream
# Not applicable for macOS hosts
Managing at Scale
For large-scale deployments across hybrid environments:
1. Configuration Management
Use Azure Arc's configuration capabilities:
-
Create configuration profiles:
- Define standard DataStream configurations for different server types
- Use parameters for environment-specific values
-
Implement Azure Policy for automated deployment:
- Assign DataStream extension policies to management groups
- Use policy remediation to ensure compliance
-
Use GitHub integration for GitOps-based configuration:
- Store configurations in a Git repository
- Automatically apply changes when configuration is updated
2. Monitoring and Updates
-
Centralized monitoring:
- Deploy Azure Monitor agent extension alongside DataStream
- Collect logs and metrics for all deployments
- Create dashboards for cross-environment visibility
-
Update management:
- Configure automatic extension updates for security patches
- Stage updates across environments (dev/test/prod)
- Use maintenance windows to minimize disruption
3. Security Management
-
Credential management:
- Use protected settings for sensitive values
- Rotate credentials automatically using Azure Key Vault
-
Network security:
- Implement resource firewalls consistently across environments
- Monitor network traffic with Azure Network Watcher
Edge and Disconnected Scenarios
For deployments in edge or occasionally connected environments:
-
Configure offline mode:
"settings": {
"offlineMode": true,
"localBuffering": {
"enabled": true,
"maxSize": "5GB",
"flushInterval": "4h"
}
} -
Enable data buffering: Configure local storage for data persistence during disconnection
-
Connection resiliency: Implement auto-retry mechanisms for reconnection
Transitioning from Other Deployment Methods
If migrating from other deployment models to Azure Arc:
- Preserve configurations - Export existing DataStream configurations
- Register servers - Onboard servers to Azure Arc without disrupting current services
- Stage migrations - Deploy extension alongside existing installation before cutover
- Validate - Verify data flow and performance before decommissioning original deployment
This deployment approach is ideal for organizations with hybrid infrastructure models, providing a consistent management experience regardless of where DataStream is running.