Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: Deploy RabbitMQ on Microsoft Azure Cobalt 100 Arm processors

minutes_to_complete: 30

who_is_this_for: This learning path is intended for software developers deploying and optimizing RabbitMQ workloads on Linux/Arm64 environments, specifically on Microsoft Azure Cobalt 100 Arm processors.

learning_objectives:
- Provision an Azure Arm-based Ubuntu Pro 24.04 virtual machine (Cobalt 100)
- Build and install Erlang OTP 26 from source on Ubuntu Arm64
- Install and configure RabbitMQ 4.2.0 on Azure Arm64
- Validate the RabbitMQ deployment using baseline messaging tests

prerequisites:
- An active [Microsoft Azure](https://azure.microsoft.com/) account
- Basic understanding of messaging systems and RabbitMQ concepts
- Familiarity with Linux command-line operations

author: Pareena Verma

##### Tags
skilllevels: Introductory
subjects: Databases
cloud_service_providers: Azure

armips:
- Neoverse

tools_software_languages:
- RabbitMQ
- Erlang

operatingsystems:
- Linux

# ================================================================================
# FIXED, DO NOT MODIFY
# ================================================================================
further_reading:
- resource:
title: Azure Virtual Machines documentation
link: https://learn.microsoft.com/azure/virtual-machines/
type: documentation

- resource:
title: RabbitMQ documentation
link: https://www.rabbitmq.com/documentation.html
type: documentation

- resource:
title: RabbitMQ Tutorials
link: https://www.rabbitmq.com/getstarted.html
type: documentation

weight: 1
layout: "learningpathall"
learning_path_main_page: "yes"
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# ================================================================================
# FIXED, DO NOT MODIFY THIS FILE
# ================================================================================
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
title: "Next Steps" # Always the same, html page title.
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Getting started with RabbitMQ on Azure Cobalt 100 Arm-based processor

weight: 2

layout: "learningpathall"
---

## Cobalt 100 Arm-based processor

Azure’s Cobalt 100 is built on Microsoft's first-generation, in-house Arm-based processor: the Cobalt 100. Designed entirely by Microsoft and based on Arm’s Neoverse N2 architecture, this 64-bit CPU delivers improved performance and energy efficiency across a broad spectrum of cloud-native, scale-out Linux workloads. These include web and application servers, data analytics, open-source databases, caching systems, and more. Running at 3.4 GHz, the Cobalt 100 processor allocates a dedicated physical core for each vCPU, ensuring consistent and predictable performance.

To learn more about Cobalt 100, refer to the blog [Announcing the preview of new Azure virtual machine based on the Azure Cobalt 100 processor](https://techcommunity.microsoft.com/blog/azurecompute/announcing-the-preview-of-new-azure-vms-based-on-the-azure-cobalt-100-processor/4146353).

## RabbitMQ

RabbitMQ is an open-source message broker that enables asynchronous communication between applications using messaging patterns such as queues, publish/subscribe, and routing.

It helps decouple system components, improve scalability, and increase reliability by ensuring messages are delivered and processed independently.

Learn more from the [RabbitMQ official website](https://www.rabbitmq.com/) and the [official documentation](https://www.rabbitmq.com/documentation.html).

Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
---
title: RabbitMQ Baseline Testing
weight: 5

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## Run a Baseline test with RabbitMQ
This section validates a working **RabbitMQ 4.2.0** installation with **Erlang OTP 26** on an **Azure Ubuntu Arm64 VM**.

All steps are **CLI-only** and suitable for baseline verification.

### Verify RabbitMQ service status

```console
sudo systemctl status rabbitmq
```

### Verify Erlang version
RabbitMQ depends on Erlang. This step ensures the broker is using Erlang OTP 26.

```console
erl -eval 'io:format("~s~n", [erlang:system_info(system_version)]), halt().' -noshell
```

### Verify RabbitMQ version
Confirm the installed RabbitMQ version.

```console
rabbitmqctl version
```

### Verify enabled plugins
List all enabled plugins and confirm that the management plugins are active.

```console
rabbitmq-plugins list -e
```

```output
Listing plugins with pattern ".*" ...
Configured: E = explicitly enabled; e = implicitly enabled
| Status: * = running on rabbit@lpprojectubuntuarm64
|/
[E*] rabbitmq_management 4.2.0
[e*] rabbitmq_management_agent 4.2.0
[e*] rabbitmq_web_dispatch 4.2.0
````

This confirms that:

- The management UI is enabled
- Required supporting plugins are running

### Check RabbitMQ node health
Retrieve detailed runtime and resource information for the RabbitMQ node.

```console
rabbitmqctl status
```
This confirms that:

- Node is running
- No alarms are reported
- Erlang version matches OTP 26

### Ensure RabbitMQ Configuration Directory Permissions
RabbitMQ requires write access to its configuration directory for plugin management.

```console
sudo mkdir -p /opt/rabbitmq/etc/rabbitmq
sudo chown -R azureuser:azureuser /opt/rabbitmq/etc/rabbitmq
```

### Create a baseline test virtual host
Create an isolated virtual host for baseline testing.

```console
rabbitmqctl add_vhost test_vhost
rabbitmqctl set_permissions -p test_vhost guest ".*" ".*" ".*"
```

This ensures:

- Tests do not interfere with default workloads
- Full permissions are available for validation

### Download RabbitMQ admin CLI
Download the `rabbitmqadmin` CLI tool from the management endpoint.

```console
wget http://localhost:15672/cli/rabbitmqadmin -O ~/rabbitmqadmin
chmod +x ~/rabbitmqadmin
```

This CLI is used to perform queue and message operations.

### Declare a test queue
Create a non-durable test queue in the test virtual host.

```console
~/rabbitmqadmin -V test_vhost declare queue name=test durable=false
```

### Publish a test message
Publish a sample message to the test queue using the default exchange.

```console
~/rabbitmqadmin -V test_vhost publish \
exchange=amq.default \
routing_key=test \
payload="Hello RabbitMQ"
```

This validates:

- Message routing
- Exchange-to-queue binding behavior

### Consume the test message
Retrieve and remove the message from the queue.

```console
~/rabbitmqadmin -V test_vhost get queue=test count=1
```

You should see an output similar to:

```output
+-------------+----------+---------------+----------------+---------------+------------------+------------+-------------+
| routing_key | exchange | message_count | payload | payload_bytes | payload_encoding | properties | redelivered |
+-------------+----------+---------------+----------------+---------------+------------------+------------+-------------+
| test | | 0 | Hello RabbitMQ | 14 | string | | False |
+-------------+----------+---------------+----------------+---------------+------------------+------------+-------------+
```

- Message payload: Hello RabbitMQ
- Queue becomes empty after consumption

This baseline validates a healthy RabbitMQ 4.2.0 deployment running on Erlang/OTP 26 on an Azure Ubuntu Arm64 VM. Core components, plugins, and node health were verified, followed by successful message publish and consume operations.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
title: Install RabbitMQ
weight: 4

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## Install RabbitMQ on Azure Cobalt 100
This guide describes the end-to-end installation of RabbitMQ 4.2.0 on an Azure Cobalt 100 (Arm-based) Ubuntu Pro 24.04 virtual machine. It covers system preparation, Erlang installation, RabbitMQ setup, service configuration, and validation with the management plugin enabled.

### Update system and install build dependencies
This step ensures the operating system is up to date and installs all required packages needed to build Erlang and run RabbitMQ reliably.

```console
sudo apt update
sudo apt install -y build-essential libssl-dev libncurses-dev libtinfo-dev \
libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev \
unixodbc-dev wget tar xz-utils git
```

### Build and install Erlang OTP 26
RabbitMQ 4.2.0 requires Erlang OTP 26. This section builds Erlang from source to ensure full compatibility on Arm64.

```console
# Clone Erlang source
git clone https://github.com/erlang/otp.git
cd otp

# Checkout OTP 26 branch
git checkout OTP-26

# Clean previous builds
make clean

# Configure build with SSL/crypto support
./configure --prefix=/usr/local/erlang-26 \
--enable-smp-support \
--enable-threads \
--enable-kernel-poll \
--with-ssl

# Build and install
make -j$(nproc)
sudo make install
```
### Make Erlang PATH persistent (IMPORTANT)
This step ensures the Erlang binaries are permanently available in the system PATH across sessions and reboots.

```console
echo 'export ERLANG_HOME=/usr/local/erlang-26' | sudo tee /etc/profile.d/erlang.sh
echo 'export PATH=$ERLANG_HOME/bin:$PATH' | sudo tee -a /etc/profile.d/erlang.sh
```

### Download and install RabbitMQ
This section downloads the official RabbitMQ 4.2.0 generic Unix distribution and installs it under `/opt/rabbitmq`.

```console
cd ~
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v4.2.0/rabbitmq-server-generic-unix-4.2.0.tar.xz
sudo mkdir -p /opt/rabbitmq
sudo tar -xvf rabbitmq-server-generic-unix-4.2.0.tar.xz -C /opt/rabbitmq --strip-components=1

# Create directories for logs and database
sudo mkdir -p /var/lib/rabbitmq /var/log/rabbitmq
sudo chown -R $USER:$USER /var/lib/rabbitmq /var/log/rabbitmq
```

#### Update PATH environment variable
This step makes RabbitMQ CLI tools available in the current shell and should be persisted for future sessions.

```console
export PATH=/usr/local/erlang-26/bin:/opt/rabbitmq/sbin:$PATH
```

Add this line to `~/.bashrc` or `~/.profile` for persistence.

### Configure RabbitMQ systemd service
This section configures RabbitMQ to run as a managed systemd service, enabling automatic startup and controlled lifecycle management.

Create `/etc/systemd/system/rabbitmq.service`:

```ini
[Unit]
Description=RabbitMQ broker
After=network.target

[Service]
Type=simple
User=azureuser
Group=azureuser

Environment=HOME=/home/azureuser
Environment=RABBITMQ_HOME=/opt/rabbitmq
Environment=RABBITMQ_MNESIA_BASE=/var/lib/rabbitmq
Environment=RABBITMQ_LOG_BASE=/var/log/rabbitmq
Environment=PATH=/usr/local/erlang-26/bin:/opt/rabbitmq/sbin:/usr/bin

ExecStart=/opt/rabbitmq/sbin/rabbitmq-server
ExecStop=/opt/rabbitmq/sbin/rabbitmqctl shutdown

Restart=on-failure
RestartSec=10
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target
```

Reload systemd and start RabbitMQ:

```console
sudo systemctl daemon-reload
sudo systemctl enable rabbitmq
sudo systemctl start rabbitmq
sudo systemctl status rabbitmq
```

### Enable RabbitMQ management plugin
This step enables the RabbitMQ management plugin, which provides a web-based UI and HTTP API for monitoring and administration.

```console
# Ensure config directory exists
sudo mkdir -p /opt/rabbitmq/etc/rabbitmq
sudo chown -R $USER:$USER /opt/rabbitmq/etc/rabbitmq

# Enable management plugin
rabbitmq-plugins enable rabbitmq_management
```

### Verify installation
This section validates that both Erlang and RabbitMQ are installed correctly and running with the expected versions.

**Erlang version:**

```console
erl -eval 'io:format("~s~n", [erlang:system_info(system_version)]), halt().' -noshell
```

You should see an output similar to:
```output
Erlang/OTP 26 [erts-14.2.5.12] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit]
```

**Verify RabbitMQ version:**

```console
rabbitmqctl version
```

You should see an output similar to:
```output
4.2.0
```
RabbitMQ 4.2.0 is successfully installed on an Azure Cobalt 100 Ubuntu Pro 24.04 Arm64 VM with systemd management, persistent storage, logging, and the management plugin enabled.
Loading