Spectrum Scale - OpenStackへの扉 その4
実際にS3でアクセスしてみる
一通りの設定ができたので実際にS3でScaleをアクセスしてみる。
念の為projectを確認する。
[root@s3group1 work]# openstack project list
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| d297b07b7ef044b3b8c89a2071cdb491 | admin |
| b8f1a4a6c40d4e90bfc7a57ed09674bf | service |
+----------------------------------+---------+
Access KeyとSecret Keyを、project/user = service/user1で取得する。
[root@s3group1 work]# openstack ec2 credentials create --project service --user user1
+------------+-----------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------+-----------------------------------------------------------------------------------------------------------------------------------+
| access | 3095037eb75e4a9cbd9b00cbe2dc7b89 |
| links | {u'self': u'http://s3group1:35357/v3/users/46c2a1e3bbcc418797d85f78725e5881/credentials/OS-EC2/3095037eb75e4a9cbd9b00cbe2dc7b89'} |
| project_id | b8f1a4a6c40d4e90bfc7a57ed09674bf |
| secret | 94e95d72e5fb4580b22e040617e2d663 |
| trust_id | None |
| user_id | 46c2a1e3bbcc418797d85f78725e5881 |
+------------+-----------------------------------------------------------------------------------------------------------------------------------+
[root@s3group1 work]#
取得したKeysは以下の方法で確認することができる。ただし、どのuserのものかはopenstack user listを参照しないとわからない。
[root@s3group1 work]# openstack ec2 credentials list
+----------------------------------+----------------------------------+----------------------------------+----------------------------------+
| Access | Secret | Project ID | User ID |
+----------------------------------+----------------------------------+----------------------------------+----------------------------------+
| 3095037eb75e4a9cbd9b00cbe2dc7b89 | 94e95d72e5fb4580b22e040617e2d663 | b8f1a4a6c40d4e90bfc7a57ed09674bf | 46c2a1e3bbcc418797d85f78725e5881 |
+----------------------------------+----------------------------------+----------------------------------+----------------------------------+
[root@s3group1 work]#
Proxy-server.confのなかのswift3を確認する。
[root@s3group1 work]# mmobj conf list --ccrfile proxy-server.conf --section filter:swift3
use = egg:swift3#swift3
s3_acl = true
allow_no_owner = true
dns_compliant_bucket_names = fales
[root@s3group1 work]#
チェックする理由は以下の通り:IBM KC
Container or objects created using the swift API are not accessible through S3 API when the allow_no_owner configuration flag is set to false in proxy-server.conf. To change this setting, you can use the following command:
# mmobj config change --ccrfile proxy-server.conf --section filter:swift3 --property allow_no_owner --value true
The default value of the allow_no_owner configuration flag is true.
S3curlを使ってS3アクセスを試みる。まずはhttps://github.com/rtdp/s3curlからzipをダウンロードし解凍する。
[root@s3group1 work]# unzip s3curl-master.zip
Archive: s3curl-master.zip
6049d159e9b9af9f47ee235f6ff23b7084d0e7b8
creating: s3curl-master/
inflating: s3curl-master/LICENSE.txt
inflating: s3curl-master/NOTICE.txt
inflating: s3curl-master/README
inflating: s3curl-master/s3curl.pl
READEにならって.3curlを以下内容で作成する。
[root@s3group1 s3curl-master]# vi .s3curl
[root@s3group1 s3curl-master]# cat .s3curl
%awsSecretAccessKeys = (
# personal account
user1 => {
id => '3095037eb75e4a9cbd9b00cbe2dc7b89',
key => '94e95d72e5fb4580b22e040617e2d663',
},
);
モードを以下の通り変更。実際、変更していないとs3curlがエラーとなる。
[root@s3group1 s3curl-master]# chmod 0600 .s3curl
実行してみるとDigest/HMAC_SHA1.pmが無いと怒られた。
[root@s3group1 s3curl-master]# ./s3curl.pl --id user1 -- -s http://s3group1:8080/ | xmllint --format -
Can't locate Digest/HMAC_SHA1.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./s3curl.pl line 20.
BEGIN failed--compilation aborted at ./s3curl.pl line 20.
-:1: parser error : Document is empty
そこで以下をインストールする。
[root@s3group1 s3curl-master]# yum install perl-Digest-HMAC.noarch -y
実行してみるとエラーになる。なんだろう。。。。
[root@s3group1 s3curl-master]# ./s3curl.pl --id user1 -- -s http://s3group1:8080/ | xmllint --format -
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>AccessDenied</Code>
<Message>AWS authentication requires a valid Date or x-amz-date header</Message>
<RequestId>tx732e989c07fd461dbdafe-005e889442</RequestId>
</Error>
ここは本質ではない(Scale S3のテストがしたいだけ)ので、aws cliを試してみる。まずは構成情報の設定から。
[root@s3group1 s3curl-master]# aws configure
AWS Access Key ID [None]: 3095037eb75e4a9cbd9b00cbe2dc7b89
AWS Secret Access Key [None]: 94e95d72e5fb4580b22e040617e2d663
Default region name [None]:
Default output format [None]:
実行すると、こちらもエラーになる。なんだろう。。。。
[root@s3group1 s3curl-master]# aws --endpoint-url http://192.168.1.108:8080 s3 ls s3://bucket01
An error occurred (SignatureDoesNotMatch) when calling the ListObjectsV2 operation: The request signature we calculated does not match the signature you provided. Check your key and signing method.
[root@s3group1 s3curl-master]#
ジタバタしても始まらないので、もうひとつの方法としてWindows PCからCloudBerry S3 Explorerでアクセスしてみた。
Service pointにポート番号8080を付けるのを忘れないように。
これはうまくいった。
なんだかすっきりしないけれども、とりあえずS3でScaleがアクセスできることを確認できた。
« Spectrum Scale - OpenStackへの扉 その3 | トップページ | Spectrum Scale - Unified Accessまとめ »
「ソフトウエア導入」カテゴリの記事
- 非Windows11対応PCをWindows11にアップグレードする方法(2023.03.21)
- ThonnyでPicoのVersion upで SSL: CERTIFICATE_VERIFY_FAILED, certificate has expired にハマった件(2022.11.23)
- UI-VIEW32のオリジナルマップの作製(2022.11.22)
- APRS I-Gateの設置(2022.11.15)
- PCIe dual serial port adapterドライバーCH38XDRV.ZIPのWindows11へのインストール(2022.11.13)
« Spectrum Scale - OpenStackへの扉 その3 | トップページ | Spectrum Scale - Unified Accessまとめ »
コメント