How to mount EO DATA using s3fs (Linux)

EO DATA resources might be mounted to VM through s3 interface using s3fs command.

Attention!
Your virtual machine has to be launched in project with EO DATA!

Perform operation as a root

# Perform all commands as root
sudo -i

Install build and runtime dependencies for S3FS

For  Ubuntu/Debian

# Install git
apt-get update
apt-get --yes install git
# Install required tools and libraries
apt-get --yes install automake autotools-dev fuse g++ git libcurl4-openssl-dev libfuse-dev libssl-dev libxml2-dev make pkg-config

For CentOS/RedHAT

yum update
yum install git
yum install automake fuse fuse-devel gcc-c++ git libcurl-devel libxml2-devel make openssl-devel

 Build s3fs

git clone https://github.com/CloudFerro/s3fs-fuse.git
cd s3fs-fuse/ ./autogen.sh
./configure
make
# Install s3fs
make install

Mount /eodata using s3fs

# Prepare configuration for EO Data
echo ACCESS:DATA >  ~/.passwd-s3fs
chmod 600 ~/.passwd-s3fs

# Comment out original fstab entry that mounted /eodata over NFS
sed -i 's/nfs.eodata/#nfs.eodata/g' /etc/fstab

# Add new entry to mount /eodata over s3fs
echo s3fs#DIAS /eodata fuse passwd_file=/root/.passwd-s3fs,_netdev,allow_other,use_path_request_style,uid=0,umask=0222,mp_umask=0222,gid=0,url=http://data.cloudferro.com/ 0 0 >> /etc/fstab

# Modify /etc/updatedb.conf to exclude s3fs mounts from indexing
sed -i 's/PRUNEPATHS="/\PRUNEPATHS="\/eodata /g; s/PRUNEFS="/PRUNEFS="s3fs /g' /etc/updatedb.conf

# Remount /eodata
umount -lf /eodata
mount /eodata