anuvindhs / GFS-Moo

GFS-Moo GlusterFS for Moodle Redundant Storage Pool Using GlusterFS on Ubuntu Servers for moodle , One Bash Script For -Apache server -Moodle -Gluster FS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

portfolio_view GFS-Moo (LAMP+GlusterFS+Moodle on Debian)

portfolio_view

Banner

visitor badge watchers Licence bash stars

GlusterFS for Moodle

Redundant Storage Pool Using GlusterFS on Debian Servers for moodle

Architecture

Prerequisites

Launch three ubuntu based EC2/VM (EIP recommended for production) & security groups with ports open as shown below.

Security Groups

Security Group For GFS

Type Protocol Ports Source Description
SSH SSH 22 Administration Host Security Group Administration Host Security Group
Custom TCP Rule TCP 24007 Gluster Server Gluster Daemon
Custom TCP Rule TCP 111 Gluster Server Portmapper
Custom UCP Rule UDP 111 Gluster Server Portmapper
Custom TCP Rule TCP 49152-49155 Gluster Server Each brick for every volume on your host requires its own port
Custom TCP Rule TCP 2049 Gluster Server NFS

Security Group For Moodle (LAMP)

Type Protocol Ports Source Description
HTTP TCP 80 Users For HTTP traffic
HTTPS TCP 443 Users For HTTPS traffic
Custom ICMP IPv4 All All 0.0.0.0/0 For ICMP traffic

Security Group For Database

Type Protocol Ports
RDS TCP 3306

EC2

Here is AWS CLI script if you want to launch through CLI or use AWS Console

 aws ec2 run-instances \ 
   --image-id ami-xxxxxxxxxxxxxx\ 
    --count 3 \ 
    --instance-type xx.xxxx \ 
    --key-name YourKey \ 
    --security-group-ids sg-xxxxxxxxxxxx \ 
    --subnet-id subnet-xxxxxxx \ 
    --associate-public-ip-address \ 
    --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=GlusterFS -}]' 

Use Putty to SSH into all three Servers, Configure putty If you want to use muti-SSH try mRemoteNG Also Note down the Public IP for all three servers, for the easy of understanding

Let's Re-name Servers on Console

Server Rename to Public IP
Server 1 GlusterFS-01 ip1 (use your server1 public IP)
Server 2 GlusterFS-02 ip2 (use your server2 public IP)
Server 3 GlusterFS-03 ip3 (use your server3 public IP)

Git

Make sure EC2/VM have git installed
To check

git --version

To install git

sudo apt install git-all

Tutorial

Blog on installing GlusterFS + LAMP + Moodle

Read on dev.to
Read on iCTPro.co.nz

Blog on installing one click install for LAMP + Moodle

Read on dev.to
Read on iCTPro.co.nz

Basic Installation

SSH into Servers orderly and run commands

Get root privilages to run command

sudo su -
Stage On Server Command
1 GlusterFS-03 wget https://raw.githubusercontent.com/anuvindhs/GFS-Moo/main/install.sh
chmod u+x install.sh
./install.sh
2 GlusterFS-02 wget https://raw.githubusercontent.com/anuvindhs/GFS-Moo/main/install.sh
chmod u+x install.sh
./install.sh
3 GlusterFS-01 wget https://raw.githubusercontent.com/anuvindhs/GFS-Moo/main/install.sh
chmod u+x install.sh
./install.sh

Inspect install.sh Code

Mount Folder

sudo mount -t glusterfs gfs-moo-01:/gv0 /var/www/moodledata

License

Released under the MIT license.

About

GFS-Moo GlusterFS for Moodle Redundant Storage Pool Using GlusterFS on Ubuntu Servers for moodle , One Bash Script For -Apache server -Moodle -Gluster FS

License:MIT License


Languages

Language:Shell 100.0%