Configure the S3 client (s3cmd) on client-node1

Following commands are used for configuring s3cmd on the client-node1:

  1. Install s3cmd using the following command:
        # yum install s3cmd -y
  1. Configure s3cmd by providing the access_key and secret_key of the user, pratima, which we created earlier in this chapter. Execute the following command and follow the prompts:
        # s3cmd --configure

The s3cmd --configure command will create /root/.s3cfg.

  1. Edit this file for the RGW host details. Modify host_base and host_bucket, as shown. Make sure these lines do not have trailing spaces at the end:
        host_base = rgw-node1.cephcookbook.com:8080
host_bucket = %(bucket).rgw-node1.cephcookbook.com:8080
  1. Finally, we will create buckets and put objects into them:
        # s3cmd mb s3://first-bucket
# s3cmd ls
# s3cmd put /etc/hosts s3://first-bucket
# s3cmd ls s3://first-bucket