Bootstrapping the Ceph Object Gateway realm creates a new realm entity, a new zonegroup,
and a new zone. The rgw module instructs the orchestrator to create and deploy the
corresponding Ceph Object Gateway daemons.
Before you begin
- A running IBM
Storage Ceph cluster.
About this task
Enable the rgw module by using the ceph mgr module enable rgw
command. Pass the arguments in the CLI or use the YAML specification file to bootstrap the
realm.
Procedure
- Log in to the Cephadm shell.
For example,
[root@host01 ~]# cephadm shell
- Enable the
rgw module.
ceph mgr module enable rgw
For
example,
[ceph: root@host01 /]# ceph mgr module enable rgw
- Bootstrap the Ceph Object Gateway realm by using either the CLI or the YAML specification
file.
- Use the command-line
interface.
ceph rgw realm bootstrap [--realm name REALM_NAME] [--zonegroup-name ZONEGROUP_NAME] [--zone-name ZONE_NAME] [--port PORT_NUMBER] [--placement HOSTNAME] [--start-radosgw]
For
example,
[ceph: root@host01 /]# ceph rgw realm bootstrap --realm-name myrealm --zonegroup-name myzonegroup --zone-name myzone --port 5500 --placement="host01 host02" --start-radosgw
Realm(s) created correctly. Please, use 'ceph rgw realm tokens' to get the token.
- Use YAML specification file.
- As a root user, create the YAML file:
rgw_realm: REALM_NAME
rgw_zonegroup: ZONEGROUP_NAME
rgw_zone: ZONE_NAME
placement:
hosts:
- HOSTNAME_1
- HOSTNAME_2
For
example,
[root@host01 ~]# cat rgw.yaml
rgw_realm: myrealm
rgw_zonegroup: myzonegroup
rgw_zone: myzone
placement:
hosts:
- host01
- host02
- You can add hostnames to the zonegroup during realm
bootstrap:
Syntax
service_type: rgw
placement:
hosts:
- host1
- host2
spec:
rgw_realm: my_realm
rgw_zonegroup: my_zonegroup
rgw_zone: my_zone
zonegroup_hostnames:
- hostname1
- hostname2
For example,
service_type: rgw
placement:
hosts:
- _host1_
- _host2_
spec:
rgw_realm: my_realm
rgw_zonegroup: my_zonegroup
rgw_zone: my_zone
zonegroup_hostnames:
- foo
- bar
- Mount the YAML file under a directory in the
container.
cephadm shell --mount rgw.yaml:/var/lib/ceph/rgw/rgw.yaml
For
example,
[root@host01 ~]# cephadm shell --mount rgw.yaml:/var/lib/ceph/rgw/rgw.yaml
- Bootstrap the realm.
Note: The specification file that is used by the
rgw module has the same format as the one used by the orchestrator. Therefore, you
can provide any orchestration supported Ceph Object Gateway parameters, including advanced
configuration features such as SSL
certificates.
ceph rgw realm bootstrap -i /var/lib/ceph/rgw/rgw.yaml
For
example,
[ceph: root@host01 /]# ceph rgw realm bootstrap -i /var/lib/ceph/rgw/rgw.yaml
- List the available tokens.
Note: If you run this command before the Ceph Object Gateway daemons are fully deployed,
a 'no tokens' message is displayed. This is because of no endpoints existing yet.
ceph rgw realm tokens | jq
For example,
[ceph: root@host01 /]# ceph rgw realm tokens | jq
[
{
"realm": "myrealm",
"token": "ewogICAgInJlYWxtX25hbWUiOiAibXlyZWFsbSIsCiAgICAicmVhbG1faWQiOiAiZDA3YzAwZWYtOTA0MS00ZjZlLTg4MDQtN2Q0MDI0MDU1NmFlIiwKICAgICJlbmRwb2ludCI6ICJodHRwOi8vdm0tMDA6NDMyMSIsCiAgICAiYWNjZXNzX2tleSI6ICI5NTY1VFZSMVFWTExFRzdVNFIxRCIsCiAgICAic2VjcmV0IjogImQ3b0FJQXZrNEdYeXpyd3Q2QVZ6bEZNQmNnRG53RVdMMHFDenE3cjUiCn1="
}
]
What to do next
- Verify the Ceph Object Gateway deployment.
For
example,
[ceph: root@host01 /]# ceph orch list --daemon-type=rgw
NAME HOST PORTS STATUS REFRESHED AGE MEM USE MEM LIM VERSION IMAGE ID CONTAINER ID
rgw.myrealm.myzonegroup.ceph-saya-6-osd-host01.eburst ceph-saya-6-osd-host01 *:80 running (111m) 9m ago 111m 82.3M - 17.2.6-22.el9cp 2d5b080de0b0 2f3eaca7e88e
- Verify the hostnames added via realm
bootstrap:
Syntax
radosgw-admin zonegroup get --rgw-zonegroup zone_group_name
For
example,
[ceph: root@host01 /]# radosgw-admin zonegroup get --rgw-zonegroup my_zonegroup
{
"id": "02a175e2-7f23-4882-8651-6fbb15d25046",
"name": "my_zonegroup_ck",
"api_name": "my_zonegroup_ck",
"is_master": true,
"endpoints": [
"http://vm-00:80"
],
"hostnames": [
"foo"
"bar"
],
"hostnames_s3website": [],
"master_zone": "f42fea84-a89e-4995-996e-61b7223fb0b0",
"zones": [
{
"id": "f42fea84-a89e-4995-996e-61b7223fb0b0",
"name": "my_zone_ck",
"endpoints": [
"http://vm-00:80"
],
"log_meta": false,
"log_data": false,
"bucket_index_max_shards": 11,
"read_only": false,
"tier_type": "",
"sync_from_all": true,
"sync_from": [],
"redirect_zone": "",
"supported_features": [
"compress-encrypted",
"resharding"
]
}
],
"placement_targets": [
{
"name": "default-placement",
"tags": [],
"storage_classes": [
"STANDARD"
]
}
],
"default_placement": "default-placement",
"realm_id": "439e9c37-4ddc-43a3-99e9-ea1f3825bb51",
"sync_policy": {
"groups": []
},
"enabled_features": [
"resharding"
]
}See the hostnames section of the zonegroup for the list of
hostnames. They are specified in zonegroup_hostnames in the Ceph Object Gateway
specification file.