Getting Started

System Requirements

LeoFS development currently targets Debian 6, Ubuntu-Server 12.04 LTS and CentOS 6.x, but should work on most Linux platforms with the following software:

And the following erlang libraries:

And we recommend you to use on 64bit builds because of having to handle large files.

Getting LeoFS

Quick Start -1 All in one for Application Development

Note

In this example, LeoFS-Storage, LeoFS-Gateway and LeoFS-Manager, all applications are installed into "local".

1. Install

Erlang (CentOS, Ubuntu, Other Linux OS)

##
## 1. Install libatomic
##
$ wget http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-7.2d.tar.gz
$ tar xzvf libatomic_ops-7.2d.tar.gz
$ cd libatomic_ops-7.2d
$ ./configure --prefix=/usr/local
$ make
$ sudo make install

##
## 2. Install Erlang (R15B03-1)
##
$ wget http://www.erlang.org/download/otp_src_R15B03-1.tar.gz
$ tar xzf otp_src_R15B03-1.tar.gz
$ cd otp_src_R15B03-1
$ ./configure --prefix=/usr/local/erlang/R15B03 \
              --enable-smp-support \
              --enable-m64-build \
              --enable-halfword-emulator \
              --enable-kernel-poll \
              --without-javac \
              --disable-native-libs \
              --disable-hipe \
              --disable-sctp \
              --enable-threads \
              --with-libatomic_ops=/usr/local
$ make
$ sudo make install

##
## 3. Set PATH
##
$ vi ~/.profile
    ## append the follows:
    export ERL_HOME=/usr/local/erlang/R15B03
    export PATH=$PATH:$ERL_HOME/bin

$ source ~/.profile

LeoFS

$ git clone https://github.com/leo-project/leofs.git
$ cd leofs
$ make && make release

2. Configuration

Modify “/etc/hosts”

  • Add a LeoFS’s domain in /etc/hosts
  • LeoFS’s domains are ruled by this rule
$ sudo vi /etc/hosts

## Add a LeoFS's domain ##
127.0.0.1 localhost ${BUCKET_NAME}.localhost

3. Launch LeoFS’s managers and storage

  • Launch master-manager, slave-manager
  • Launch a storage - # of replicas is ONE - System-configuration’s details are here.
$ cd $LEOFS_ROOT/package/leofs
$ manager_0/bin/leo_manager start
$ manager_1/bin/leo_manager start
$ storage/bin/leo_storage start

4. Launch the system

  • Using command is start on LeoFS’s manager-console
$ telnet 127.0.0.1 10010
> start

5. Launch a LeoFS’s gateway

$ gateway/bin/leo_gateway start

6. Confirmation of the system

  • Using command is status on LeoFS’s manager-console
$ telnet 127.0.0.1 10010
> status
status
[system config]
             version : 0.12.7
 # of replicas       : 1
 # of successes of R : 1
 # of successes of W : 1
 # of successes of D : 1
           ring size : 2^128
    ring hash (cur)  : 1428891014
    ring hash (prev) : 1428891014

[node(s) state]
------------------------------------------------------------------------------------------------
 node                        state       ring (cur)    ring (prev)   when
------------------------------------------------------------------------------------------------
 storage_0@127.0.0.1         running     1428891014    1428891014    2012-09-07 14:23:08 +0900
 gateway@127.0.0.1           running     1428891014    1428891014    2012-09-07 14:24:37 +0900

7. Getting Your S3-API’s Key from LeoFS’s Manager-Console

  • Using command is create-user on LeoFS’s manager-console
$ telnet 127.0.0.1 10010
> create-user ${YOUR_NAME}
access-key-id: 05dcba94333c7590a635
secret-access-key: c776574f3661579ceb91aa8788dfcac733b21b3a

8. Clients

Quick Start -2 Cluster

(under construction)