Cloud Ceph Classroom: Use Civetweb to build RGW quickly

Source: Internet
Author: User

Transferred from: https://www.ustack.com/blog/civetweb/

The excellent open source project is changing the traditional It,openstack name most loudly, has become the IaaS the fact standard. Ceph is also a great achievement, with its three storage interfaces to meet the diverse needs of the enterprise. Unitedstack has a cloud that combines the benefits of an open source project, such as OpenStack and Ceph, to build the world's best-performing OpenStack cloud service platform. In this process, Unitedstack cloud engineers have a lot of understanding and analysis of open source projects, we will continue to publish these content to share with you, hoping to help you get to know these projects faster, to avoid falling into those we have visited the pit. At the same time, we also hope that we can explore together for better code and architecture efforts.


This is the fourth of our Ceph series, with three ceph articles coming from the very top of the spectrum, and our Ceph series will continue to go deeper, hoping to bring help to those who are interested.

RGW currently supports the direct use of civetweb as a webserver to implement HTTP request acceptance and response without the need to configure complex fcgi and webserver.

1 Creating a storage pool
Confirm that your ceph cluster is functioning properly with the ceph-s command and that the cluster status is OK.
Run the following command to create the storage pool required by RGW:

Ceph OSD Pool Create. RGW 64 64
Ceph OSD Pool Create. Rgw.root 64 64
Ceph OSD Pool Create. Rgw.control 64 64
Ceph OSD Pool Create. RGW.GC 64 64
Ceph OSD Pool Create. Rgw.buckets 64 64
Ceph OSD Pool Create. Rgw.buckets.index 64 64
Ceph OSD Pool Create. Log 64 64
Ceph OSD Pool Create. Intent-log 64 64
Ceph OSD Pool Create. Usage 64 64
Ceph OSD Pool Create. Users 64 64
Ceph OSD Pool Create. Users.email 64 64
Ceph OSD Pool Create. Users.swift 64 64
Ceph OSD Pool Create. USERS.UID 64 64

2 configuration
Using Civetweb as the front end of the RGW is very simple, just add the following configuration items to the end of the ceph.conf:

[Client.radosgw.gateway]
Host = {Your-host-name}
Log file =/var/log/radosgw/client.radosgw.ustack.log
These three lines define a RADOSGW instance, called the gateway, and the running host is {your-hostname}, and it needs to be changed to the actual host name.
The "Log file" configuration entry represents the log path, and it is important to ensure that the parent path of the log file "/var/log/radosgw/" must exist and that RADOSGW is not created automatically, and you can use the

Mkdir-p/var/log/radosgw/
Create the path.

3 start
Start command:

Radosgw-c/etc/ceph/ceph.conf-n Client.radosgw.gateway
The-c parameter represents the configuration file path used, and-n indicates the name of the RADOSGW instance to start, which corresponds to the configuration file.

4 Use
Civetweb boot RADOSGW will listen on port 7480 by default. You can access the RGW object store directly by accessing http://your-host-ip:7480/.
You can use the Radosgw-admin command to access the RGW you have started, such as creating users, and so on.
You can also use the S3cmd command-line tool to access the RGW as a user, or to access RGW through the S3broswer graphical interface to perform actions such as uploading/downloading files.

About the author

Dr. Yuan Dong, vice president of Unitedstack products, is responsible for unitedstack products, pre-sales and foreign cooperation; cloud computing experts have a wealth of experience in cloud computing, virtualization, distributed systems and enterprise applications; for distributed storage, Unstructured data storage and storage virtualization has a deep understanding of the rich development and practical experience in cloud storage and enterprise storage, as well as core code contributors for open source storage projects such as Ceph.

Currently focused on the Ceph community.

Cloud Ceph Classroom: Use Civetweb to build RGW quickly

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.