Ceph RADOSGW Installation Configuration

Source: Internet
Author: User

Ceph RADOSGW Object Storage interface, research configuration for a long time, now share the following. The prerequisite for configuring RADOSGW first is that you have successfully configured the Ceph cluster to view the Ceph cluster through Ceph–s, in the health state. Here, the auth configuration of the Ceph cluster is none, so the configuration of the Auth section, that is, the access rights-related keying section, is omitted here.

1) Create RGW-related pool
Ceph OSD Pool Create. RGW 128 128
Ceph OSD Pool Create. Rgw.root 128 128
Ceph OSD Pool Create. Rgw.control 128 128
Ceph OSD Pool Create. RGW.GC 128 128
Ceph OSD Pool Create. Rgw.buckets 128 128
Ceph OSD Pool Create. Rgw.buckets.index 128 128
Ceph OSD Pool Create. Log 128 128
Ceph OSD Pool Create. Intent-log 128 128
Ceph OSD Pool Create. Usage 128 128
Ceph OSD Pool Create. Users 128 128
Ceph OSD Pool Create. Users.email 128 128
Ceph OSD Pool Create. Users.swift 128 128
Ceph OSD Pool Create. USERS.UID 128 128

2) configuration ceph.conf
This configuration is configured to add a RADOWGW configuration to the ceph.conf. ADOSGW has two ways, one is directly in the Civetweb way, its built-in a relatively small HTTP server mongoose, this way is relatively simple, do not need to configure the Apache httpd server, the configuration is as follows:

[Client.radosgw.gateway]
Host = Node1
Log file =/var/log/ceph/client.radosgw.gateway.log
Rgw_frontends =civetweb port=80
RGW Print continue = False
In particular, civetweb default port is 7480, here because with S3cmd, so instead of 80

Another way is the Apache httpd + factcgi, which is configured as follows:
[Client.radosgw.gateway]
Host = Node1
Log file =/var/log/ceph/client.radosgw.gateway.log
RGW Frontends = fastcgi socket_port=9000 socket_host=0.0.0.0
RGW Print continue = False

Note that the node1 here are replaced by your own server.
3) Start RADOSGW
Radosgw-c/etc/ceph/ceph.conf-n Client.radosgw.gateway
If there is an error, you can view the log/var/log/ceph/client.radosgw.gateway.log prompt and do the appropriate processing.

4) configuration httpd
This step, if used is the Civetweb way, can be omitted.

Add files to/ETC/HTTPD/CONF.D rgw.conf

<virtualhost *:80>  servername   182.92.171.199 documentroot  /var/www/html errorlog /var/log/httpd/rgw_error.logCustomLog /var/log/httpd/rgw_access.log combinedRewriteEngine   on   Rewriterule  . *- [e=http_authorization:%{http:authorization},l]  setenv   proxy-nokeepalive 1 proxypass /Fcgi://182.92.171.199:9000/</VirtualHost   

So here servername is the HTTP server name, if there are multiple IP cases, it is best to directly write IP, here the Proxypass fcgi need to be changed to the IP and port configured in ceph.conf

5) Start httpd server
This step, if used is the Civetweb way, can omit
Service httpd Restart

6) Create a user
Radosgw-admin user create–uid=cephtest–display-name= "Ceph test" –[email protected]
Show:
{"user_id": "Cephtest",
"Display_name": "Ceph Test",
"Email": "[email protected]",
"Suspended": 0,
"Max_buckets": 1000,
"Auid": 0,
"Subusers": [],
"Keys": [
{"User": "Cephtest",
"Access_key": "8jgtp1714jrraprdlbi4",
"Secret_key": "I4o+yjmnii87rulmwciiybjlmkiuaoso1svqoob9"}],
"Swift_keys": [],
"Caps": [],
"Op_mask": "Read, Write, delete",
"Default_placement": "",
"Placement_tags": [],
"Bucket_quota": {"Enabled": false,
"MAX_SIZE_KB":-1,
"Max_objects":-1},
"User_quota": {"Enabled": false,
"MAX_SIZE_KB":-1,
"Max_objects":-1},
"Temp_url_keys": []}
Note: If there is "\" in the generated key, the user is finally deleted and regenerated until the "\" is not included:

7) configuration S3cmd
$vim ~/.s3cfg
[Default]
Access_key = ppa789f4w5anh3coc51o
Bucket_location = US
Cloudfront_host = cloudfront.amazonaws.com
Cloudfront_resource =/2010-07-15/distribution
Default_mime_type = Binary/octet-stream
delete_removed = False
Dry_run = False
encoding = UTF-8
Encrypt = False
Follow_symlinks = False
force = False
Get_continue = False
Gpg_command =/USR/BIN/GPG
Gpg_decrypt =% (gpg_command) s-d–verbose–no-use-agent–batch–yes–passphrase-fd% (PASSPHRASE_FD) S-o% (output_file) s% ( Input_file) s
Gpg_encrypt =% (gpg_command) s-c–verbose–no-use-agent–batch–yes–passphrase-fd% (PASSPHRASE_FD) S-o% (output_file) s% ( Input_file) s
Gpg_passphrase =
Guess_mime_type = True
Host_base = Node1
Host_bucket =% (bucket) s.node1
human_readable_sizes = False
LIST_MD5 = False
Log_target_prefix =
Preserve_attrs = True
Progress_meter = True
Proxy_host =
Proxy_port = 0
recursive = False
Recv_chunk = 4096
Reduced_redundancy = False
Secret_key = kqhlxni14wqsl0eh5akr73evrqmfzjfxyxumg04h
Send_chunk = 4096
Simpledb_host = sdb.amazonaws.com
skip_existing = False
Socket_timeout = 10
Urlencoding_mode = Normal
Use_https = False
verbosity = WARNING

Here, Access_key and Secret_key are radosgw-admin created by the user, or can be obtained with the following command.
Radosgw-admin User Info–uid=cephtest

8) Testing
First, use the command to check if the following HTTP servers are working correctly:
Curl Node
If correct, you should return:

<?xml version= "1.0" encoding= "UTF-8"?><listallmybucketsresult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <Owner><ID>Anonymous</ID><DisplayName></DisplayName></Owner><Buckets></Buckets></listallmybucketsresult>

If it is not correct, then the HTTP server has a problem. If it is an Apache HTTP server, then look at the server's configuration log to find the appropriate problem.
/etc/httpd/logs/rgw_error.log

The general questions are:
Proxy:FCGI:attempt to connect to 182.92.171.199:9000 (182.92.171.199) failed
If the display is not connected to fcgi, look at the following ceph.conf configuration:
RGW Frontends = fastcgi socket_port=9000 socket_host=0.0.0.0
Whether host and port are consistent.

If the above is not a problem, you can use the command
S3cmd LA
So the order is the list of all the buckets under the object

S3cmd MB S3://bucket to create a bucket, the problem is that you can only create buckets that are prefixed with buckets, which you don't know why, and need to be further researched and configured.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Ceph RADOSGW Installation Configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.