Architecting the Elastic Stack on Microsoft Azure: From Manual VM Deployment to Seamless SaaS Integration

The deployment of the Elastic Stack—comprising Elasticsearch, Logstash, and Kibana—within the Microsoft Azure ecosystem represents a critical architectural decision for organizations seeking real-time search, analysis, and visualization of massive datasets. Traditionally, the process of configuring these components on cloud infrastructure was characterized by significant technical friction, requiring a deep intersection of expertise in both the Elastic distributed system and the Azure cloud fabric. However, the evolution of this relationship has transitioned from manual, labor-intensive installations on virtual machines to a highly integrated Software-as-a-Service (SaaS) offering available via the Azure Marketplace. This evolution allows enterprises to shift their focus from managing the underlying infrastructure—such as JVM tuning and OS patching—to deriving actionable intelligence from their service logs and metrics. By leveraging a unified control plane, organizations can now achieve a state of unified observability, particularly for complex environments like Spring Boot applications, ensuring that system health and performance data are readily available for rapid decision-making.

The Dichotomy of Elastic Deployment Models on Azure

When implementing the Elastic Stack on Azure, architects must choose between two primary deployment paths: the manual self-managed approach on Virtual Machines (VMs) and the integrated SaaS offering. Each path carries distinct operational implications and technical requirements.

The manual deployment involves provisioning Ubuntu Virtual Machines or Flexible Scale Sets. This method provides the operator with absolute control over the configuration but introduces significant overhead. It requires the manual installation of the Java Runtime Environment (JRE), as the Elastic Stack is Java-based and necessitates a properly configured JAVA_HOME environment variable to execute. This path is generally recommended for basic development or specialized use cases where specific kernel-level tuning is required.

Conversely, the integrated SaaS offering, available since May 25 through the Azure Marketplace, removes the operational burden of server management. This integration consolidates deployment, billing, and support into a single portal experience. By utilizing the Azure Control Plane, users can provision Elastic services without manually managing the underlying compute resources. This shift significantly reduces the "time-to-value," as the integration enables the automatic forwarding of logs and metrics from Azure resources directly into the Elastic environment.

Technical Implementation: Manual Deployment on Linux VMs

For developers and engineers opting for the manual route, the process is centered around an Ubuntu environment. This deployment is suitable for development environments but requires adherence to specific installation sequences to ensure stability.

The foundational requirement for this setup is the Azure CLI. To maintain a clean local environment, it is recommended to run the Azure CLI within a Docker container on Windows or macOS. Authentication is handled via the az login command, and the necessary extensions must be installed upon first use to interact with Azure resource groups.

The installation process involves a series of precise steps to configure the package manager and the runtime environment:

  1. Setup of GPG keys and repository sources:
    ssh azureuser@$PUBLIC_IP_ADDRESS -o StrictHostKeyChecking=no "wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -"
    ssh azureuser@$PUBLIC_IP_ADDRESS -o StrictHostKeyChecking=no "echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list"

  2. Installation of the Java Virtual Machine:
    The Elastic Stack requires a headless JRE. The following commands install the OpenJDK 8 headless version and set the necessary environment path:
    ssh azureuser@$PUBLIC_IP_ADDRESS -o StrictHostKeyChecking=no "sudo apt install -y openjdk-8-jre-headless"
    ssh azureuser@$PUBLIC_IP_ADDRESS -o StrictHostKeyChecking=no "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64"

  3. Deployment of the ELK Stack components:
    After updating the package sources to the 7.x branch, the three core components are installed simultaneously:
    ssh azureuser@$PUBLIC_IP_ADDRESS -o StrictHostKeyChecking=no "wget -qO elasticsearch.gpg https://artifacts.elastic.co/GPG-KEY-elasticsearch"
    ssh azureuser@$PUBLIC_IP_ADDRESS -o StrictHostKeyChecking=no "sudo mv elasticsearch.gpg /etc/apt/trusted.gpg.d/"
    ssh azureuser@$PUBLIC_IP_ADDRESS -o StrictHostKeyChecking=no "echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list"
    ssh azureuser@$PUBLIC_IP_ADDRESS -o StrictHostKeyed=no "sudo apt update"
    ssh azureuser@$PUBLIC_IP_ADDRESS -o StrictHostKeyChecking=no "sudo apt install -y elasticsearch kibana logstash"

  4. Service Activation:
    Once installed, the Elasticsearch service must be manually started using the system controller:
    ssh azureuser@$PUBLIC_IP_ADDRESS -o StrictHostKeyChecking=no "sudo systemctl start elasticsearch.service"

This manual process emphasizes the necessity of managing ports and networking, as users must open specific ports in the Azure Network Security Group (NSG) to allow traffic to reach the Kibana console and for Logstash to ingest data.

Integration Architecture: The SaaS and Control Plane Approach

The modern integration of Elastic on Azure is designed to minimize operational overhead by treating the Elastic service as a native component of the Azure ecosystem. This is achieved through several key technical layers:

The Provisioning Layer
Customers can provision new Elastic services directly from the Azure Control Plane. This eliminates the need to manage VM images or manual installation scripts. The integration ensures that the deployment is "frictionless," meaning the network and identity layers are pre-configured to work with the Azure environment.

The Log Forwarding Layer
The integration utilizes Azure's Diagnostic Settings to automate the flow of data. By configuring these settings within the Azure portal, users can instruct Azure resources to send logs and metrics to Elastic automatically. This removes the need for custom-written scripts to scrape logs from the underlying OS.

The Agent Management Layer
For those using Azure Virtual Machines, the integration allows for the management of the Elastic Agent via VM extensions. This means that logs and metrics emitted from the host OS can be configured and managed centrally, ensuring that all VMs in a cluster are reporting data consistently.

The Connectivity and Security Layer
To address the critical requirement of network security, Microsoft and Elastic have implemented Private Link access. This allows a secure, private connection from an Azure Virtual Network (VNet) directly into the virtual network on Elastic Cloud. This bypasses the public internet, significantly reducing the attack surface. Furthermore, the implementation of Single-Sign-On (SSO) allows users to use their unified Azure credentials to access the Elastic Cloud, streamlining the authentication process.

Data Ingestion Pipeline: Azure Event Hubs and Elastic Agent

The movement of data from Azure services to the Elastic Stack relies on a specific architectural pipeline involving diagnostic settings, Event Hubs, and the Elastic Agent.

The ingestion flow follows this logical path:
Microsoft Entra ID/Azure Monitor/Spring Apps -> Diagnostic Settings -> Event Hub -> Elastic Agent -> Elasticsearch.

To implement this pipeline, several prerequisites must be met:

  • Diagnostic Settings: These are required to export logs from the source service.
  • Azure Event Hubs: This acts as the primary data streaming platform and event ingestion service, storing in-flight logs before they are consumed.
  • Storage Account Container: A dedicated container is required to store metadata and information regarding the logs consumed by the Elastic Agent.

The Elastic Agent functions as the client that connects to these Azure services. This connection requires specific network configurations to ensure that the agent can receive events.

Connection Requirement Protocol/Port Purpose
Standard AMQP 5671 / 5672 Outbound TCP connections for event reception
AMQP-over-WebSockets 443 (HTTPS) Tunneling AMQP when standard ports are blocked
Storage Account 443 (HTTPS) Communication with Azure Storage Account service

In environments where firewall restrictions block ports 5671 or 5672, the integration supports AMQP-over-WebSockets. This allows the agent to tunnel traffic over port 443, which is generally open for HTTPS traffic. To enable this, the user must set the Event Hubs transport protocol to AMQP-over-WebSockets in the advanced options of the integration.

The technical specifications for the agent and processor are strict. To ensure compatibility, the Elastic Agent must be version 8.19.10, 9.1.10, 9.2.4, or later. Additionally, the Processor version must be explicitly set to v2 within the integration settings to function correctly.

Operational Impact and Business Value

The shift toward a native integration of Elastic on Azure has profound impacts on the operational efficiency of IT teams. By centralizing management and billing, the administrative burden is drastically reduced.

Unified Billing
Previously, users had to manage separate invoices for their cloud compute (Azure) and their search/analytics software (Elastic). The current integration allows for unified billing through Azure subscription invoicing, simplifying the financial reconciliation process for enterprises.

Reduced Operational Overhead
The "frictionless migration" mentioned by leadership ensures that organizations can move existing workloads to Azure without redesigning their entire logging architecture. The ability to configure Private Link directly from the Azure portal reduces the time spent on complex networking tasks, allowing engineers to focus on data analysis rather than connectivity troubleshooting.

Unified Observability
For developers using Spring Boot applications, the integration provides a comprehensive view of the application stack. By combining Azure's native monitoring with Elastic's powerful search and visualization capabilities in Kibana, teams can identify bottlenecks and resolve incidents faster.

Conclusion

The deployment of the Elastic Stack on Azure has evolved from a manual, complex installation process on Linux VMs to a sophisticated, integrated SaaS experience. While the manual path using Ubuntu VMs remains viable for development and highly customized environments—requiring precise execution of GPG key imports, JRE installation, and systemctl service management—the strategic direction is clearly toward the integrated offering. The synergy between Azure's Diagnostic Settings, Event Hubs, and the Elastic Agent creates a robust pipeline for real-time data ingestion. By utilizing Private Link for security, SSO for identity management, and unified billing for administration, the Elastic-Azure partnership solves the primary challenges of operational overhead and network security. The ability to transition from a raw log stream in an Event Hub to a visualized dashboard in Kibana, all managed via the Azure Control Plane, represents the pinnacle of modern cloud-native observability.

Sources

  1. Search Made Simple: Native Elastic Integration with Azure Now in Preview
  2. Tutorial: Deploy Elasticsearch, Logstash, and Kibana on an Ubuntu VM in Azure
  3. Elastic Azure Integrations Reference

Related Posts