Contenu connexe Similaire à Gluster fs and_swiftapi_20120429 Similaire à Gluster fs and_swiftapi_20120429 (20) Plus de Etsuji Nakai (20) Gluster fs and_swiftapi_201204292. 試して学べるクラウド技術!
自己紹介
中井悦司(なかいえつじ)
– 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
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
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