{"id":20334560,"url":"https://github.com/cholcombe973/gluster-charm","last_synced_at":"2025-04-11T21:51:18.385Z","repository":{"id":34671554,"uuid":"38644285","full_name":"cholcombe973/gluster-charm","owner":"cholcombe973","description":"Juju Gluster Charm","archived":false,"fork":false,"pushed_at":"2019-04-21T16:17:44.000Z","size":36788,"stargazers_count":8,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-25T17:49:29.970Z","etag":null,"topics":["gluster","juju-charm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cholcombe973.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}},"created_at":"2015-07-06T20:31:10.000Z","updated_at":"2019-04-21T16:17:46.000Z","dependencies_parsed_at":"2022-09-15T05:41:07.774Z","dependency_job_id":null,"html_url":"https://github.com/cholcombe973/gluster-charm","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cholcombe973%2Fgluster-charm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cholcombe973%2Fgluster-charm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cholcombe973%2Fgluster-charm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cholcombe973%2Fgluster-charm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cholcombe973","download_url":"https://codeload.github.com/cholcombe973/gluster-charm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248487733,"owners_count":21112188,"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":["gluster","juju-charm"],"created_at":"2024-11-14T20:37:27.367Z","updated_at":"2025-04-11T21:51:18.351Z","avatar_url":"https://github.com/cholcombe973.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gluster charm[![Build Status](https://travis-ci.org/cholcombe973/gluster-charm.svg?branch=master)](https://travis-ci.org/cholcombe973/gluster-charm)\n\nGlusterFS is an open source, distributed file system capable of scaling\nto several petabytes (actually, 72 brontobytes!) and handling thousands\nof clients. GlusterFS clusters together storage building blocks over\nInfiniband RDMA or TCP/IP interconnect, aggregating disk and memory\nresources and managing data in a single global namespace. GlusterFS\nis based on a stackable user space design and can deliver exceptional\nperformance for diverse workloads.\n\n# Usage\n\nThe gluster charm has defaults in the config.yaml that you will want to change for production.\nPlease note that volume_name, cluster_type, and replication_level are immutable options.  Changing them post\ndeployment will have no effect.  \nThis charm makes use of [juju storage](https://jujucharms.com/docs/1.25/storage).  Please read the docs to learn about adding block storage to your units.\n\n    volume_name:\n        Whatever name you would like to call your gluster volume.\n    cluster_type:\n        The default here is Replicate but you can also set it to\n         * Distribute\n         * Stripe\n         * Replicate\n         * StripedAndReplicate\n         * Disperse\n         * DistributedAndStripe\n         * DistributedAndReplicate\n         * DistributedAndStripedAndReplicate\n         * DistributedAndDisperse\n    replication_level:\n        The default here is 2\n        If you don't know what any of these mean don't worry about it. The defaults are sane.\n\n# Actions\nThis charm several actions to help manage your Gluster cluster.\n\n1. Creating volume quotes. Example:\n`juju action do --unit gluster/0 create-volume-quota volume=test usage-limit=1000MB`\n2. Deleting volume quotas. Example:\n`juju action do --unit gluster/0 delete-volume-quota volume=test`\n3. Listing the current volume quotas.  Example:\n`juju action do --unit gluster/0 list-volume-quotas volume=test`\n4. Setting volume options.  This can be used to set several volume options at\nonce.  Example:\n`juju action do --unit gluster/0 set-volume-options volume=test performance-cache-size=1GB performance-write-behind-window-size=1MB`\n\n# Building from Source\nThe charm comes packaged with an already built binary in ./hooks/main which is built for x86-64.\nA rebuild would be required for other architectures.\n\n1. Install [rust](http://www.rust-lang.org/install.html) stable for your platform\n2. Install [cargo](https://crates.io/install)\n3. Install libudev-dev as a dependency.\n4. cd into the charm directory and run:\n\n        cargo build --release\n\n5. Copy the built target:\n\n        cp target/release/main hooks/main\n\nIf you would like debug flags enabled rebuild with: cargo build and cp target/debug/main hooks/main\n\nThat should provide you with a binary.  \n\n# Configure\nCreate a config.yaml file to set any options you would like to change from the defaults.\n\n# Deploy\nThis charm requires juju storage. It requires at least 1 block device.\nFor more information please check out the [docs](https://jujucharms.com/docs/1.25/storage)\n\n    Example EC2 deployment on Juju 1.25:\n    juju deploy cs:~xfactor973/xenial/gluster-3 -n 3 --config=~/gluster.yaml --storage brick=ebs,10G,2\n\n    To scale out the service use this command:\n    juju add-unit gluster\n\n(keep adding units to keep adding more bricks and storage)\n\n# Scale Out\nNote that during scale out operation if your cluster has existing files on there they will not\nbe migrated to the new bricks until a gluster volume rebalance start operation is performed.\nThis operation can slow client traffic so it is left up to the administrator to perform\nat the appropriate time.\n\n# Rolling Upgrades\nThe config.yaml source option is used to kick off a rolling upgrade of your cluster.\nThe current behavior is to install the new packages on the server and upgrade it one by\none.  A UUID sorted order is used to define the upgrade order.  Please note that replica 3\nis required to use rolling upgrades.  With replica 2 it's possible to have split brain issues.\n\n# Testing\nFor a simple test deploy 4 gluster units like so\n\n    juju deploy gluster -n 4 --config=~/gluster.yaml --storage brick=local,10G\n\nOnce the status is started the charm will bring both units together into a cluster and create a volume.  \nYou will know the cluster is ready when you see a status of active.\n\nNow you can mount the exported GlusterFS filesystem with either fuse or NFS.  Fuse has the advantage of\nknowing how to talk to all replicas in your Gluster cluster so it will not need other high availablity\nsoftware.  NFSv3 is point to point so it will need something like virtual IP's, DNS round robin or\nsomething else to ensure availability if a unit should die or go away suddenly.\nInstall the glusterfs-client package on your host.  You can reference the ./hooks/install file to\nshow you how to install the glusterfs packages.\n\nOn your juju host you can mount Gluster with fuse like so:\n\n    mount -t glusterfs \u003cip or hostname of unit\u003e:/\u003cvolume_name\u003e mount_point/\n\n## High Availability\nThere's 3 ways you can achieve high availability with Gluster.  \n\n1. The first an easiest method is to simply use the glusterfs fuse mount on all\nclients.  This has the advantage of knowing where all servers in the cluster\nare at and will reconnect as needed and failover gracefully.\n2. Using virtual ip addresses with a DNS round robin A record.  This solution\napplies to NFSv3.  This method is more complicated but has the advantage of\nbeing usable on clients that only support NFSv3.  NFSv3 is stateless and\nthis can be used to your advantage by floating virtual ip addresses that\nfailover quickly.  To use this setting please set the virtual_ip_addresses\nconfig.yaml setting after reading the usage.\n3. Using the [Gluster coreutils](https://github.com/gluster/glusterfs-coreutils).  \nIf you do not need a mount point then this is a viable option.  \nglusterfs-coreutils provides a set of basic utilities such as cat, cp, flock,\nls, mkdir, rm, stat and tail that are implemented specifically using the\nGlusterFS API commonly known as libgfapi. These utilities can be used either\ninside a gluster remote shell or as standalone commands with 'gf' prepended to\ntheir respective base names. Example usage is shown here:\n[Docs](https://gluster.readthedocs.io/en/latest/Administrator%20Guide/GlusterFS%20Coreutils/)\n\n## MultiTenancy\n\nGluster provides a few easy ways to have multiple clients in the same volume\nwithout them knowing about one another.  \n1. Deep Mounting.  Gluster NFS supports deep mounting which allows the sysadmin\nto create a top level directory for each client.  Then instead of mounting the\nvolume you mount the volume + the directory name.  Now the client only sees\ntheir files.  This doesn't stop a malacious client from remounting the top\nlevel directory.  \n  * This can be combined with [posix acl's](https://gluster.readthedocs.io/en/latest/Administrator%20Guide/Access%20Control%20Lists/) if your tenants are not trustworthy.\n  * Another option is combining with [Netgroups](https://gluster.readthedocs.io/en/latest/Administrator%20Guide/Export%20And%20Netgroup%20Authentication/).\n  This feature allows users to restrict access specific IPs\n  (exports authentication) or a netgroup (netgroups authentication),\n  or a combination of both for both Gluster volumes and subdirectories within\n  Gluster volumes.\n\n## Filesystem Support:\nThe charm supports several filesystems currently.  Btrfs, Ext4, Xfs and ZFS. The\ndefault filesystem can be set in the config.yaml.  The charm currently defaults\nto XFS but ZFS would likely be a safe choice and enable advanced functionality\nsuch as bcache backed gluster bricks. \n**Note: The ZFS filesystem requires Ubuntu 16.04 or greater**\n\n## Notes:\nIf you're using containers to test Gluster you might need to edit /etc/default/lxc-net\nand read the last section about if you want lxcbr0's dnsmasq to resolve the .lxc domain\n\nNow to show that your cluster can handle failure you can:\n\n    juju destroy-machine n;\n\nThis will remove one of the units from your cluster and simulate a hard failure.  List your files\non the mount point to show that they are still available.  \n\n# Reference\nFor more information about Gluster and operation of a cluster please see: https://gluster.readthedocs.org/en/latest/\nFor more immediate and interactive help please join IRC channel #gluster on Freenode.\nGluster also has a users mailing list: https://www.gluster.org/mailman/listinfo/gluster-users\nFor bugs concerning the Juju charm please file them on [Github](https://github.com/cholcombe973/gluster-charm/tree/master)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcholcombe973%2Fgluster-charm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcholcombe973%2Fgluster-charm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcholcombe973%2Fgluster-charm/lists"}