Skip to content

Commit 2b85aed

Browse files
committed
Deploy RabbitMQ on Microsoft Azure Cobalt 100 Arm processors
Signed-off-by: odidev <odidev@puresoftware.com>
1 parent a1d1f33 commit 2b85aed

11 files changed

Lines changed: 434 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Deploy RabbitMQ on Microsoft Azure Cobalt 100 Arm processors
3+
4+
minutes_to_complete: 30
5+
6+
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.
7+
8+
learning_objectives:
9+
- Provision an Azure Arm-based Ubuntu Pro 24.04 virtual machine (Cobalt 100)
10+
- Build and install Erlang OTP 26 from source on Ubuntu Arm64
11+
- Install and configure RabbitMQ 4.2.0 on Azure Arm64
12+
- Validate the RabbitMQ deployment using baseline messaging tests
13+
14+
prerequisites:
15+
- An active [Microsoft Azure](https://azure.microsoft.com/) account
16+
- Basic understanding of messaging systems and RabbitMQ concepts
17+
- Familiarity with Linux command-line operations
18+
19+
author: Pareena Verma
20+
21+
##### Tags
22+
skilllevels: Introductory
23+
subjects: Databases
24+
cloud_service_providers: Azure
25+
26+
armips:
27+
- Neoverse
28+
29+
tools_software_languages:
30+
- RabbitMQ
31+
- Erlang
32+
33+
operatingsystems:
34+
- Linux
35+
36+
# ================================================================================
37+
# FIXED, DO NOT MODIFY
38+
# ================================================================================
39+
further_reading:
40+
- resource:
41+
title: Azure Virtual Machines documentation
42+
link: https://learn.microsoft.com/azure/virtual-machines/
43+
type: documentation
44+
45+
- resource:
46+
title: RabbitMQ documentation
47+
link: https://www.rabbitmq.com/documentation.html
48+
type: documentation
49+
50+
- resource:
51+
title: RabbitMQ Tutorials
52+
link: https://www.rabbitmq.com/getstarted.html
53+
type: documentation
54+
55+
weight: 1
56+
layout: "learningpathall"
57+
learning_path_main_page: "yes"
58+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Getting started with RabbitMQ on Azure Cobalt 100 Arm-based processor
3+
4+
weight: 2
5+
6+
layout: "learningpathall"
7+
---
8+
9+
## Cobalt 100 Arm-based processor
10+
11+
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.
12+
13+
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).
14+
15+
## RabbitMQ
16+
17+
RabbitMQ is an open-source message broker that enables asynchronous communication between applications using messaging patterns such as queues, publish/subscribe, and routing.
18+
19+
It helps decouple system components, improve scalability, and increase reliability by ensuring messages are delivered and processed independently.
20+
21+
Learn more from the [RabbitMQ official website](https://www.rabbitmq.com/) and the [official documentation](https://www.rabbitmq.com/documentation.html).
22+
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
title: RabbitMQ Baseline Testing
3+
weight: 5
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Run a Baseline test with RabbitMQ
10+
This section validates a working **RabbitMQ 4.2.0** installation with **Erlang OTP 26** on an **Azure Ubuntu Arm64 VM**.
11+
12+
All steps are **CLI-only** and suitable for baseline verification.
13+
14+
### Verify RabbitMQ service status
15+
16+
```console
17+
sudo systemctl status rabbitmq
18+
```
19+
20+
### Verify Erlang version
21+
RabbitMQ depends on Erlang. This step ensures the broker is using Erlang OTP 26.
22+
23+
```console
24+
erl -eval 'io:format("~s~n", [erlang:system_info(system_version)]), halt().' -noshell
25+
```
26+
27+
### Verify RabbitMQ version
28+
Confirm the installed RabbitMQ version.
29+
30+
```console
31+
rabbitmqctl version
32+
```
33+
34+
### Verify enabled plugins
35+
List all enabled plugins and confirm that the management plugins are active.
36+
37+
```console
38+
rabbitmq-plugins list -e
39+
```
40+
41+
```output
42+
Listing plugins with pattern ".*" ...
43+
Configured: E = explicitly enabled; e = implicitly enabled
44+
| Status: * = running on rabbit@lpprojectubuntuarm64
45+
|/
46+
[E*] rabbitmq_management 4.2.0
47+
[e*] rabbitmq_management_agent 4.2.0
48+
[e*] rabbitmq_web_dispatch 4.2.0
49+
````
50+
51+
This confirms that:
52+
53+
- The management UI is enabled
54+
- Required supporting plugins are running
55+
56+
### Check RabbitMQ node health
57+
Retrieve detailed runtime and resource information for the RabbitMQ node.
58+
59+
```console
60+
rabbitmqctl status
61+
```
62+
This confirms that:
63+
64+
- Node is running
65+
- No alarms are reported
66+
- Erlang version matches OTP 26
67+
68+
### Ensure RabbitMQ Configuration Directory Permissions
69+
RabbitMQ requires write access to its configuration directory for plugin management.
70+
71+
```console
72+
sudo mkdir -p /opt/rabbitmq/etc/rabbitmq
73+
sudo chown -R azureuser:azureuser /opt/rabbitmq/etc/rabbitmq
74+
```
75+
76+
### Create a baseline test virtual host
77+
Create an isolated virtual host for baseline testing.
78+
79+
```console
80+
rabbitmqctl add_vhost test_vhost
81+
rabbitmqctl set_permissions -p test_vhost guest ".*" ".*" ".*"
82+
```
83+
84+
This ensures:
85+
86+
- Tests do not interfere with default workloads
87+
- Full permissions are available for validation
88+
89+
### Download RabbitMQ admin CLI
90+
Download the `rabbitmqadmin` CLI tool from the management endpoint.
91+
92+
```console
93+
wget http://localhost:15672/cli/rabbitmqadmin -O ~/rabbitmqadmin
94+
chmod +x ~/rabbitmqadmin
95+
```
96+
97+
This CLI is used to perform queue and message operations.
98+
99+
### Declare a test queue
100+
Create a non-durable test queue in the test virtual host.
101+
102+
```console
103+
~/rabbitmqadmin -V test_vhost declare queue name=test durable=false
104+
```
105+
106+
### Publish a test message
107+
Publish a sample message to the test queue using the default exchange.
108+
109+
```console
110+
~/rabbitmqadmin -V test_vhost publish \
111+
exchange=amq.default \
112+
routing_key=test \
113+
payload="Hello RabbitMQ"
114+
```
115+
116+
This validates:
117+
118+
- Message routing
119+
- Exchange-to-queue binding behavior
120+
121+
### Consume the test message
122+
Retrieve and remove the message from the queue.
123+
124+
```console
125+
~/rabbitmqadmin -V test_vhost get queue=test count=1
126+
```
127+
128+
You should see an output similar to:
129+
130+
```output
131+
+-------------+----------+---------------+----------------+---------------+------------------+------------+-------------+
132+
| routing_key | exchange | message_count | payload | payload_bytes | payload_encoding | properties | redelivered |
133+
+-------------+----------+---------------+----------------+---------------+------------------+------------+-------------+
134+
| test | | 0 | Hello RabbitMQ | 14 | string | | False |
135+
+-------------+----------+---------------+----------------+---------------+------------------+------------+-------------+
136+
```
137+
138+
- Message payload: Hello RabbitMQ
139+
- Queue becomes empty after consumption
140+
141+
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.
38.8 KB
Loading
68.7 KB
Loading
84 KB
Loading
105 KB
Loading
106 KB
Loading
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
title: Install RabbitMQ
3+
weight: 4
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Install RabbitMQ on Azure Cobalt 100
10+
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.
11+
12+
### Update system and install build dependencies
13+
This step ensures the operating system is up to date and installs all required packages needed to build Erlang and run RabbitMQ reliably.
14+
15+
```console
16+
sudo apt update
17+
sudo apt install -y build-essential libssl-dev libncurses-dev libtinfo-dev \
18+
libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev \
19+
unixodbc-dev wget tar xz-utils git
20+
```
21+
22+
### Build and install Erlang OTP 26
23+
RabbitMQ 4.2.0 requires Erlang OTP 26. This section builds Erlang from source to ensure full compatibility on Arm64.
24+
25+
```console
26+
# Clone Erlang source
27+
git clone https://github.com/erlang/otp.git
28+
cd otp
29+
30+
# Checkout OTP 26 branch
31+
git checkout OTP-26
32+
33+
# Clean previous builds
34+
make clean
35+
36+
# Configure build with SSL/crypto support
37+
./configure --prefix=/usr/local/erlang-26 \
38+
--enable-smp-support \
39+
--enable-threads \
40+
--enable-kernel-poll \
41+
--with-ssl
42+
43+
# Build and install
44+
make -j$(nproc)
45+
sudo make install
46+
```
47+
### Make Erlang PATH persistent (IMPORTANT)
48+
This step ensures the Erlang binaries are permanently available in the system PATH across sessions and reboots.
49+
50+
```console
51+
echo 'export ERLANG_HOME=/usr/local/erlang-26' | sudo tee /etc/profile.d/erlang.sh
52+
echo 'export PATH=$ERLANG_HOME/bin:$PATH' | sudo tee -a /etc/profile.d/erlang.sh
53+
```
54+
55+
### Download and install RabbitMQ
56+
This section downloads the official RabbitMQ 4.2.0 generic Unix distribution and installs it under `/opt/rabbitmq`.
57+
58+
```console
59+
cd ~
60+
wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v4.2.0/rabbitmq-server-generic-unix-4.2.0.tar.xz
61+
sudo mkdir -p /opt/rabbitmq
62+
sudo tar -xvf rabbitmq-server-generic-unix-4.2.0.tar.xz -C /opt/rabbitmq --strip-components=1
63+
64+
# Create directories for logs and database
65+
sudo mkdir -p /var/lib/rabbitmq /var/log/rabbitmq
66+
sudo chown -R $USER:$USER /var/lib/rabbitmq /var/log/rabbitmq
67+
```
68+
69+
#### Update PATH environment variable
70+
This step makes RabbitMQ CLI tools available in the current shell and should be persisted for future sessions.
71+
72+
```console
73+
export PATH=/usr/local/erlang-26/bin:/opt/rabbitmq/sbin:$PATH
74+
```
75+
76+
Add this line to `~/.bashrc` or `~/.profile` for persistence.
77+
78+
### Configure RabbitMQ systemd service
79+
This section configures RabbitMQ to run as a managed systemd service, enabling automatic startup and controlled lifecycle management.
80+
81+
Create `/etc/systemd/system/rabbitmq.service`:
82+
83+
```ini
84+
[Unit]
85+
Description=RabbitMQ broker
86+
After=network.target
87+
88+
[Service]
89+
Type=simple
90+
User=azureuser
91+
Group=azureuser
92+
93+
Environment=HOME=/home/azureuser
94+
Environment=RABBITMQ_HOME=/opt/rabbitmq
95+
Environment=RABBITMQ_MNESIA_BASE=/var/lib/rabbitmq
96+
Environment=RABBITMQ_LOG_BASE=/var/log/rabbitmq
97+
Environment=PATH=/usr/local/erlang-26/bin:/opt/rabbitmq/sbin:/usr/bin
98+
99+
ExecStart=/opt/rabbitmq/sbin/rabbitmq-server
100+
ExecStop=/opt/rabbitmq/sbin/rabbitmqctl shutdown
101+
102+
Restart=on-failure
103+
RestartSec=10
104+
LimitNOFILE=65536
105+
106+
[Install]
107+
WantedBy=multi-user.target
108+
```
109+
110+
Reload systemd and start RabbitMQ:
111+
112+
```console
113+
sudo systemctl daemon-reload
114+
sudo systemctl enable rabbitmq
115+
sudo systemctl start rabbitmq
116+
sudo systemctl status rabbitmq
117+
```
118+
119+
### Enable RabbitMQ management plugin
120+
This step enables the RabbitMQ management plugin, which provides a web-based UI and HTTP API for monitoring and administration.
121+
122+
```console
123+
# Ensure config directory exists
124+
sudo mkdir -p /opt/rabbitmq/etc/rabbitmq
125+
sudo chown -R $USER:$USER /opt/rabbitmq/etc/rabbitmq
126+
127+
# Enable management plugin
128+
rabbitmq-plugins enable rabbitmq_management
129+
```
130+
131+
### Verify installation
132+
This section validates that both Erlang and RabbitMQ are installed correctly and running with the expected versions.
133+
134+
**Erlang version:**
135+
136+
```console
137+
erl -eval 'io:format("~s~n", [erlang:system_info(system_version)]), halt().' -noshell
138+
```
139+
140+
You should see an output similar to:
141+
```output
142+
Erlang/OTP 26 [erts-14.2.5.12] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit]
143+
```
144+
145+
**Verify RabbitMQ version:**
146+
147+
```console
148+
rabbitmqctl version
149+
```
150+
151+
You should see an output similar to:
152+
```output
153+
4.2.0
154+
```
155+
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.

0 commit comments

Comments
 (0)