Bookmark this page

Lab: Providing Object Storage Using a RADOS Gateway

In this lab, you will configure Ceph to provide object storage to clients.

Outcomes

You should be able to deploy and configure the Ceph RADOS Storage service.

As the student user on the workstation machine, use the lab command to prepare your system for this lab.

[student@workstation ~]$ lab start object-review

This command ensures that the lab environment is created and ready for the lab exercise.

Procedure 8.3. Instructions

  1. Log in to serverc as the admin user. Create a realm called prod and set it as the default. Create a master zone group called us-west with the endpoint set to http://serverc:8080. Set the zone group as the default.

    1. Log in to serverc as the admin user and use sudo to run the cephadm shell.

      [student@workstation ~]$ ssh admin@serverc
      [admin@serverc ~]$ sudo cephadm shell
      [ceph: root@serverc /]#
    2. Create a realm called prod and set it as the default.

      [ceph: root@serverc /]# radosgw-admin realm create --rgw-realm=prod --default
    3. Create a master zone group called us-west.

      [ceph: root@serverc /]# radosgw-admin zonegroup create --rgw-zonegroup=us-west \
        --endpoints=http://serverc:8080 --master --default
  2. Create a master zone called us-west-1 and set the endpoint to http://serverc:8080. Set the zone as the default. Use admin as the access key and secure as the secret key.

    [ceph: root@serverc /]# radosgw-admin zone create --rgw-zonegroup=us-west \
      --rgw-zone=us-west-1 --endpoints=http://serverc:8080 --master \
      --access-key=admin --secret=secure --default
  3. Create a system user called admin.user with admin as the access key and secure as the secret key.

    [ceph: root@serverc /]# radosgw-admin user create --uid="admin.user" --system \
      --display-name="Admin User" --access-key=admin --secret=secure
  4. Commit the configuration. Save the period ID value in the /home/admin/period-id.txt file on the serverc node. Do not include quotes, double quotes, or characters other than the period ID in UUID format.

    [ceph: root@serverc /]# radosgw-admin period update --commit
    [ceph: root@serverc /]# radosgw-admin period get-current
    {
        "current_period": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeee"
    }
    [ceph: root@serverc /]# exit
    [admin@serverc ~]$ cat /home/admin/period-id.txt
    aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeeee
  5. Deploy a RADOS Gateway service called prod-object with two instances running on port 8080, one on the serverc node and the second on the servere node.

    [admin@serverc ~]$ sudo cephadm shell
    [ceph: root@serverc /]# ceph orch apply rgw prod-object --realm=prod \
      --zone=us-west-1 --port 8080 \
      --placement="2 serverc.lab.example.com servere.lab.example.com"
  6. Return to workstation as the student user.

    [ceph: root@serverc /]# exit
    [admin@serverc ~]$ exit
    [student@workstation ~]$

Evaluation

Grade your work by running the lab grade object-review command from your workstation machine. Correct any reported failures and rerun the script until successful.

[student@workstation ~]$ lab grade object-review

Finish

On the workstation machine, use the lab command to complete this exercise. This is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish object-review

This concludes the lab.

Revision: cl260-5.0-29d2128