{"id":13464894,"url":"https://github.com/gluster/gluster-containers","last_synced_at":"2025-03-25T11:32:20.266Z","repository":{"id":31381860,"uuid":"34944926","full_name":"gluster/gluster-containers","owner":"gluster","description":"Dockerfiles  (CentOS, Fedora, Red Hat) for GlusterFS ","archived":false,"fork":true,"pushed_at":"2022-10-18T04:11:30.000Z","size":234,"stargazers_count":222,"open_issues_count":56,"forks_count":135,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-10-29T17:56:21.002Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/gluster/gluster-containers/pkgs/container/gluster-containers","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"humblec/gluster-containers","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gluster.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-05-02T11:15:03.000Z","updated_at":"2024-10-29T09:54:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gluster/gluster-containers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgluster-containers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgluster-containers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgluster-containers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluster%2Fgluster-containers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gluster","download_url":"https://codeload.github.com/gluster/gluster-containers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245454319,"owners_count":20618011,"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":[],"created_at":"2024-07-31T14:00:52.367Z","updated_at":"2025-03-25T11:32:17.845Z","avatar_url":"https://github.com/gluster.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# GlusterFS Containers\n\nThis repo contains dockerfiles (CentOS and Fedora) for GlusterFS containers namely server, client and S3.\n\nThe support matrix of GlusterFS and container versions:\n\n|                                              | GlusterFS Version           | Container Tag      | Container name       |\n| -------------------------------------------- | --------------------------- | ------------------ | -------------------- |\n| GlusterFS Server Container (CentOS Stream 9) | `v10.2`                     | `centos`, `latest` | `gluster-containers` |\n| GlusterFS Server Container (Fedora 36)       | `v10.2`                     | `fedora`           | `gluster-containers` |\n| GlusterFS Client Container                   | `v3.13`                     | `latest`           | `glusterfs-client`   |\n| Gluster S3 Server Container                  | `v4.0, v3.13, v3.12, v3.10` | `latest`           | `gluster-s3`         |\n\n## Gluster Server Docker container:\n\nAlthough Setting up a glusterfs environment is a pretty simple and straight forward procedure, Gluster community do maintain docker images of gluster both Fedora and CentOS as base image in the docker hub for the ease of users. The community maintains docker images of GlusterFS release in both Fedora and CentOS distributions.\n\nThe following are the steps to run the GlusterFS docker images that we maintain:\n\nTo pull the docker image from the docker hub run the following command:\n\n\u003e Note: Using the `latest` tag will default to CentOS based image.\n\n### Fedora:\n\n```\n$ docker pull ghcr.io/gluster/gluster-containers:fedora\n```\n\n### CentOS:\n\n```\n$ docker pull ghcr.io/gluster/gluster-containers:centos\n```\n\nThis will pull the glusterfs docker image from the docker hub.\nAlternatively, one could build the image from the Dockerfile directly. For this, clone the gluster-containers source repository and build the image using Dockerfiles in the repository. For getting the source, One can make use of git:\n\n```\n$ git clone git@github.com:gluster/gluster-containers.git\n```\n\nThis repository consists of Dockerfiles for GlusterFS to build on both CentOS and Fedora distributions. Once you clone the repository, to build the image, run the following commands:\n\nFor Fedora,\n\n```\n$ docker build -t gluster-fedora Fedora\n```\n\nFor CentOS,\n\n```\n$ docker build -t gluster-centos CentOS\n```\n\nThis command will build the docker image from the Dockerfile and will be assigned the name gluster-fedora or gluster-centos respectively. ‘-t’ option is used to give a name to the image we built.\n\nOnce the image is built in either of the above two steps, now we can run the container with gluster daemon running.\n\nBefore this, ensure the following directories are created on the host where docker is running:\n\n- /etc/glusterfs\n- /var/lib/glusterd\n- /var/log/glusterfs\n\nEnsure all the above directories are empty to avoid any conflicts.\n\nAlso, ntp service like chronyd / ntpd service needs to be started in the host.\nThis way all the gluster containers started will be time synchronized.\n\nNow run the following command:\n\n```\n$ docker run -v /etc/glusterfs:/etc/glusterfs:z -v /var/lib/glusterd:/var/lib/glusterd:z -v /var/log/glusterfs:/var/log/glusterfs:z -v /sys/fs/cgroup:/sys/fs/cgroup:rw -d --privileged=true --net=host -v /dev/:/dev --cgroupns=host gluster-centos\n```\n\n( is either gluster-fedora or gluster-centos as per the configurations so far)\n\nWhere:\n\n```\n        --net=host        ( Optional: This option brings maximum network throughput for your storage container)\n\n        --privileged=true ( If you are exposing the `/dev/` tree of host to the container to create bricks from the container)\n```\n\nBind mounting of following directories enables:\n\n```\n        `/var/lib/glusterd`     : To make gluster metadata persistent in the host.\n        `/var/log/glusterfs`    : To make gluster logs persistent in the host.\n        `/etc/glusterfs`        : To make gluster configuration persistent in the host.\n```\n\nSystemd has been installed and is running in the container we maintain.\n\nOnce issued, this will boot up the Fedora or CentOS system and you have a container started with glusterd running in it.\n\n##### Verify the container is running successfully:\n\n```\n$ docker ps -a\n\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nd273cc739c9d gluster/gluster-fedora:latest \"/usr/sbin/init\" 3 minutes ago Up 3 minutes 49157/tcp, 49161/tcp, 49158/tcp, 38466/tcp, 8080/tcp, 2049/tcp, 24007/tcp, 49152/tcp, 49162/tcp, 49156/tcp, 6010/tcp, 111/tcp, 49154/tcp, 443/tcp, 49160/tcp, 38468/tcp, 49159/tcp, 245/tcp, 49153/tcp, 6012/tcp, 38469/tcp, 6011/tcp, 38465/tcp, 0.0.0.0:49153-\u003e22/tcp angry_morse\nNote the Container ID of the image and inspect the image to get the IP address. Say the Container ID of the image is d273cc739c9d , so to get the IP do:\n```\n\n##### To inspect the container:\n\n```\n$ docker inspect d273cc739c9d\n\n\"GlobalIPv6Address\": \"\",\n\"GlobalIPv6PrefixLen\": 0,\n\"IPAddress\": \"172.17.0.2\",\n\"IPPrefixLen\": 16,\n\"IPv6Gateway\": \"\",\n\"LinkLocalIPv6Address\": \"fe80::42:acff:fe11:2\",\n\"LinkLocalIPv6PrefixLen\": 64,\nThe IP address is “172.17.0.2”\n\n```\n\n##### Get inside the container\n\n```\n$ docker exec -ti d273cc739c9d bash\n\n-bash-4.3# ps aux |grep glusterd\nroot 34 0.0 0.0 448092 15800 ? Ssl 06:01 0:00 /usr/sbin/glusterd -p /var/run/glusterd.pid\nroot 159 0.0 0.0 112992 2224 pts/0 S+ 06:22 0:00 grep --color=auto glusterd\n\n-bash-4.3# gluster peer status\nNumber of Peers: 0\n\n-bash-4.3# gluster --version\n```\n\nThat’s it!\n\nAdditional Ref# https://goo.gl/3031Mm\n\n##### Capturing coredumps\n\n/var/log/core directory is already added in the container.\nCoredumps can be configured to be generated under /var/log/core directory.\n\nUser can copy the coredump(s) generated under /var/log/core/ directory\nfrom the container to the host.\n\nFor example:\n\n```\nssh \u003chostmachine\u003e\nsysctl -w kernel.core_pattern=/var/log/core/core_%e.%p\n```\n\n## Gluster Object Docker container:\n\n### To pull gluster-s3:\n\n```\n$ docker pull gluster/gluster-s3\n```\n\n### To run gluster-s3 container:\n\nOn the host machine, mount one or more gluster volumes under the directory\n`/mnt/gluster-object` with mountpoint name being same as that of the volume.\n\nFor example, if you have two gluster volumes named `test` and `test2`, they\nshould be mounted at `/mnt/gluster-object/test` and `/mnt/gluster-object/test2`\nrespectively. This directory on the host machine containing all the individual\nglusterfs mounts is then bind-mounted inside the container. This avoids having\nto bind mount individual gluster volumes.\n\nThe same needs to be updated in etc/sysconfig/swift-volumes.\n\nFor example(in swift-volumes):\nS3_ACCOUNT='tv1'\n\nWhere tv1 is the volume name.\n\n```\n$ docker run -d --privileged  -v /sys/fs/cgroup/:/sys/fs/cgroup/:ro -p 8080:8080 -v /mnt/gluster-object:/mnt/gluster-object -e S3_ACCOUNT=\"tv1\" -e S3_USER=\"admin\" -e S3_PASSWORD=\"redhat\" gluster/gluster-s3\n```\n\nNow, We can get/put objects into the gluster volume, using the gluster-s3 Docker container.\nRefer this link[1] for testing.\n\n[1] https://github.com/gluster/gluster-swift/blob/master/doc/markdown/quick_start_guide.md#using_swift\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluster%2Fgluster-containers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgluster%2Fgluster-containers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluster%2Fgluster-containers/lists"}