LoginSignup
4
4

More than 5 years have passed since last update.

LeoFSのDockerイメージを使ってみた

Posted at

imageをpullするだけで使える。

$ docker pull firejun/leofs

$ docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
docker.io/firejun/leofs   latest              913a9bafa916        4 months ago        793.9 MB

$ docker run 913a9bafa916
 * Starting OpenBSD Secure Shell server sshd
   ...done.

tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Generating RING...
Generated RING
OK 100% - storage_0@127.0.0.1
OK
LeoFS is ready!!

IPが知りたいので、

$ docker ps
CONTAINER ID        IMAGE               COMMAND                CREATED             STATUS              PORTS                                                NAMES
9da99a740d99        913a9bafa916        "/usr/local/leofs/bi   6 minutes ago       Up 6 minutes        22/tcp, 8080/tcp, 10010-10011/tcp, 10020-10021/tcp   adoring_colden

$ docker inspect 9da | jq '.[].NetworkSettings.IPAddress'
"172.17.0.1"

leofs-admが使える

$ ./leofs-adm -h 172.17.0.1 status
 [System Confiuration]
-----------------------------------+----------
 Item                              | Value    
-----------------------------------+----------
 Basic/Consistency level
-----------------------------------+----------
                    system version | 1.2.8
                        cluster Id | leofs_1
                             DC Id | dc_1
                    Total replicas | 1
          number of successes of R | 1
          number of successes of W | 1
          number of successes of D | 1
 number of rack-awareness replicas | 0
                         ring size | 2^128
-----------------------------------+----------
 Multi DC replication settings
-----------------------------------+----------
        max number of joinable DCs | 2
           number of replicas a DC | 1
-----------------------------------+----------
 Manager RING hash
-----------------------------------+----------
                 current ring-hash | 433fe365
                previous ring-hash | 433fe365
-----------------------------------+----------

 [State of Node(s)]
-------+--------------------------+--------------+----------------+----------------+----------------------------
 type  |           node           |    state     |  current ring  |   prev ring    |          updated at         
-------+--------------------------+--------------+----------------+----------------+----------------------------
  S    | storage_0@127.0.0.1      | running      | 433fe365       | 433fe365       | 2015-09-04 08:57:39 +0000
  G    | gateway_0@127.0.0.1      | running      | 433fe365       | 433fe365       | 2015-09-04 08:58:05 +0000
-------+--------------------------+--------------+----------------+----------------+----------------------------

バージョンはちょっとだけ古いみたいだ。SSHDも起動しているので、コンテナの中に入って設定ファイルなどを確認したりもできる。(User:leofs, Password:leofs)

ちなみにfirejunさんはLeoFSの中の人。

4
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4