env vars: size, label; volumes as hdds

This commit is contained in:
Karol Majek
2018-11-29 14:41:08 +01:00
parent adc3330076
commit f56ab1a6e0
18 changed files with 208 additions and 322 deletions

View File

@@ -1,11 +1,11 @@
FROM ubuntu:14.04
FROM debian:stretch
# Install wget, lsb-release and curl
RUN apt-get update && apt-get install -y wget lsb-release curl fuse libfuse2 tree
# Install wget, lsb-release, curl, fuse and tree
RUN apt-get update && apt-get upgrade -y && apt-get install -y wget lsb-release curl fuse libfuse2 net-tools gnupg2 systemd tree
# Add key
RUN wget -O - http://ppa.moosefs.com/moosefs.key | apt-key add -
RUN . /etc/lsb-release && echo "deb http://ppa.moosefs.com/moosefs-3/apt/ubuntu/$DISTRIB_CODENAME $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/moosefs.list
RUN echo "deb http://ppa.moosefs.com/moosefs-3/apt/$(awk -F= '$1=="ID" { print $2 ;}' /etc/os-release)/$(lsb_release -sc) $(lsb_release -sc) main" > /etc/apt/sources.list.d/moosefs.list
# Install MooseFS client
RUN apt-get update && apt-get install -y moosefs-client

View File

@@ -3,16 +3,17 @@
# wait for mfsmaster startup
ping -c 10 mfsmaster
mkdir -p /mnt/mfs
mkdir -p /mnt/moosefs
# mount mfs
mfsmount /mnt/mfs -H mfsmaster
mfsmount /mnt/moosefs -H mfsmaster
# create example file to MooseFS
echo "If you can find this file in /mnt/mfs/ on your client machine - it means MooseFS is working correctly, congratulations!" > /mnt/mfs/welcome_to_moosefs.txt
echo "If you can find this file in /mnt/moosefs/welcome_to_moosefs.txt on your client machine - it means MooseFS is working correctly, congratulations!" > /mnt/moosefs/welcome_to_moosefs.txt
# list files in MooseFS
ls /mnt/mfs/
ls /mnt/moosefs/
tree /mnt/moosefs/
if [[ $1 == "-d" ]]; then
while true; do sleep 1000; done