diff options
author | Saravanakumar Arumugam <sarumuga@redhat.com> | 2017-02-28 11:21:00 +0530 |
---|---|---|
committer | Saravanakumar Arumugam <sarumuga@redhat.com> | 2017-02-28 11:28:18 +0530 |
commit | 7439918490cdc697b7f2804ef84319b6e77327e7 (patch) | |
tree | 54bb7bd060f293cac38a06d95d13458ce5e0abb0 /gluster-object/CentOS/docker-gluster-swift/Dockerfile | |
parent | ba821d903d34ebf5014a647d92d9e0b2acd0c6a3 (diff) | |
download | gluster-7439918490cdc697b7f2804ef84319b6e77327e7.tar.gz gluster-7439918490cdc697b7f2804ef84319b6e77327e7.tar.bz2 gluster-7439918490cdc697b7f2804ef84319b6e77327e7.tar.xz gluster-7439918490cdc697b7f2804ef84319b6e77327e7.zip |
Adding gluster-object to gluster docker hub. Current changes are for CentOS.
Refer docker-gluster-swift/README.md for setting up gluster-object Docker container.
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Diffstat (limited to 'gluster-object/CentOS/docker-gluster-swift/Dockerfile')
-rw-r--r-- | gluster-object/CentOS/docker-gluster-swift/Dockerfile | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/gluster-object/CentOS/docker-gluster-swift/Dockerfile b/gluster-object/CentOS/docker-gluster-swift/Dockerfile new file mode 100644 index 0000000..78be0b7 --- /dev/null +++ b/gluster-object/CentOS/docker-gluster-swift/Dockerfile @@ -0,0 +1,65 @@ +FROM centos:7 +MAINTAINER Prashanth Pai <ppai@redhat.com> + +# centos-release-openstack-kilo package resides in the extras repo. +# All subsequent actual packages come from the CentOS Cloud SIG repo: +# http://mirror.centos.org/centos/7/cloud/x86_64/ + +# Install PACO servers and S3 middleware. +# Install gluster-swift dependencies. To be removed when RPMs become available. +# Clean downloaded packages and index + +RUN yum -v --setopt=tsflags=nodocs -y update && \ + yum -v --setopt=tsflags=nodocs -y install \ + centos-release-openstack-kilo \ + epel-release && \ + yum -v --setopt=tsflags=nodocs -y install \ + openstack-swift openstack-swift-{proxy,account,container,object,plugin-swift3} \ + git memcached python-prettytable && \ + yum -y install systemd && \ + (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ + rm -f /lib/systemd/system/multi-user.target.wants/*;\ + rm -f /etc/systemd/system/*.wants/*;\ + rm -f /lib/systemd/system/local-fs.target.wants/*; \ + rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ + rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ + rm -f /lib/systemd/system/basic.target.wants/*;\ + rm -f /lib/systemd/system/anaconda.target.wants/* && \ + yum -y clean all + +# Install gluster-swift from source. +# TODO: When gluster-swift is shipped as RPM, just use that. +RUN git clone git://review.gluster.org/gluster-swift /tmp/gluster-swift && \ + cd /tmp/gluster-swift && \ + python setup.py install && \ + cd - + +# Gluster volumes will be mounted *under* this directory. +VOLUME /mnt/gluster-object + +# volumes to be exposed as object storage is present in swift-volumes file +COPY etc/sysconfig/swift-volumes /etc/sysconfig/ + +# Copy systemd scripts +COPY swift-gen-builders.service /lib/systemd/system/ +COPY swift-proxy.service /lib/systemd/system/ +COPY swift-account.service /lib/systemd/system/ +COPY swift-container.service /lib/systemd/system/ +COPY swift-object.service /lib/systemd/system/ + +# Replace openstack swift conf files with local gluster-swift ones +COPY etc/swift/* /etc/swift/ + +# The proxy server listens on port 8080 +EXPOSE 8080 + +RUN echo 'root:password' | chpasswd +VOLUME [ "/sys/fs/cgroup" ] + +RUN systemctl enable swift-gen-builders.service +RUN systemctl enable memcached.service +RUN systemctl enable swift-proxy.service +RUN systemctl enable swift-account.service +RUN systemctl enable swift-container.service +RUN systemctl enable swift-object.service +CMD ["/usr/sbin/init"] |