Back to articles
AI & Cloud

Running Docker Swarm Cluster with GlusterFS on 3 Free Oracle ARM VPS: 0-Dong HA Solution

A detailed guide to deploy a Docker Swarm cluster with GlusterFS on 3 free Oracle ARM VPS instances, creating a cost-free High Availability solution. Configuration, testing, and...

DPTCloud Engineering4 min read
Running Docker Swarm Cluster with GlusterFS on 3 Free Oracle ARM VPS: 0-Dong HA Solution

Image credit: xiSerge · Pixabay Content License

Introduction

In an era where demand for distributed storage and high availability (HA) solutions grows rapidly, deploying a Docker Swarm cluster integrated with GlusterFS on Oracle Cloud's free ARM VPS instances offers a cost-effective approach. Oracle Cloud Infrastructure (OCI) provides three free ARM VPS instances under the Free Tier, enabling users to build a zero-cost HA system ideal for testing, development, or small-scale production workloads.

Prerequisites

To complete this guide, you will need:

  • Three Oracle Cloud Infrastructure (OCI) accounts or a single free-tier account.
  • Each account should create an ARM-based VPS (Ampere A1) running Ubuntu 22.04 LTS.
  • Ensure all VPS instances can communicate over private IP addresses and have internet access.
  • Access to Oracle Cloud CLI or SSH to connect to the VPS instances.

Installation Steps

1. Install Docker on All VPS Instances

On each VPS, run the following commands to install Docker:

sudo apt update
sudo apt install -y docker.io
sudo systemctl enable docker
sudo systemctl start docker

2. Initialize Docker Swarm

Select one VPS as the manager node and initialize the swarm:

docker swarm init --advertise-addr <PRIVATE_IP_MANAGER>

Replace <PRIVATE_IP_MANAGER> with the private IP of the manager node. The command will output a join token for worker nodes.

3. Join Worker Nodes

On the remaining two VPS instances (workers), run the join command provided by the manager:

docker swarm join --token <JOIN_TOKEN> <MANAGER_IP>:2377

Replace <JOIN_TOKEN> and <MANAGER_IP> with the actual values.

4. Install and Configure GlusterFS

On each VPS, install GlusterFS:

sudo apt update
sudo apt install -y glusterfs-server
sudo systemctl enable glusterd
sudo systemctl start glusterd

Set up a distributed volume:

# On manager
sudo gluster peer probe <PRIVATE_IP_WORKER1>
sudo gluster peer probe <PRIVATE_IP_WORKER2>

# Create volume
sudo gluster volume create gluster-vol replica 3 <PRIVATE_IP_MANAGER>:/gluster/data <PRIVATE_IP_WORKER1>:/gluster/data <PRIVATE_IP_WORKER2>:/gluster/data force
sudo gluster volume start gluster-vol

Verification and Validation

Run the following commands to check the system status:

# Check swarm nodes
docker node ls

# Check GlusterFS volume
gluster volume info gluster-vol

Troubleshooting

  • Cannot join swarm: Verify network connectivity, firewall rules, and the join token.
  • Gluster volume fails to start: Ensure glusterd is running and all peers are connected.
  • Volume inaccessible: Confirm the /gluster/data directory exists and has proper permissions.

References

Related infrastructure & engineering guides: High-RAM Cloud VPS for Self-Hosted LLMs & API Gateways

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478