In this exercise, you will deploy a RADOS Gateway and verify client access.
Outcomes
You should be able to deploy a Ceph RADOS Gateway by using the Ceph orchestrator.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
[student@workstation ~]$ lab start object-radosgw
This command confirms that the hosts required for this exercise are accessible.
Procedure 8.1. Instructions
Log in to clienta as the admin user and use sudo to run the cephadm shell.
Verify the health of the cluster.
[student@workstation ~]$ssh admin@clienta[admin@clienta ~]$sudo cephadm shell[ceph: root@clienta /]#ceph healthHEALTH_OK
View the cluster services.
Verify that there are no rgw services running.
[ceph: root@clienta /]#ceph orch lsNAME RUNNING REFRESHED AGE PLACEMENT alertmanager 1/1 92s ago 2d count:1 crash 4/4 4m ago 2d * grafana 1/1 92s ago 2d count:1 mgr 4/4 4m ago 2d ...;servere.lab.example.com mon 4/4 4m ago 2d ...;servere.lab.example.com node-exporter 4/4 4m ago 2d * osd.default_drive_group 9/12 93s ago 2d server* prometheus 1/1 92s ago 2d count:1 [ceph: root@clienta /]#ceph orch ls --service-type rgwNo services reported
Create the rgw_service.yaml file.
Configure the service to start two RGW instances in each of the serverd and servere hosts.
The ports of the RGW instances must start from port 8080.
Your file should look like this example.
[ceph: root@clienta /]# cat rgw_service.yaml
service_type: rgw
service_id: myrealm.myzone
service_name: rgw.myrealm.myzone
placement:
count: 4
hosts:
- serverd.lab.example.com
- servere.lab.example.com
spec:
rgw_frontend_port: 8080Use the Ceph orchestrator to create an RGW service with the rgw_service.yaml file.
View the cluster and RGW service status.
Verify that there are two daemons per host.
Use Ceph orchestrator to create the RGW service with the rgw_service.yaml file.
[ceph: root@clienta /]# ceph orch apply -i rgw_service.yaml
Scheduled rgw.myrealm.myzone update...View the cluster status and find the status of the new RGW service daemons.
[ceph: root@clienta /]#ceph statuscluster: id: 2ae6d05a-229a-11ec-925e-52540000fa0c health: HEALTH_OK services: mon: 4 daemons, quorum serverc.lab.example.com,clienta,serverd,servere (age 4m) mgr: serverc.lab.example.com.aiqepd(active, since 10m), standbys: clienta.nncugs, serverd.klrkci osd: 9 osds: 9 up (since 8m), 9 in (since 9m)rgw: 4 daemons active (2 hosts, 1 zones)...output omitted...
Verify that the orchestrator created two running daemons per node.
[ceph: root@clienta /]# ceph orch ps --daemon-type rgw
NAME HOST STATUS REFRESHED AGE PORTS ...
rgw.myrealm.myzone.serverd.tknapl serverd.lab.example.com running (14s) 0s ago 14s *:8080 ...
rgw.myrealm.myzone.serverd.xpabfe serverd.lab.example.com running (6s) 0s ago 6s *:8081 ...
rgw.myrealm.myzone.servere.lwusbq servere.lab.example.com running (18s) 0s ago 17s *:8080 ...
rgw.myrealm.myzone.servere.uyginy servere.lab.example.com running (10s) 0s ago 10s *:8081 ...Log in to the serverd node and view the running containers.
Filter the running container processes to find the RGW container.
Verify that the Beast embedded web server is accessible on port 8080 and also on port 8081.
Exit the cephadm shell.
Log in to serverd as the admin user and switch to the root user.
List the running containers, filtered to find the RGW container.
[ceph: root@clienta /]#exit[admin@clienta ~]$ssh admin@serverdadmin@serverd's password:redhat...output omitted... [admin@serverd ~]$sudo -i[root@serverd ~]#podman ps -a --format "{{.ID}} {{.Names}}" | grep rgw7e99b444305d ceph-2ae6d05a-229a-11ec-925e-52540000fa0c-rgw-myrealm-myzone-serverd-xpabfe dba722fb413c ceph-2ae6d05a-229a-11ec-925e-52540000fa0c-rgw-myrealm-myzone-serverd-tknapl
Verify that the Beast embedded web server is accessible on port 8080, and also on port 8081.
If the gateway is working, you will receive a tagged response.
[root@serverd ~]#curl http://serverd:8080<?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> [root@serverd ~]#curl http://serverd:8081<?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>
Return to workstation as the student user.
[root@serverd ~]#exit[admin@serverd ~]$exit[admin@clienta ~]$exit[student@workstation ~]$
This concludes the guided exercise.