Overview
The databases cluster consists of two nodes:cluster-n03(node03.cluster.devops.arabiaweather.com)cluster-n04(node04.cluster.devops.arabiaweather.com)
- HAProxy load balancers (details)
- MySQL 5.7 (details)
- Redis 6.2 (details)
- MongoDB 3.x (details)
- Consul agents used by Traefik and others (details)
cluster-n03, even though a replica exists on cluster-n04. Application clients connect directly to cluster-n03, and HAProxy/Sentinel are not providing automated failover.
Access & SSH
Access to the nodes is via SSH using pre-configured hosts in~/.ssh/config:
cluster-n03→node03.cluster.devops.arabiaweather.comcluster-n04→node04.cluster.devops.arabiaweather.com
~/.ssh/ydabain.pem key. Make sure you are on the VPN / allowed networks before connecting.
Network & firewall
At the infrastructure level, server-groups / security groups define:- Which internal subnets and services can reach:
- MySQL (
3306) - Redis (
6379) - MongoDB (
27017) - HAProxy frontends (TCP/HTTP ports)
- Consul (
8300+range)
- MySQL (
- Which management networks can SSH into
cluster-n03/cluster-n04.
Allowing a new IP in server-groups (SSH access)
Server access is managed oncluster-n03 using server-groups files under the root home:
-
Base path on
cluster-n03: -
Example files:
cluster.serversoffice.serverspinpoint.servers- etc.
*.servers file is a simple list of IP addresses, one per line. For example, cluster.servers:
Add a new IP using the scripts
There is a helper script/root/iptables.sh that:
- Enables and configures UFW.
- Opens base ports for:
- SSH
- HTTP / HTTPS
- MySQL (
3306)
- Iterates over all
server-groups/*.serversfiles and:- Adds
ufw allow from <IP>rules for each IP, tagged with a RUN_ID.
- Adds
- Removes any old UFW rules that do not match the current RUN_ID.
- Appends the new IP to the
cluster.serverslist. - Re-applies firewall rules for all server-groups via the script.
Add a new IP manually (without running the full script)
If you do not want to run the full.sh script (e.g. you only want to affect one group):
-
Edit the group file:
- Add the new IP on its own line.
- Save and exit.
-
Apply firewall changes only for that IP/group:
- Follow the logic from
/root/iptables.shand run the specificufw allow from <IP>commands manually for that IP/group. - This avoids re-running the entire script over all groups and rewriting all rules.
- Follow the logic from
When in doubt, prefer using the existing script and review it first, so manual changes stay consistent with the established firewall model.

