{"id":16941646,"url":"https://github.com/ritazh/glusterfs-azure","last_synced_at":"2025-07-01T00:03:47.325Z","repository":{"id":80723666,"uuid":"98332746","full_name":"ritazh/glusterfs-azure","owner":"ritazh","description":"Deploy GlusterFS on Azure; GlusterFS Volumes for Kubernetes ☁️  :file_cabinet:","archived":false,"fork":false,"pushed_at":"2017-08-09T02:31:25.000Z","size":27,"stargazers_count":5,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T19:53:06.353Z","etag":null,"topics":["azure","gluster-kubernetes","glusterfs","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ritazh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-07-25T17:29:50.000Z","updated_at":"2023-08-29T10:56:12.000Z","dependencies_parsed_at":"2023-05-22T03:00:21.492Z","dependency_job_id":null,"html_url":"https://github.com/ritazh/glusterfs-azure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ritazh/glusterfs-azure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ritazh%2Fglusterfs-azure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ritazh%2Fglusterfs-azure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ritazh%2Fglusterfs-azure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ritazh%2Fglusterfs-azure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ritazh","download_url":"https://codeload.github.com/ritazh/glusterfs-azure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ritazh%2Fglusterfs-azure/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262870852,"owners_count":23377309,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","gluster-kubernetes","glusterfs","kubernetes"],"created_at":"2024-10-13T21:09:56.960Z","updated_at":"2025-07-01T00:03:47.314Z","avatar_url":"https://github.com/ritazh.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## GlusterFS\n\n[GlusterFS](http://www.gluster.org) is an open source scale-out filesystem. This solution references [installation guide for Centos](https://wiki.centos.org/HowTos/GlusterFSonCentOS) and [installation guide for RHEL](https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.2/html/installation_guide/installing_red_hat_storage_server_on_red_hat_enterprise_linux_layered_install) to provision a GlusterFS server cluster on Azure. It also provides examples to how to mount GlusterFS volumes locally and how to use GlusterFS volumes from Kubernetes containers.\n\n\u003ca href=\"https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fritazh%2Fglusterfs-azure%2Fmaster%2Fazuredeploy.json\" target=\"_blank\"\u003e\n    \u003cimg src=\"http://azuredeploy.net/deploybutton.png\"/\u003e\n\u003c/a\u003e\n\n# Usage\n\nDeploy the Gluster cluster on Azure using the `Deploy button` ☝️ or using the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli).\n\nFrom Azure CLI, populate `azuredeploy.parameters.json` with the following parameters before starting the deployment.\n\n```\naz group deployment create --resource-group \u003cRESOURCEGROUP\u003e --template-file azuredeploy.json --parameters azuredeploy.parameters.json\n\n```\nBelow is the list of template parameters:\n\n| Name   | Required | Description | Default |\n|:--- |:--- |:---|:---|\n| adminUsername | :heavy_check_mark: | SSH user name | |\n| adminPassword | :heavy_check_mark: | SSH user password | |\n| hostOs | :heavy_check_mark: | OS to install on the host system. Allowed values: `Centos`, `Ubuntu`, and `RHEL` | `Centos` |\n| nodeNumber | :heavy_check_mark: | Number of nodes in the gluster file system. Allowed values: `2`, `4`, `6`, and `8` | `2` |\n| diskNumber | :heavy_check_mark: | Number of disks per node. Allowed values: `2`, `3` and `4` | `2` |\n| rhsmUsername | | [RHEL only] Name of the virtual network to be used | |\n| rhsmPassword | | [RHEL only] Name of the virtual network to be used | |\n| rhsmPoolId | | [RHEL only] Name of the virtual network to be used | |\n| virtualNetworkName | :heavy_check_mark: | Name of the virtual network to be used | |\n| virtualNetworkNewOrExisting | :heavy_check_mark: | Create a new or use existing Virtual Network. Allowed values: `new` and `existing` | `new` |\n| vmNamePrefix | :heavy_check_mark: | VM name prefix, a number will be appended for each node | |\n| volumeName | :heavy_check_mark: | Gluster file system volume name | `gfsvol` |\n\n\n# How it works\n\n## Verify Gluster Volumes\nTo verify the new gluster volume is created and running, run the following on one of the gluster nodes:\n\n```\n# gluster volume info\n \nVolume Name: gfsvol\nType: Replicate\nVolume ID: 2bff68ee-xxxx-xxxx-xxxx-bbd6b3fcfa51\nStatus: Started\nSnapshot Count: 0\nNumber of Bricks: 1 x 2 = 2\nTransport-type: tcp\nBricks:\nBrick1: \u003cNODE1\u003e:/datadrive/brick\nBrick2: \u003cNODE2\u003e:/datadrive/brick\nOptions Reconfigured:\ntransport.address-family: inet\nnfs.disable: on\n```\n\n## Mount Gluster Volumes\n\nTo mount the new gluster volume to a new host, install the GlusterFS native client from [here](http://gluster.readthedocs.io/en/latest/Administrator%20Guide/Setting%20Up%20Clients/). \n\nUse the private ip or node name of one of the gluster hosts to mount to a local mount directory\n```\n# mount -t glusterfs HOSTNAME-OR-IPADDRESS:/VOLNAME MOUNTDIR\n\n# mount -t glusterfs 10.0.0.10:/gfsvol /mnttest/\n\n```\n## Verify Mounted Volume\n\nTo verify the size of the new gluster volume, run `df -h` you should see the local mount directory with the same size as the total size of all the managed disks you have created. \n\n```\n# df -h\n...\n10.0.0.10:/gfsvol  2.0T   81M  1.9T   1% /mnttest\n..\n```\n\n# Mount Gluster Volumes from Kubernetes Pod\n\nIf you want access gluster volumes from Kubernetes pods, one way is to provision the gluster cluster in the same vnet as your Kubernetes cluster.\n\n## Create Gluster Cluster using existing vnet\n\nAssuming you already have a K8s cluster running, update the `azuredeploy.parameters.json` file to provision a gluster cluster in the same vnet and same resource group as your k8s cluster.\n\n```json\n\n\t\"virtualNetworkName\": {\n\t  \"value\": \"k8s-vnet-xxxxxxxx\"\n\t},\n\t\"virtualNetworkNewOrExisting\": {\n\t  \"value\": \"existing\"\n\t},\n\n```\nFrom Azure CLI,\n\n```\naz group deployment create --resource-group \u003cKUBERNETES-CLUSTER-RESOURCEGROUP\u003e --template-file azuredeploy.json --parameters azuredeploy.parameters.json\n\n```\n\nNow that you have a gluster cluster and a kubernetes cluster running in the same vnet, use this [documentation](https://github.com/kubernetes/examples/blob/master/staging/volumes/glusterfs/README.md) to allow containers to use GlusterFS volumes.\n\n ```\n$ kubectl create -f _output/glusterfs-endpoints.json \nendpoints \"glusterfs-cluster\" created\n$ kubectl create -f _output/glusterfs-service.json \nservice \"glusterfs-cluster\" created\n$ kubectl create -f _output/glusterfs-pod.json\n```\n\nOnce the pod is running, let's verify the gluster volume has been mounted:\n\n```\n$ kubectl exec -it glusterfs -- /bin/bash\nroot@glusterfs:/# df -h         \n...\n10.0.0.10:gfsvol  2.0T   81M  1.9T   1% /mnt/gluster\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fritazh%2Fglusterfs-azure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fritazh%2Fglusterfs-azure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fritazh%2Fglusterfs-azure/lists"}