SlideShare a Scribd company logo
オープンクラウド・キャンパス



GlusterFSのSwiftAPIについて 
(RH社のOpenStack Foundation参加についてもちらっと触れつつ)




                   中井悦司
              Twitter @enakai00
試して学べるクラウド技術!

自己紹介
 中井悦司(なかいえつじ)
   – Twitter @enakai00

 日々の仕事
   – Senior Solution Architect and
     Cloud Evangelist at Red Hat K.K.
     企業システムでオープンソースの活用を希望される
     お客様を全力でご支援させていただきます。               第3弾鋭意制作中

 昔とった杵柄
   – 素粒子論の研究(超弦理論とか)
   – 予備校講師(物理担当)
   – インフラエンジニア(Unix/Linux専門)




                                                   Open Cloud Campus
GlusterFSとは?
GlusterFSの特徴
 コモディティ・ハードウェアを利用して、スケールアウト型の分散ファイルシス
  テムを構築するソフトウェア
   – サーバを追加していくことで、ストレージの容量を増やしていける。
   – 同時アクセスするクライアントが増えてもパフォーマンスの劣化が少ない。

                                  クラウドプロバイダがクラウド内部
 Linuxが動くところならどこでも利用可能            のストレージ領域として使用
 – データセンターの物理サーバ/仮想マシン
 – クラウド上の仮想マシン
                        クラウドユーザがクラウド上にプラ
                        イベートな大容量ストレージを用意
 複数のAPIでアクセスが可能
 – Currentバージョン(v3.2.5)では、FUSEマウントとNFSに対応
 – v3.3以降で、REST(OpenStack SWIFT互換)、Hadoop MapReduce
   API(HDFSの代替)などを実装予定
  → ユーザ・アプリケーションがRESTで保存したファイルをHadoopでバッチ処理する 
   などの連係が可能になります!


                                                  Open Cloud Campus
GlusterFSとRed Hat Storageの関係
 GlusterFSは、コミュニティメンバーによるオープンソースプロジェクトとして開発を継続
  します。
  GlusterFS Advisory Board Member (as of 2012/04)
    Richard Wareing, Storage Engineer, Facebook
    Jeff Darcy, Filesystem Engineer, Red Hat; Founder, HekaFS Project
    AB Periasamy, Co-Founder, GlusterFS project
    Ewan Mellor, Xen Engineer, Citrix; Core contributor, OpenStack project
    David Nalley, CloudStack Community Manager, Citrix; Member, Fedora Advisory Board
    Louis Zuckerman, Sr. System Administrator, Picture Marketing
    Joe Julian, Sr. System Administrator, Ed Wyse Beauty Products
    Greg DeKoenigsberg, Community VP, Eucalyptus; co-founder, Fedora project
    John Mark Walker, Gluster.org Community Guy (Chair)



 Red Hat Storageは、コミュニティ版の
  GlusterFSをアップストリームとする安定版                                                   GlusterFS
  に、RHEL/XFS/機能拡張モジュールなどを組
  み合わせたソフトウェアアプライアンスとし
  て提供されます。

                                                            Red Hat Storage

                                                                                        Open Cloud Campus
Red Hat Storage / GlusterFSのアーキテクチャ




                                      Open Cloud Campus
買収前のGluster社による公開事例 (1)




                          Open Cloud Campus
買収前のGluster社による公開事例 (2)




                          Open Cloud Campus
メタデータノードを持たない分散アーキテクチャ
 分散ストレージを構成する各ノードの通常のファイルシステムをバックエンドデバイスとし
  て使用します。
  – GlusterFSに保存したファイルの実体は、どこかのノードのファイルシステムに保存されます。


 ファイル名のハッシュ計算で保存するノードを決定します。
  – 各ファイルの保存ノードの情報を別途、どこかにメタデータとして保存しておく必要がありません。


                                           GlusterFSクライアント

                                            クライアントからは
                                            1つのファイルシステムに見える
実際には各ノードのファイルシステムに
       分散して保存されている
                            file01, file02, file03            ボリューム



                                       ・・・                    GlusterFSクラスタ



                   file01    file02                  file03
                                                                  Open Cloud Campus
ボリュームの構成例
 node01     node02      node03     node04
                                             GlusterFSクラスタ



                                              ファイル単位で各ブリックに分散保存
 /brick01   /brick01   /brick01   /brick01    (1つのファイルはどれか1つのブリックに存在)

                ストライピング

 /brick02   /brick02   /brick02   /brick02    1つのファイルを各ブリックに分散保存



     レプリケーション              レプリケーション


                                              node01-node02、node03-node04で
 /brick03   /brick03   /brick03   /brick03    それぞれレプリケーション



                ストライピング

     レプリケーション              レプリケーション


                                              レプリケーションとストライピングの
 /brick04   /brick04   /brick04   /brick04    組み合わせ
                                                                        Open Cloud Campus
GlusterFSのSwiftAPI
SwiftAPI使用時の構成例
 ProxyサーバはGlusterFSサーバに同居することも可能です。
 複数Proxyによるロードバランスも可能です。
  – ロードバランサ機能は別途、DNS Round-Robinなどを使用する必要があります。
 認証機能は、現在は、TempAuthのみに対応しています。
  – TempAuthで定義する「アカウント」ごとに個別のボリュームを使用します。


                             Client




                                                Proxy with TempAuth
                   proxy01            proxy02
                                                GlusterFS Client



            rhs20-01    rhs20-02        ・・・
                                                GlusterFS Servers




※ 具体的な構成手順はこちらを参照
http://bit.ly/IpqxfH                                                  Open Cloud Campus
主な設定項目
# cat /etc/swift/proxy-server.conf
[DEFAULT]                                             複数Proxyサーバを使用する際は、
bind_port = 8080
user = root                                            proxy-server.confを共有ボリュー
log_facility = LOG_LOCAL1                              ム上に置くことで、ユーザ情報の
bind_port = 443
cert_file = /etc/swift/cert.crt
                                                       共有が可能です。
key_file = /etc/swift/cert.key

[pipeline:main]                                       さらに、memcache_serversを共有
pipeline = healthcheck cache tempauth proxy-server     することで、Proxyサーバ間で発行
                                                       済Tokenの情報も共有可能です。
[app:proxy-server]
use = egg:swift#proxy                                  – この方法に変なトラップがないかは
allow_account_management = true                          未確認です。自己責任でご使用くだ
account_autocreate = true                                さい。
[filter:tempauth]
use = egg:swift#tempauth
#user_<account>_<user name> = <password> [.admin]
user_vol01_admin = pas01admin .admin
user_vol01_user01 = pas01user01
user_vol02_admin = pas02admin .admin
user_vol02_user01 = pas02user01

[filter:healthcheck]
use = egg:swift#healthcheck

[filter:cache]
use = egg:swift#memcache
memcache_servers = proxy01:11211,proxy02:11211                        Open Cloud Campus
使用例 (1)
 GETで認証Tokenを取得(proxy01に接続)
# curl -v -H 'X-Storage-User: vol01:admin' -H 'X-Storage-Pass:pas01admin' -k https://proxy01:443/auth/v1.0
* About to connect() to proxy01 port 443 (#0)
*   Trying 192.168.122.20... connected
* Connected to proxy01 (192.168.122.20) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
*           subject: CN=Swift API,ST=Tokyo,C=JP
*           start date: 4月 29 11:55:08 2012 GMT
*           expire date: 4月 05 11:55:08 2112 GMT
*           common name: Swift API
*           issuer: CN=Swift API,ST=Tokyo,C=JP
> GET /auth/v1.0 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18
libssh2/1.2.2
> Host: proxy01
> Accept: */*
> X-Storage-User: vol01:admin
> X-Storage-Pass:pas01admin
>
< HTTP/1.1 200 OK
< X-Storage-Url: https://127.0.0.1:443/v1/AUTH_vol01
< X-Storage-Token: AUTH_tk9c43dc9ea78a4c77aa369545ce99510a
< X-Auth-Token: AUTH_tk9c43dc9ea78a4c77aa369545ce99510a
< Content-Length: 0
< Date: Sun, 29 Apr 2012 12:33:57 GMT
<
* Connection #0 to host proxy01 left intact
* Closing connection #0

                                                                                                Open Cloud Campus
使用例 (2)
 PUTでコンテナを作成(あえてproxy02に接続)
# TOKEN=AUTH_tk9c43dc9ea78a4c77aa369545ce99510a
# curl -v -X PUT -H "X-Auth-Token: $TOKEN" https://proxy02:443/v1/AUTH_vol01/container01 -k
* About to connect() to proxy02 port 443 (#0)
*   Trying 192.168.122.23... connected
* Connected to proxy02 (192.168.122.23) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
*           subject: CN=Swift API,ST=Tokyo,C=JP
*           start date: 4月 29 11:55:16 2012 GMT
*           expire date: 4月 05 11:55:16 2112 GMT
*           common name: Swift API
*           issuer: CN=Swift API,ST=Tokyo,C=JP
> PUT /v1/AUTH_vol01/container01 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18
libssh2/1.2.2
> Host: proxy02
> Accept: */*
> X-Auth-Token: AUTH_tk9c43dc9ea78a4c77aa369545ce99510a
>
< HTTP/1.1 201 Created
< Content-Length: 18
< Content-Type: text/html; charset=UTF-8
< Date: Sun, 29 Apr 2012 12:35:40 GMT
<
201 Created
* Connection #0 to host proxy02 left intact
* Closing connection #0


                                                                                                Open Cloud Campus
使用例 (3)
 swiftコマンドでコンテナの状態を確認
# swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin stat container01
  Account: AUTH_vol01
Container: container01
  Objects: 0
    Bytes: 0
 Read ACL:
Write ACL:
  Sync To:
 Sync Key:
Accept-Ranges: bytes

# swift -A https://proxy02/auth/v1.0 -U vol01:admin -K pas01admin stat container01
  Account: AUTH_vol01
Container: container01
  Objects: 0
    Bytes: 0
 Read ACL:
Write ACL:
  Sync To:
 Sync Key:
Accept-Ranges: bytes




                                                                                     Open Cloud Campus
使用例 (4)
 swiftコマンドでファイルをアップロード
# swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin upload container01 file01
File01

# swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin list container01
file01

# df
Filesystem           1K-ブロック      使用 使用可 使用% マウント位置
/dev/vda2              4031680   2929808  897072 77% /
/dev/vda1               198337     26436  161661 15% /boot
tmpfs                   510420         0  510420  0% /dev/shm
/dev/vda5              3505520     72504 3254944  3% /data
rhs20-01:/config_vol   7582848   2968576 4409472 41% /mnt/config
rhs20-01:vol01         7582848   2968576 4409472 41% /mnt/gluster-object/AUTH_vol01

# ls -l /mnt/gluster-object/AUTH_vol01/container01/
合計 12
-rw-------. 1 root root   43 4月 29 12:38 2012 file01




                                                                                              Open Cloud Campus
使用例 (5)
 フルパス指定でファイルをアップロードしてみると・・・
# swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin upload container01 /boot/vmlinuz-2.6.32-
220.7.1.el6.x86_64
boot/vmlinuz-2.6.32-220.7.1.el6.x86_64

# swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin list container01boot
boot/vmlinuz-2.6.32-220.7.1.el6.x86_64
file01

# ls -lR /mnt/gluster-object/AUTH_vol01/container01/
/mnt/gluster-object/AUTH_vol01/container01/:
合計 12
drwxr-xr-x. 2 root root 4142 4月 29 12:39 2012 boot
-rw-------. 1 root root   43 4月 29 12:38 2012 file01

/mnt/gluster-object/AUTH_vol01/container01/boot:
合計 3852
-rw-------. 1 root root 3941424 4月 29 12:39 2012 vmlinuz-2.6.32-220.7.1.el6.x86_64




                                                                                                Open Cloud Campus
RH社のOpenStack Foundation参加についてもちらっと触れつつ
Red Hat and OpenStack Announcement FAQ                               http://red.ht/INq08F

  What is being announced today?
    – OpenStack is moving to a new foundation governance model, and Red Hat is joining
      that foundation as a Platinum Member.


  What is the OpenStack Foundation?
    – The OpenStack Foundation is a new governance body for maintaining the OpenStack
      project. This foundation ensures that OpenStack will have an open and broad
      leadership community and reinforces the traditional open source values of meritocracy
      and community.


  What has been Red Hat's previous involvement with OpenStack?
    – Red Hat has already become one of the top code contributors to OpenStack in the open
      source community, with Red Hat engineers working across many aspects of the project.
      Additionally, Red Hat has been leading packaging and distribution efforts around the
      OpenStack code base. For example, Fedora 16 included OpenStack as one of its key
      features.


  Is Red Hat going to introduce an OpenStack-based product?
    – Yes, Red Hat is planning to introduce an enterprise distribution of OpenStack.
      However, we are not announcing any specific product plans right now.
                                                                                 Open Cloud Campus
オープンクラウド・キャンパス



   みなさんもGlusterFS
/SwiftAPIをお試しください




          中井悦司
     Twitter @enakai00

More Related Content

PDF
インフラエンジニアのこれから ~Red Hatの描くLinuxの今後とクラウド~(第ニ部)
PDF
Red Hat Enterprise Linux OpenStack Platform環境でのDocker活用テクニック
PDF
Using Kubernetes on Google Container Engine
PDF
OpenStackクラウド基盤構築ハンズオンセミナー 第2日:ハンズオンNo1
PDF
OpenStackクラウド基盤構築ハンズオンセミナー 第1日:ハンズオンNo2
PDF
クラウドオーケストレーション「OpenStack Heat」に迫る!
PDF
Quick Introduction to GlusterFS
PDF
OpenStack + Common Lisp
インフラエンジニアのこれから ~Red Hatの描くLinuxの今後とクラウド~(第ニ部)
Red Hat Enterprise Linux OpenStack Platform環境でのDocker活用テクニック
Using Kubernetes on Google Container Engine
OpenStackクラウド基盤構築ハンズオンセミナー 第2日:ハンズオンNo1
OpenStackクラウド基盤構築ハンズオンセミナー 第1日:ハンズオンNo2
クラウドオーケストレーション「OpenStack Heat」に迫る!
Quick Introduction to GlusterFS
OpenStack + Common Lisp

What's hot (19)

PDF
RHEL7/CentOS7 NetworkManager徹底入門
PDF
Nuxt.js + microCMS + netlify
PDF
CloudStackユーザ会 OSC.cloud
PDF
OpenStackクラウド基盤構築ハンズオンセミナー 第1日:講義No2
PDF
Okinawa Open Days 2014 OpenStackハンズオンセミナー / OpenStackの機能概要
PDF
OpenStackのQuantum(LinuxBridge Plugin)が実際どうやって仮想ネットワークを構成するのか説明する資料
PDF
OpenStackクラウド基盤構築ハンズオンセミナー 第2日:講義No2
PDF
Aeolus Conductorによる複数環境へのデプロイ自動化
PDF
30分でRHEL6 High Availability Add-Onを超絶的に理解しよう!
PDF
20130328 第03回福岡debian勉強会 debianパッケージ情報と依存関係の可視化
PDF
Comparing GlusterFS Swift API to Native Swift
PDF
10年効く分散ファイルシステム技術 GlusterFS & Red Hat Storage
PDF
OpenStack Kilo with 6Wind VA High-Performance Networking Using DPDK - OpenSta...
PDF
RDOとPackstackのご紹介
PDF
Gluster fsにおいて内在するincident要因
PDF
Docker with RHEL7 技術勉強会
PDF
Linux Namespace
PDF
ONIC-Japan-2019-OVN public
PDF
OpenStackでも重要な役割を果たすPacemakerを知ろう!
RHEL7/CentOS7 NetworkManager徹底入門
Nuxt.js + microCMS + netlify
CloudStackユーザ会 OSC.cloud
OpenStackクラウド基盤構築ハンズオンセミナー 第1日:講義No2
Okinawa Open Days 2014 OpenStackハンズオンセミナー / OpenStackの機能概要
OpenStackのQuantum(LinuxBridge Plugin)が実際どうやって仮想ネットワークを構成するのか説明する資料
OpenStackクラウド基盤構築ハンズオンセミナー 第2日:講義No2
Aeolus Conductorによる複数環境へのデプロイ自動化
30分でRHEL6 High Availability Add-Onを超絶的に理解しよう!
20130328 第03回福岡debian勉強会 debianパッケージ情報と依存関係の可視化
Comparing GlusterFS Swift API to Native Swift
10年効く分散ファイルシステム技術 GlusterFS & Red Hat Storage
OpenStack Kilo with 6Wind VA High-Performance Networking Using DPDK - OpenSta...
RDOとPackstackのご紹介
Gluster fsにおいて内在するincident要因
Docker with RHEL7 技術勉強会
Linux Namespace
ONIC-Japan-2019-OVN public
OpenStackでも重要な役割を果たすPacemakerを知ろう!
Ad

Viewers also liked (20)

PDF
Linux kernelsourcearchaeologywithgit public_20120130
PDF
IaaSクラウドを支える基礎技術 演習編_v1_0
PDF
第15回機械学習勉強会・説明用ノート
PDF
Try andstudy cloud_20111108_tokyo
PDF
DCK Server プロトタイプ
PDF
SDN Japan 2013 パネルディスカッション
PDF
Comparing GlusterFS-SwiftAPI with Original Swift
PDF
クラウドアプリケーションの マルチプロセス・プログラミングモデル を実現する「Data Center Kernel」
PDF
EucalyptusのHadoopクラスタとJaqlでBasket解析をしてHiveとの違いを味わってみました
PDF
Yet another acronym for Eucalyptus
PDF
Personal Cloud Automation
PDF
試して学べるクラウド技術! Eucalyptus/AeolusConductor
PDF
IaaSクラウドを支える基礎技術 v1_0
PDF
入門!Software Defined Network
PDF
クラウドが実現するソフト開発・運用の変革と自動化
PDF
[Rakuten TechConf2014] [F-4] At Rakuten, The Rakuten OpenStack Platform and B...
PDF
Haskell勉強会 14.1〜14.3 の説明資料
PDF
Eucalyptus infra technology
PDF
仮想化&クラウドで活用!自動化ツールの基礎
PDF
環境構築自動化ツールのご紹介
Linux kernelsourcearchaeologywithgit public_20120130
IaaSクラウドを支える基礎技術 演習編_v1_0
第15回機械学習勉強会・説明用ノート
Try andstudy cloud_20111108_tokyo
DCK Server プロトタイプ
SDN Japan 2013 パネルディスカッション
Comparing GlusterFS-SwiftAPI with Original Swift
クラウドアプリケーションの マルチプロセス・プログラミングモデル を実現する「Data Center Kernel」
EucalyptusのHadoopクラスタとJaqlでBasket解析をしてHiveとの違いを味わってみました
Yet another acronym for Eucalyptus
Personal Cloud Automation
試して学べるクラウド技術! Eucalyptus/AeolusConductor
IaaSクラウドを支える基礎技術 v1_0
入門!Software Defined Network
クラウドが実現するソフト開発・運用の変革と自動化
[Rakuten TechConf2014] [F-4] At Rakuten, The Rakuten OpenStack Platform and B...
Haskell勉強会 14.1〜14.3 の説明資料
Eucalyptus infra technology
仮想化&クラウドで活用!自動化ツールの基礎
環境構築自動化ツールのご紹介
Ad

Similar to Gluster fs and_swiftapi_20120429 (20)

PDF
Try andstudy cloud_20120509_nagoya
PDF
OSC2011Tokyo/Fall OpenStack Swift入門
PDF
クラウド開発に役立つ OSS あれこれ
PDF
20101029 open cloudcampus-1
PDF
CloudStack Ecosystem Day - OpenStack/Swift
PDF
AWSとGCPを使用したインフラ環境
PDF
OpenCloudCampus : Cloud Technologies Meeting (OpenStack)
PDF
「hbstudy#23 OpenStack祭!!」資料 ~OpenStackプロジェクトの全体像~
PDF
OpenStack Object Storage; Overview
PDF
cloudstack devcloud
PDF
Invitation to the Open Cloud Campus #osckansai 2011
PDF
OpenStack Updates
PDF
OpenStack API
PDF
Scalr hands on
PDF
Red Hat OpenShift Container Storage
PDF
試して学べるクラウド技術! OpenShift
PDF
Apache CloudStack 4.0 インストール(ver0.5)
PDF
OpenStack概要
PDF
分散ファイルストレージAPIのアーキテクチャについていろいろ考えてみた
PDF
OSC2013 Tokyo Spring OpenStack Overview
Try andstudy cloud_20120509_nagoya
OSC2011Tokyo/Fall OpenStack Swift入門
クラウド開発に役立つ OSS あれこれ
20101029 open cloudcampus-1
CloudStack Ecosystem Day - OpenStack/Swift
AWSとGCPを使用したインフラ環境
OpenCloudCampus : Cloud Technologies Meeting (OpenStack)
「hbstudy#23 OpenStack祭!!」資料 ~OpenStackプロジェクトの全体像~
OpenStack Object Storage; Overview
cloudstack devcloud
Invitation to the Open Cloud Campus #osckansai 2011
OpenStack Updates
OpenStack API
Scalr hands on
Red Hat OpenShift Container Storage
試して学べるクラウド技術! OpenShift
Apache CloudStack 4.0 インストール(ver0.5)
OpenStack概要
分散ファイルストレージAPIのアーキテクチャについていろいろ考えてみた
OSC2013 Tokyo Spring OpenStack Overview

More from Etsuji Nakai (20)

PDF
PRML11.2-11.3
PDF
「ITエンジニアリングの本質」を考える
PDF
Googleのインフラ技術に見る基盤標準化とDevOpsの真実
PDF
Introducton to Convolutional Nerural Network with TensorFlow
PDF
Googleにおける機械学習の活用とクラウドサービス
PDF
Spannerに関する技術メモ
PDF
Googleのインフラ技術から考える理想のDevOps
PDF
A Brief History of My English Learning
PDF
TensorFlowプログラミングと分類アルゴリズムの基礎
PDF
TensorFlowによるニューラルネットワーク入門
PDF
Lecture note on PRML 8.2
PDF
Machine Learning Basics for Web Application Developers
PDF
Your first TensorFlow programming with Jupyter
PDF
Deep Q-Network for beginners
PDF
Life with jupyter
PDF
TensorFlowで学ぶDQN
PDF
DevOpsにおける組織に固有の事情を どのように整理するべきか
PDF
PRML7.2
PDF
インタークラウドを実現する技術 〜 デファクトスタンダードからの視点 〜
PDF
Exploring the Philosophy behind Docker/Kubernetes/OpenShift
PRML11.2-11.3
「ITエンジニアリングの本質」を考える
Googleのインフラ技術に見る基盤標準化とDevOpsの真実
Introducton to Convolutional Nerural Network with TensorFlow
Googleにおける機械学習の活用とクラウドサービス
Spannerに関する技術メモ
Googleのインフラ技術から考える理想のDevOps
A Brief History of My English Learning
TensorFlowプログラミングと分類アルゴリズムの基礎
TensorFlowによるニューラルネットワーク入門
Lecture note on PRML 8.2
Machine Learning Basics for Web Application Developers
Your first TensorFlow programming with Jupyter
Deep Q-Network for beginners
Life with jupyter
TensorFlowで学ぶDQN
DevOpsにおける組織に固有の事情を どのように整理するべきか
PRML7.2
インタークラウドを実現する技術 〜 デファクトスタンダードからの視点 〜
Exploring the Philosophy behind Docker/Kubernetes/OpenShift

Gluster fs and_swiftapi_20120429

  • 2. 試して学べるクラウド技術! 自己紹介  中井悦司(なかいえつじ) – Twitter @enakai00  日々の仕事 – Senior Solution Architect and Cloud Evangelist at Red Hat K.K. 企業システムでオープンソースの活用を希望される お客様を全力でご支援させていただきます。 第3弾鋭意制作中  昔とった杵柄 – 素粒子論の研究(超弦理論とか) – 予備校講師(物理担当) – インフラエンジニア(Unix/Linux専門) Open Cloud Campus
  • 4. GlusterFSの特徴  コモディティ・ハードウェアを利用して、スケールアウト型の分散ファイルシス テムを構築するソフトウェア – サーバを追加していくことで、ストレージの容量を増やしていける。 – 同時アクセスするクライアントが増えてもパフォーマンスの劣化が少ない。 クラウドプロバイダがクラウド内部  Linuxが動くところならどこでも利用可能 のストレージ領域として使用 – データセンターの物理サーバ/仮想マシン – クラウド上の仮想マシン クラウドユーザがクラウド上にプラ イベートな大容量ストレージを用意  複数のAPIでアクセスが可能 – Currentバージョン(v3.2.5)では、FUSEマウントとNFSに対応 – v3.3以降で、REST(OpenStack SWIFT互換)、Hadoop MapReduce API(HDFSの代替)などを実装予定 → ユーザ・アプリケーションがRESTで保存したファイルをHadoopでバッチ処理する   などの連係が可能になります! Open Cloud Campus
  • 5. GlusterFSとRed Hat Storageの関係  GlusterFSは、コミュニティメンバーによるオープンソースプロジェクトとして開発を継続 します。 GlusterFS Advisory Board Member (as of 2012/04) Richard Wareing, Storage Engineer, Facebook Jeff Darcy, Filesystem Engineer, Red Hat; Founder, HekaFS Project AB Periasamy, Co-Founder, GlusterFS project Ewan Mellor, Xen Engineer, Citrix; Core contributor, OpenStack project David Nalley, CloudStack Community Manager, Citrix; Member, Fedora Advisory Board Louis Zuckerman, Sr. System Administrator, Picture Marketing Joe Julian, Sr. System Administrator, Ed Wyse Beauty Products Greg DeKoenigsberg, Community VP, Eucalyptus; co-founder, Fedora project John Mark Walker, Gluster.org Community Guy (Chair)  Red Hat Storageは、コミュニティ版の GlusterFSをアップストリームとする安定版 GlusterFS に、RHEL/XFS/機能拡張モジュールなどを組 み合わせたソフトウェアアプライアンスとし て提供されます。 Red Hat Storage Open Cloud Campus
  • 6. Red Hat Storage / GlusterFSのアーキテクチャ Open Cloud Campus
  • 9. メタデータノードを持たない分散アーキテクチャ  分散ストレージを構成する各ノードの通常のファイルシステムをバックエンドデバイスとし て使用します。 – GlusterFSに保存したファイルの実体は、どこかのノードのファイルシステムに保存されます。  ファイル名のハッシュ計算で保存するノードを決定します。 – 各ファイルの保存ノードの情報を別途、どこかにメタデータとして保存しておく必要がありません。 GlusterFSクライアント クライアントからは 1つのファイルシステムに見える 実際には各ノードのファイルシステムに 分散して保存されている file01, file02, file03 ボリューム ・・・ GlusterFSクラスタ file01 file02 file03 Open Cloud Campus
  • 10. ボリュームの構成例 node01 node02 node03 node04 GlusterFSクラスタ ファイル単位で各ブリックに分散保存 /brick01 /brick01 /brick01 /brick01 (1つのファイルはどれか1つのブリックに存在) ストライピング /brick02 /brick02 /brick02 /brick02 1つのファイルを各ブリックに分散保存 レプリケーション レプリケーション node01-node02、node03-node04で /brick03 /brick03 /brick03 /brick03 それぞれレプリケーション ストライピング レプリケーション レプリケーション レプリケーションとストライピングの /brick04 /brick04 /brick04 /brick04 組み合わせ Open Cloud Campus
  • 12. SwiftAPI使用時の構成例  ProxyサーバはGlusterFSサーバに同居することも可能です。  複数Proxyによるロードバランスも可能です。 – ロードバランサ機能は別途、DNS Round-Robinなどを使用する必要があります。  認証機能は、現在は、TempAuthのみに対応しています。 – TempAuthで定義する「アカウント」ごとに個別のボリュームを使用します。 Client Proxy with TempAuth proxy01 proxy02 GlusterFS Client rhs20-01 rhs20-02 ・・・ GlusterFS Servers ※ 具体的な構成手順はこちらを参照 http://bit.ly/IpqxfH Open Cloud Campus
  • 13. 主な設定項目 # cat /etc/swift/proxy-server.conf [DEFAULT]  複数Proxyサーバを使用する際は、 bind_port = 8080 user = root proxy-server.confを共有ボリュー log_facility = LOG_LOCAL1 ム上に置くことで、ユーザ情報の bind_port = 443 cert_file = /etc/swift/cert.crt 共有が可能です。 key_file = /etc/swift/cert.key [pipeline:main]  さらに、memcache_serversを共有 pipeline = healthcheck cache tempauth proxy-server することで、Proxyサーバ間で発行 済Tokenの情報も共有可能です。 [app:proxy-server] use = egg:swift#proxy – この方法に変なトラップがないかは allow_account_management = true 未確認です。自己責任でご使用くだ account_autocreate = true さい。 [filter:tempauth] use = egg:swift#tempauth #user_<account>_<user name> = <password> [.admin] user_vol01_admin = pas01admin .admin user_vol01_user01 = pas01user01 user_vol02_admin = pas02admin .admin user_vol02_user01 = pas02user01 [filter:healthcheck] use = egg:swift#healthcheck [filter:cache] use = egg:swift#memcache memcache_servers = proxy01:11211,proxy02:11211 Open Cloud Campus
  • 14. 使用例 (1)  GETで認証Tokenを取得(proxy01に接続) # curl -v -H 'X-Storage-User: vol01:admin' -H 'X-Storage-Pass:pas01admin' -k https://proxy01:443/auth/v1.0 * About to connect() to proxy01 port 443 (#0) * Trying 192.168.122.20... connected * Connected to proxy01 (192.168.122.20) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * warning: ignoring value of ssl.verifyhost * skipping SSL peer certificate verification * SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA * Server certificate: * subject: CN=Swift API,ST=Tokyo,C=JP * start date: 4月 29 11:55:08 2012 GMT * expire date: 4月 05 11:55:08 2112 GMT * common name: Swift API * issuer: CN=Swift API,ST=Tokyo,C=JP > GET /auth/v1.0 HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2 > Host: proxy01 > Accept: */* > X-Storage-User: vol01:admin > X-Storage-Pass:pas01admin > < HTTP/1.1 200 OK < X-Storage-Url: https://127.0.0.1:443/v1/AUTH_vol01 < X-Storage-Token: AUTH_tk9c43dc9ea78a4c77aa369545ce99510a < X-Auth-Token: AUTH_tk9c43dc9ea78a4c77aa369545ce99510a < Content-Length: 0 < Date: Sun, 29 Apr 2012 12:33:57 GMT < * Connection #0 to host proxy01 left intact * Closing connection #0 Open Cloud Campus
  • 15. 使用例 (2)  PUTでコンテナを作成(あえてproxy02に接続) # TOKEN=AUTH_tk9c43dc9ea78a4c77aa369545ce99510a # curl -v -X PUT -H "X-Auth-Token: $TOKEN" https://proxy02:443/v1/AUTH_vol01/container01 -k * About to connect() to proxy02 port 443 (#0) * Trying 192.168.122.23... connected * Connected to proxy02 (192.168.122.23) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * warning: ignoring value of ssl.verifyhost * skipping SSL peer certificate verification * SSL connection using TLS_RSA_WITH_AES_256_CBC_SHA * Server certificate: * subject: CN=Swift API,ST=Tokyo,C=JP * start date: 4月 29 11:55:16 2012 GMT * expire date: 4月 05 11:55:16 2112 GMT * common name: Swift API * issuer: CN=Swift API,ST=Tokyo,C=JP > PUT /v1/AUTH_vol01/container01 HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2 > Host: proxy02 > Accept: */* > X-Auth-Token: AUTH_tk9c43dc9ea78a4c77aa369545ce99510a > < HTTP/1.1 201 Created < Content-Length: 18 < Content-Type: text/html; charset=UTF-8 < Date: Sun, 29 Apr 2012 12:35:40 GMT < 201 Created * Connection #0 to host proxy02 left intact * Closing connection #0 Open Cloud Campus
  • 16. 使用例 (3)  swiftコマンドでコンテナの状態を確認 # swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin stat container01 Account: AUTH_vol01 Container: container01 Objects: 0 Bytes: 0 Read ACL: Write ACL: Sync To: Sync Key: Accept-Ranges: bytes # swift -A https://proxy02/auth/v1.0 -U vol01:admin -K pas01admin stat container01 Account: AUTH_vol01 Container: container01 Objects: 0 Bytes: 0 Read ACL: Write ACL: Sync To: Sync Key: Accept-Ranges: bytes Open Cloud Campus
  • 17. 使用例 (4)  swiftコマンドでファイルをアップロード # swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin upload container01 file01 File01 # swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin list container01 file01 # df Filesystem 1K-ブロック 使用 使用可 使用% マウント位置 /dev/vda2 4031680 2929808 897072 77% / /dev/vda1 198337 26436 161661 15% /boot tmpfs 510420 0 510420 0% /dev/shm /dev/vda5 3505520 72504 3254944 3% /data rhs20-01:/config_vol 7582848 2968576 4409472 41% /mnt/config rhs20-01:vol01 7582848 2968576 4409472 41% /mnt/gluster-object/AUTH_vol01 # ls -l /mnt/gluster-object/AUTH_vol01/container01/ 合計 12 -rw-------. 1 root root 43 4月 29 12:38 2012 file01 Open Cloud Campus
  • 18. 使用例 (5)  フルパス指定でファイルをアップロードしてみると・・・ # swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin upload container01 /boot/vmlinuz-2.6.32- 220.7.1.el6.x86_64 boot/vmlinuz-2.6.32-220.7.1.el6.x86_64 # swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin list container01boot boot/vmlinuz-2.6.32-220.7.1.el6.x86_64 file01 # ls -lR /mnt/gluster-object/AUTH_vol01/container01/ /mnt/gluster-object/AUTH_vol01/container01/: 合計 12 drwxr-xr-x. 2 root root 4142 4月 29 12:39 2012 boot -rw-------. 1 root root 43 4月 29 12:38 2012 file01 /mnt/gluster-object/AUTH_vol01/container01/boot: 合計 3852 -rw-------. 1 root root 3941424 4月 29 12:39 2012 vmlinuz-2.6.32-220.7.1.el6.x86_64 Open Cloud Campus
  • 20. Red Hat and OpenStack Announcement FAQ http://red.ht/INq08F  What is being announced today? – OpenStack is moving to a new foundation governance model, and Red Hat is joining that foundation as a Platinum Member.  What is the OpenStack Foundation? – The OpenStack Foundation is a new governance body for maintaining the OpenStack project. This foundation ensures that OpenStack will have an open and broad leadership community and reinforces the traditional open source values of meritocracy and community.  What has been Red Hat's previous involvement with OpenStack? – Red Hat has already become one of the top code contributors to OpenStack in the open source community, with Red Hat engineers working across many aspects of the project. Additionally, Red Hat has been leading packaging and distribution efforts around the OpenStack code base. For example, Fedora 16 included OpenStack as one of its key features.  Is Red Hat going to introduce an OpenStack-based product? – Yes, Red Hat is planning to introduce an enterprise distribution of OpenStack. However, we are not announcing any specific product plans right now. Open Cloud Campus
  • 21. オープンクラウド・キャンパス みなさんもGlusterFS /SwiftAPIをお試しください 中井悦司 Twitter @enakai00