mirror of https://github.com/k3s-io/k3s
Use tmpfs for gluster-server container volumes.
Gluster server needs a filesystem that supports extended attributes for its data. Some distros (Debian, Ubuntu) ship Docker that runs containers on aufs, which does not support extended attributes and therefore Gluster server fails there. We can use tmpfs for Gluster server data volumes instead of a directory inside the container.pull/6/head
parent
cc0406ca26
commit
82d66c7d75
|
@ -14,8 +14,7 @@
|
||||||
|
|
||||||
FROM centos
|
FROM centos
|
||||||
MAINTAINER Jan Safranek, jsafrane@redhat.com
|
MAINTAINER Jan Safranek, jsafrane@redhat.com
|
||||||
ADD gluster.repo /etc/yum.repos.d/
|
RUN yum -y install hostname centos-release-gluster && yum -y install glusterfs-server && yum clean all
|
||||||
RUN yum -y install hostname glusterfs-server && yum clean all
|
|
||||||
ADD glusterd.vol /etc/glusterfs/
|
ADD glusterd.vol /etc/glusterfs/
|
||||||
ADD run_gluster.sh /usr/local/bin/
|
ADD run_gluster.sh /usr/local/bin/
|
||||||
ADD index.html /vol/
|
ADD index.html /vol/
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
TAG = 0.3
|
TAG = 0.4
|
||||||
PREFIX = gcr.io/google_containers
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
all: push
|
all: push
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
[epel]
|
|
||||||
name=Extra Packages for Enterprise Linux 7 - $basearch
|
|
||||||
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
|
|
||||||
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
|
|
||||||
failovermethod=priority
|
|
||||||
enabled=1
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
|
|
||||||
|
|
||||||
[epel-debuginfo]
|
|
||||||
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
|
|
||||||
#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug
|
|
||||||
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch
|
|
||||||
failovermethod=priority
|
|
||||||
enabled=0
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
|
|
||||||
|
|
||||||
[epel-source]
|
|
||||||
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
|
|
||||||
#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS
|
|
||||||
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch
|
|
||||||
failovermethod=priority
|
|
||||||
enabled=0
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
|
|
||||||
|
|
||||||
[glusterfs-epel]
|
|
||||||
name=GlusterFS is a clustered file-system capable of scaling to several petabytes.
|
|
||||||
baseurl=http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-$releasever/$basearch/
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/pub.key
|
|
||||||
|
|
||||||
[glusterfs-noarch-epel]
|
|
||||||
name=GlusterFS is a clustered file-system capable of scaling to several petabytes.
|
|
||||||
baseurl=http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-$releasever/noarch
|
|
||||||
enabled=1
|
|
||||||
skip_if_unavailable=1
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/pub.key
|
|
||||||
|
|
||||||
[glusterfs-source-epel]
|
|
||||||
name=GlusterFS is a clustered file-system capable of scaling to several petabytes. - Source
|
|
||||||
baseurl=http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-$releasever/SRPMS
|
|
||||||
enabled=0
|
|
||||||
skip_if_unavailable=1
|
|
||||||
gpgcheck=1
|
|
||||||
gpgkey=http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/pub.key
|
|
|
@ -14,10 +14,15 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
DIR=`mktemp -d`
|
||||||
|
|
||||||
function start()
|
function start()
|
||||||
{
|
{
|
||||||
|
mount -t tmpfs test $DIR
|
||||||
|
chmod 755 $DIR
|
||||||
|
cp /vol/* $DIR/
|
||||||
/usr/sbin/glusterd -p /run/glusterd.pid
|
/usr/sbin/glusterd -p /run/glusterd.pid
|
||||||
gluster volume create test_vol `hostname -i`:/vol force
|
gluster volume create test_vol `hostname -i`:$DIR force
|
||||||
gluster volume start test_vol
|
gluster volume start test_vol
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +30,8 @@ function stop()
|
||||||
{
|
{
|
||||||
gluster --mode=script volume stop test_vol force
|
gluster --mode=script volume stop test_vol force
|
||||||
kill $(cat /run/glusterd.pid)
|
kill $(cat /run/glusterd.pid)
|
||||||
|
umount $DIR
|
||||||
|
rm -rf $DIR
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue