Upload
etsuji-nakai
View
3.266
Download
2
Embed Size (px)
DESCRIPTION
Citation preview
中井悦司Twitter @enakai00
オープンクラウド・キャンパス
GlusterFSのSwiftAPIについて
(RH社のOpenStack Foundation参加についてもちらっと触れつつ)
Open Cloud Campus
試して学べるクラウド技術!
自己紹介
第3弾鋭意制作中
中井悦司(なかいえつじ)– Twitter @enakai00
日々の仕事– Senior Solution Architect and
Cloud Evangelist at Red Hat K.K.企業システムでオープンソースの活用を希望されるお客様を全力でご支援させていただきます。
昔とった杵柄– 素粒子論の研究(超弦理論とか)– 予備校講師(物理担当)– インフラエンジニア(Unix/Linux専門)
GlusterFSとは?
Open Cloud Campus
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をアップストリームとする安定版に、RHEL/XFS/機能拡張モジュールなどを組み合わせたソフトウェアアプライアンスとして提供されます。
GlusterFS
Red Hat Storage
Open Cloud Campus
Red Hat Storage / GlusterFSのアーキテクチャ
Open Cloud Campus
買収前のGluster社による公開事例 (1)
Open Cloud Campus
買収前のGluster社による公開事例 (2)
Open Cloud Campus
メタデータノードを持たない分散アーキテクチャ
分散ストレージを構成する各ノードの通常のファイルシステムをバックエンドデバイスとして使用します。
– GlusterFSに保存したファイルの実体は、どこかのノードのファイルシステムに保存されます。
ファイル名のハッシュ計算で保存するノードを決定します。– 各ファイルの保存ノードの情報を別途、どこかにメタデータとして保存しておく必要がありません。
file01 file02 file03
・・・ GlusterFSクラスタ
file01, file02, file03
GlusterFSクライアント
クライアントからは1つのファイルシステムに見える
実際には各ノードのファイルシステムに分散して保存されている
ボリューム
Open Cloud Campus
/brick01
/brick02
/brick03
/brick04
/brick01
/brick02
/brick03
/brick04
/brick01
/brick02
/brick03
/brick04
ボリュームの構成例
/brick01
/brick02
/brick03
/brick04
GlusterFSクラスタ
ファイル単位で各ブリックに分散保存(1つのファイルはどれか1つのブリックに存在)
node01-node02、node03-node04でそれぞれレプリケーション
1つのファイルを各ブリックに分散保存
レプリケーションレプリケーション
ストライピング
レプリケーションレプリケーション
ストライピング
レプリケーションとストライピングの組み合わせ
node01 node02 node03 node04
GlusterFSのSwiftAPI
Open Cloud Campus
SwiftAPI使用時の構成例
ProxyサーバはGlusterFSサーバに同居することも可能です。 複数Proxyによるロードバランスも可能です。
– ロードバランサ機能は別途、DNS Round-Robinなどを使用する必要があります。 認証機能は、現在は、TempAuthのみに対応しています。
– TempAuthで定義する「アカウント」ごとに個別のボリュームを使用します。
rhs20-01 rhs20-02
Proxy with TempAuthGlusterFS Client
Client
proxy01
GlusterFS Servers・・・
proxy02
※ 具体的な構成手順はこちらを参照http://bit.ly/IpqxfH
Open Cloud Campus
主な設定項目# cat /etc/swift/proxy-server.conf [DEFAULT]bind_port = 8080user = rootlog_facility = LOG_LOCAL1bind_port = 443cert_file = /etc/swift/cert.crtkey_file = /etc/swift/cert.key
[pipeline:main]pipeline = healthcheck cache tempauth proxy-server
[app:proxy-server]use = egg:swift#proxyallow_account_management = trueaccount_autocreate = true
[filter:tempauth]use = egg:swift#tempauth#user_<account>_<user name> = <password> [.admin]user_vol01_admin = pas01admin .adminuser_vol01_user01 = pas01user01user_vol02_admin = pas02admin .adminuser_vol02_user01 = pas02user01
[filter:healthcheck]use = egg:swift#healthcheck
[filter:cache]use = egg:swift#memcachememcache_servers = proxy01:11211,proxy02:11211
複数Proxyサーバを使用する際は、proxy-server.confを共有ボリューム上に置くことで、ユーザ情報の共有が可能です。
さらに、memcache_serversを共有することで、Proxyサーバ間で発行済Tokenの情報も共有可能です。
– この方法に変なトラップがないかは未確認です。自己責任でご使用ください。
Open Cloud Campus
使用例 (1)
# 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
GETで認証Tokenを取得(proxy01に接続)
Open Cloud Campus
使用例 (2)
# 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
PUTでコンテナを作成(あえてproxy02に接続)
Open Cloud Campus
使用例 (3)
# swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin stat container01 Account: AUTH_vol01Container: 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_vol01Container: container01 Objects: 0 Bytes: 0 Read ACL: Write ACL: Sync To: Sync Key: Accept-Ranges: bytes
swiftコマンドでコンテナの状態を確認
Open Cloud Campus
使用例 (4)
# swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin upload container01 file01File01
# swift -A https://proxy01/auth/v1.0 -U vol01:admin -K pas01admin list container01file01
# dfFilesystem 1K-ブロック 使用 使用可 使用% マウント位置/dev/vda2 4031680 2929808 897072 77% //dev/vda1 198337 26436 161661 15% /boottmpfs 510420 0 510420 0% /dev/shm/dev/vda5 3505520 72504 3254944 3% /datarhs20-01:/config_vol 7582848 2968576 4409472 41% /mnt/configrhs20-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
swiftコマンドでファイルをアップロード
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 container01bootboot/vmlinuz-2.6.32-220.7.1.el6.x86_64file01
# ls -lR /mnt/gluster-object/AUTH_vol01/container01//mnt/gluster-object/AUTH_vol01/container01/:合計 12drwxr-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
フルパス指定でファイルをアップロードしてみると・・・
RH社のOpenStack Foundation参加についてもちらっと触れつつ
Open Cloud Campus
Red Hat and OpenStack Announcement FAQ 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.
http://red.ht/INq08F
中井悦司Twitter @enakai00
オープンクラウド・キャンパス
みなさんもGlusterFS /SwiftAPIをお試しください