This article applies to JEWEL above (including)
The software versions used in this article are as follows
Ceph :version 10.2.7 OS: Linux 3.16.0-4-AMd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09) x86_64 GNU/LinuxCopy the code
1 the new pool
To create data pools, pay attention to the PG configuration plan for each pool. For details, see ceph.com/pgcalc/
ceph osd pool create .rgw.root 16 16 ceph osd pool create demo.rgw.data.root 16 16 ceph osd pool create demo.rgw.control 16 16 ceph osd pool create demo.rgw.gc 16 16 ceph osd pool create demo.rgw.log 16 16 ceph osd pool create demo.rgw.intent-log 16 16 ceph osd pool create demo.rgw.usage 16 16 ceph osd pool create demo.rgw.users.keys 16 16 ceph osd pool create demo.rgw.users.email 16 16 ceph osd pool create demo.rgw.users.swift 16 16 ceph osd pool create demo.rgw.users.uid 16 16 ceph osd pool create demo.rgw.buckets.index 16 16 ceph osd pool create demo.rgw.buckets.data 64 64 ceph osd pool create demo.rgw.buckets.non-ec 16 16Copy the code
2 Prepare the configuration file
Ceph. Conf configuration
[client.radosgw.us-zone1]
rgw dns name = s3.ceph.work
rgw frontends = "civetweb port=80"
host = radosgw-1
keyring = /etc/ceph/ceph.client.radosgw.keyring
rgw socket path = /home/ceph/var/run/ceph-client.radosgw.us-zone1.sock
log file = /home/ceph/log/radosgw.us-zone1.log
rgw print continue = false
rgw content length compat = true
Copy the code
Zone configuration
# zone.json { "id": "2f58efaa-3fa2-48b2-b996-7f924ae1215c", "name": "demo", "domain_root": "demo.rgw.data.root", "control_pool": "demo.rgw.control", "gc_pool": "demo.rgw.gc", "log_pool": "demo.rgw.log", "intent_log_pool": "demo.rgw.intent-log", "usage_log_pool": "demo.rgw.usage", "user_keys_pool": "demo.rgw.users.keys", "user_email_pool": "demo.rgw.users.email", "user_swift_pool": "demo.rgw.users.swift", "user_uid_pool": "demo.rgw.users.uid", "system_key": { "access_key": "", "secret_key": "" }, "placement_pools": [ { "key": "default-placement", "val": { "index_pool": Data_buckets = "data_buckets"; data_buckets = "data_buckets"; "demo.rgw.buckets.non-ec", "index_type": 0 } } ], "metadata_heap": "", "realm_id": "" }Copy the code
Zonegroup configuration
#zonegroup. Json {"id": "9d07fb3C-45d7-4d63-a475-fd6ebd41b722 ", #zonegroup name" api_name": "Is_master ": "true"," endPoints ": [], "hostNames ": []," hostNames_s3Website ": [], "master_zone": "2f58EFAa-3fa2-b996-7f924AE1215C ", #zone ID: [{" ID ": Endpoints: [], "endpoints": [], "log_meta": "false", "log_data": "false", "bucket_index_max_shards": 0, "read_only": "false" } ], "placement_targets": [ { "name": "default-placement", "tags": [] } ], "default_placement": "default-placement", "realm_id": "" }Copy the code
3 Import the configuration file
Radosgw-admin realm create --rgw-realm=nt --default # Create a realm named nt radosgw-admin zonegroup set < zonegroup.json --rgw-realm=nt -- rgw-zoneGroup =zg --default Json --rgw-zonegroup=zg --rgw-zone=demo --master --default The zone name is demo /etc/init.d/radosgw start # Start the serviceCopy the code
4 verify
A new user
radosgw-admin user create --uid=s3user --display-name=s3user
Copy the code
ceph df
GLOBAL:
SIZE AVAIL RAW USED %RAW USED
92114M 88985M 3128M 3.40
POOLS:
NAME ID USED %USED MAX AVAIL OBJECTS
.rgw.root 73 2072 0 88558M 12
demo.rgw.data.root 74 609 0 88558M 2
demo.rgw.control 75 0 0 88558M 8
demo.rgw.gc 76 0 0 88558M 32
demo.rgw.log 77 50 0 88558M 128
demo.rgw.intent-log 78 0 0 88558M 0
demo.rgw.usage 79 0 0 88558M 0
demo.rgw.users.keys 80 13 0 88558M 1
demo.rgw.users.email 81 0 0 88558M 0
demo.rgw.users.swift 82 0 0 88558M 0
demo.rgw.users.uid 83 329 0 88558M 2
demo.rgw.buckets.index 84 0 0 88558M 1
demo.rgw.buckets.data 85 0 0 88558M 0
demo.rgw.buckets.non-ec 86 0 0 88558M 0
Copy the code
Demo.rgw. Users. Keys and demo.rgw.