Skip to content

Instantly share code, notes, and snippets.

@hilotech
Created July 2, 2015 02:37
Show Gist options
  • Save hilotech/c0a9e8aee2ec17451f44 to your computer and use it in GitHub Desktop.
Save hilotech/c0a9e8aee2ec17451f44 to your computer and use it in GitHub Desktop.
ConoHa : Cloudfuseインストールスクリプト
#!/bin/bash
set -e
set -u
# must replace with your own configuration
OBJS_TENANT='your_tenant_name'
OBJS_USERNAME='your_user_name'
OBJS_AUTHURL='your_api_auth_url'
OBJS_PASSWORD='your_password'
# Prerequisite
yum -y install \
libcurl libcurl-devel \
fuse* fuse fuse-devel fuse-libs \
libxml2 libxml2-devel openssl-devel \
gcc gcc-c++ make git curl
# Cloudfuse :: make
TEMPDIR=$(mktemp -d)
cd ${TEMPDIR-}
git clone https://github.com/redbo/cloudfuse.git
cd cloudfuse
./configure --prefix=/usr
make
make install
cd /tmp
/bin/rm -rf ${TEMPDIR-}
# Cloudfuse :: config
cat <<_EOF_ > /root/.cloudfuse
tenant=${OBJS_TENANT-}
username=${OBJS_USERNAME-}
authurl=${OBJS_AUTHURL-}
password=${OBJS_PASSWORD-}
verify_ssl=True
_EOF_
chmod og-rw ~/.cloudfuse
# mount
mkdir -p /mnt/conohaobj
cat <<_EOF_ >> /etc/fstab
cloudfuse /mnt/conohaobj fuse auto,_netdev,gid=$(grep fuse /etc/group | cut -d: -f3),umask=007,allow_other,cache_timeout=5,defaults,noatime 0 0
_EOF_
mount -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment