Skip to content

Commit 33ad1a3

Browse files
Merge pull request #2676 from odidev/rabbit_LP
Deploy RabbitMQ on Arm64 Cloud Platforms (Azure & GCP)
2 parents ddfabe1 + 88041e7 commit 33ad1a3

19 files changed

Lines changed: 960 additions & 665 deletions

content/learning-paths/servers-and-cloud-computing/rabbitmq-gcp/_index.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
---
2-
title: Deploy RabbitMQ on Google Cloud C4A (Arm-based Axion VMs)
2+
title: Deploy RabbitMQ on Arm64 Cloud Platforms (Azure & GCP)
33

44
minutes_to_complete: 30
55

6-
who_is_this_for: This is an introductory topic for software engineers and platform engineers migrating messaging and event-driven workloads from x86_64 to Arm-based servers, specifically on Google Cloud C4A virtual machines powered by Axion processors.
6+
who_is_this_for: This is an introductory topic for software engineers and platform engineers migrating messaging and event-driven workloads from x86_64 to Arm-based servers, specifically on Microsoft Azure Cobalt 100 Arm processors and Google Cloud C4A virtual machines powered by Axion processors.
77

88
learning_objectives:
9+
- Provision Arm-based Linux virtual machines on Google Cloud (C4A with Axion processors) and Microsoft Azure (Cobalt 100)
910
- Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors)
10-
- Install and configure RabbitMQ on a SUSE Arm64 (C4A) instance
11-
- Validate RabbitMQ deployment using baseline messaging tests
12-
- Implement real-world RabbitMQ use cases such as event-driven processing and notification pipelines
11+
- Install and configure RabbitMQ on Arm64 Linux (SUSE SLES on GCP and Ubuntu Pro 24.04 on Azure)
12+
- Build and configure required Erlang versions for RabbitMQ on Arm64
13+
- Validate RabbitMQ deployments using baseline messaging and connectivity tests
14+
- Implement practical RabbitMQ use cases such as event-driven processing and notification pipelines on Arm-based infrastructure
1315

1416
prerequisites:
17+
- A [Microsoft Azure](https://azure.microsoft.com/) account with access to Cobalt 100-based instances (Dpsv6).
1518
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
1619
- Basic understanding of message queues and messaging concepts (publishers, consumers)
1720
- Familiarity with Linux command-line operations
18-
- Basic knowledge of Python for the use case examples
1921

2022
author: Pareena Verma
2123

2224
##### Tags
2325
skilllevels: Introductory
24-
subjects: Containers and Virtualization
25-
cloud_service_providers: Google Cloud
26+
subjects: Databases
2627

2728
armips:
2829
- Neoverse
@@ -45,6 +46,11 @@ further_reading:
4546
link: https://cloud.google.com/docs
4647
type: documentation
4748

49+
- resource:
50+
title: Azure Virtual Machines documentation
51+
link: https://learn.microsoft.com/azure/virtual-machines/
52+
type: documentation
53+
4854
- resource:
4955
title: RabbitMQ documentation
5056
link: https://www.rabbitmq.com/documentation.html
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.
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
title: Install RabbitMQ on Microsoft Azure Cobalt 100
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.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Create an Arm based cloud virtual machine using Microsoft Cobalt 100 CPU
3+
weight: 3
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Introduction
10+
11+
There are several ways to create an Arm-based Cobalt 100 virtual machine: the Microsoft Azure console, the Azure CLI tool, or using your choice of IaC (Infrastructure as Code). This guide will use the Azure console to create a virtual machine with Arm-based Cobalt 100 Processor.
12+
13+
This learning path focuses on the general-purpose virtual machine of the D series. Please read the guide on [Dpsv6 size series](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/dpsv6-series) offered by Microsoft Azure.
14+
15+
If you have never used the Microsoft Cloud Platform before, please review the microsoft [guide to Create a Linux virtual machine in the Azure portal](https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu).
16+
17+
#### Create an Arm-based Azure Virtual Machine
18+
19+
Creating a virtual machine based on Azure Cobalt 100 is no different from creating any other virtual machine in Azure. To create an Azure virtual machine, launch the Azure portal and navigate to "Virtual Machines".
20+
1. Select "Create", and click on "Virtual Machine" from the drop-down list.
21+
2. Inside the "Basic" tab, fill in the Instance details such as "Virtual machine name" and "Region".
22+
3. Choose the image for your virtual machine (for example, Ubuntu Pro 24.04 LTS) and select “Arm64” as the VM architecture.
23+
4. In the “Size” field, click on “See all sizes” and select the D-Series v6 family of virtual machines. Select “D4ps_v6” from the list.
24+
25+
![Azure portal VM creation — Azure Cobalt 100 Arm64 virtual machine (D4ps_v6) alt-text#center](images/instance.png "Figure 1: Select the D-Series v6 family of virtual machines")
26+
27+
5. Select "SSH public key" as an Authentication type. Azure will automatically generate an SSH key pair for you and allow you to store it for future use. It is a fast, simple, and secure way to connect to your virtual machine.
28+
6. Fill in the Administrator username for your VM.
29+
7. Select "Generate new key pair", and select "RSA SSH Format" as the SSH Key Type. RSA could offer better security with keys longer than 3072 bits. Give a Key pair name to your SSH key.
30+
8. In the "Inbound port rules", select HTTP (80) and SSH (22) as the inbound ports.
31+
32+
![Azure portal VM creation — Azure Cobalt 100 Arm64 virtual machine (D4ps_v6) alt-text#center](images/instance1.png "Figure 2: Allow inbound port rules")
33+
34+
9. Click on the "Review + Create" tab and review the configuration for your virtual machine. It should look like the following:
35+
36+
![Azure portal VM creation — Azure Cobalt 100 Arm64 virtual machine (D4ps_v6) alt-text#center](images/ubuntu-pro.png "Figure 3: Review and Create an Azure Cobalt 100 Arm64 VM")
37+
38+
10. Finally, when you are confident about your selection, click on the "Create" button, and click on the "Download Private Key and Create Resources" button.
39+
40+
![Azure portal VM creation — Azure Cobalt 100 Arm64 virtual machine (D4ps_v6) alt-text#center](images/instance4.png "Figure 4: Download Private key and Create Resources")
41+
42+
11. Your virtual machine should be ready and running within no time. You can SSH into the virtual machine using the private key, along with the Public IP details.
43+
44+
![Azure portal VM creation — Azure Cobalt 100 Arm64 virtual machine (D4ps_v6) alt-text#center](images/final-vm.png "Figure 5: VM deployment confirmation in Azure portal")
45+
46+
{{% notice Note %}}
47+
48+
To learn more about Arm-based virtual machines in Azure, refer to “Getting Started with Microsoft Azure” in [Get started with Arm-based cloud instances](/learning-paths/servers-and-cloud-computing/csp/azure).
49+
50+
{{% /notice %}}

0 commit comments

Comments
 (0)