text gluster RHEL7

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text gluster RHEL7相关的知识,希望对你有一定的参考价值。

    Executar todos os passos no nó gluster-0.example.com
    
    subscription-manager register --username user-mmagnani --password senha    
    subscription-manager attach --pool=ssssssssssssssssssssss
    subscription-manager repos --enable=rhel-7-server-rh-common-rpms
    subscription-manager repos --disable=* --enable=rhel-7-server-rpms --enable=rh-gluster-3-for-rhel-7-server-rpms
    yum install ntp -y
    systemctl enable ntpd
    systemctl start ntpd
    yum install redhat-storage-server
    firewall-cmd --zone=public --add-port=24007-24008/tcp --permanent
    firewall-cmd --zone=public --add-port=24009-24010/tcp --permanent
    firewall-cmd --zone=public --add-service=nfs --add-service=samba --add-service=samba-client --permanent
    firewall-cmd --zone=public --add-port=111/tcp --add-port=139/tcp --add-port=445/tcp --add-port=965/tcp --add-port=2049/tcp --add-port=38465-38469/tcp --add-port=631/tcp --add-port=111/udp --add-port=963/udp --add-port=49152-49251/tcp  --permanent
    firewall-cmd --reload
    systemctl enable glusterd
    yum update -y
    firewall-cmd --zone=public --add-port=8080/tcp --permanent
    firewall-cmd --reload
    yum install heketi heketi-client -y
    ssh-keygen -f /etc/heketi/heketi_key -t rsa -N ''
    chown heketi:heketi /etc/heketi/heketi_key*
    ssh-copy-id -i /etc/heketi/heketi_key.pub root@gluster-0.example.com

    Editar o  vi /etc/heketi/heketi.json e deixar o bloco sshexec como abaixo:
    
    "sshexec": {
    "keyfile": "/etc/heketi/heketi_key",
    "user": "root",
    "port": "22",
    "fstab": "/etc/fstab",
    "gluster_cli_timeout": 600

    systemctl restart heketi
    systemctl enable heketi
    curl http://$(hostname):8080/hello
    
    export HEKETI_CLI_SERVER=http://gluster-0.example.com:8080
    
    Criar a topologia: topology.json
     
{
    "clusters": [{
        "nodes": [{
                "node": {
                    "hostnames": {
                        "manage": [
                            "gluster-0.example.com"
                        ],
                        "storage": [
                            "10.0.0.123"
                        ]
                    },
                    "zone": 1
                },
                "devices": [
                    "/dev/sdb",
                    "/dev/sdc"
                ]
            }
        ]
    }]
}

 heketi-cli topology load --json=topology.json
 heketi-cli cluster list

Gluster finalizado!

No openshift com um usuario cluster-admin basta criar o storageClass

oc create -f  glusterfs-storage-class.yaml 

#######
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: gluster-fs
provisioner: kubernetes.io/glusterfs
parameters:
  resturl: "http://gluster-0.example.com:8080"
  restauthenabled: "false"
  volumetype: none
#######

Torne o storeClass default: 

oc patch storageclass gluster-fs -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

Voce pode testar criando um projeto e na opção storage criar um novo volume utilizando o storageClass gluster-fs






    
    
    

以上是关于text gluster RHEL7的主要内容,如果未能解决你的问题,请参考以下文章

Gluster vs Ceph:开源存储领域的正面较量

gluster分布式文件系统

CentOS7配置本地镜像及安装gluster服务

分布式储存_gluster

Windows挂载Gluster复制卷

Gluster分布式存储--使用