Last active
September 4, 2023 11:34
-
-
Save spectrapulse/8439d0f6ceb4fc9990088e3bc539d0a2 to your computer and use it in GitHub Desktop.
augh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -s | |
umount /data/glusterfs/volume/brick | |
rm -rf /data | |
rm -rf /fs.img | |
cat /etc/fstab | head -n -2 > /etc/fstab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dnf remove -y oracle-gluster-release-el8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum upgrade --refresh -y | |
# Ensure docker or dependencies are not present | |
sudo yum -y remove \ | |
docker \ | |
docker-client \ | |
docker-client-latest \ | |
docker-common \ | |
docker-latest \ | |
docker-latest-logrotate \ | |
docker-logrotate \ | |
docker-engine | |
# Add docker ce repo | |
sudo yum install -y yum-utils | |
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo | |
sudo yum -y install \ | |
docker-ce \ | |
docker-ce-cli \ | |
containerd.io \ | |
docker-buildx-plugin \ | |
docker-compose-plugin | |
# Add current user to docker group | |
sudo usermod -aG docker $USER | |
# Make session aware of new group | |
newgrp docker | |
# Start and test Docker | |
sudo systemctl start docker.service | |
docker run hello-world | |
# Start Docker and containerd on boot | |
sudo systemctl enable docker.service | |
sudo systemctl enable containerd.service | |
# Disable running iptables at all | |
sudo systemctl stop iptables | |
sudo systemctl disable iptables | |
sudo systemctl mask iptables | |
# Remove flush iptables rules | |
iptables -L # Show Current | |
sudo iptables -t nat -F | |
sudo iptables -t mangle -F | |
sudo iptables -F | |
sudo iptables -X | |
iptables -L # Show Post | |
# Start firewalld | |
sudo systemctl start firewalld | |
sudo systemctl enable firewalld | |
# Allow ping in fwd | |
sudo firewall-cmd --zone=public \ | |
--add-protocol=icmp | |
# Allow GlusterFS Networking in fwd | |
sudo firewall-cmd --zone=public \ | |
--add-port=24007-24008/tcp \ | |
--add-port=24007-24008/udp \ | |
--add-port=49152-49156/tcp \ | |
--add-port=49152-49156/udp | |
# Allow Docker Networking in fwd | |
sudo firewall-cmd --zone=public \ | |
--add-port=2377/tcp \ | |
--add-port=7946/tcp \ | |
--add-port=7946/udp \ | |
--add-port=4789/udp \ | |
--add-port=2376/tcp | |
sudo firewall-cmd --runtime-to-permanent | |
sudo firewall-cmd --reload | |
sudo reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -s | |
# dnf install oracle-gluster-release-el8 -y | |
# dnf config-manager --enable ol8_gluster_appstream ol8_baseos_latest ol8_appstream | |
dnf module enable glusterfs -y | |
dnf install -y @glusterfs/server | |
dnf install -y @glusterfs/client | |
dd if=/dev/zero of=/fs.img count=0 bs=1 seek=8G | |
mkfs.xfs -f -i size=512 -L glusterfs /fs.img | |
mkdir -p /data/glusterfs/volume/brick | |
echo '/fs.img /data/glusterfs/volume/brick xfs defaults 0 0' >> /etc/fstab | |
mount -a && df |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p /gfs | |
echo "localhost:/volume /gfs glusterfs defaults,_netdev 0 0" >> /etc/fstab | |
mount /gfs && df -h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment