Testing the radosgw federated configuration

To test the federated configuration, we will first add some objects to the us-east zone via the radosgw instance, us-east-1, using Swift. Then, after the data synchronization between the us-east and us-west zones, we will access the same objects from the us-west zone via the us-west-1 gateway interface.

How to do it…

  1. For the us-east zone user, create a Swift subuser:
    # radosgw-admin subuser create --uid="us-east"  --subuser="us-east:swift" --access=full --name client.radosgw.us-east-1 --key-type swift --secret="7VJm8uAp71xKQZkjoPZmHu4sACA1SY8jTjay9dP5"
    # radosgw-admin subuser create --uid="us-east"  --subuser="us-east:swift" --access=full --name client.radosgw.us-west-1 --key-type swift --secret="7VJm8uAp71xKQZkjoPZmHu4sACA1SY8jTjay9dP5"
    
    How to do it…
  2. Similarly, for the us-west zone user, create the Swift subuser:
    # radosgw-admin subuser create --uid="us-west"  --subuser="us-west:swift" --access=full --name client.radosgw.us-east-1 --key-type swift --secret="AAJm8uAp71xKQZkjoPZmHu4sACA1SY8jTjay9dP5"
    # radosgw-admin subuser create --uid="us-west"  --subuser="us-west:swift" --access=full --name client.radosgw.us-west-1 --key-type swift --secret="AAJm8uAp71xKQZkjoPZmHu4sACA1SY8jTjay9dP5"
    
  3. Install the python-swift client on the us-east-1 and us-west-1 nodes:
    # yum install python-swift
    # yum install python-setuptools
    # easy_install pip
    # pip install --upgrade setuptools
    # pip install python-swiftclient
    
  4. Set up python-swiftclient on the us-east-1 node:
    # export ST_AUTH="http://us-east-1.cephcookbook.com:7480/auth/1.0"
    # export ST_KEY=7VJm8uAp71xKQZkjoPZmHu4sACA1SY8jTjay9dP5
    # export ST_USER=us-east:swift
    
  5. List and create some objects from the us-east-1 node:
    # swift list
    # swift  upload container-1 us.json
    # swift list
    # swift list container-1
    
    How to do it…
  6. Activate the data synchronization agent:
    # radosgw-agent -c cluster-data-sync.conf
    
  7. Once the data synchronization completes, try to access the objects from the us-west zone using the us-west-1 gateway instance. At this stage, the data should be accessible to you from the us-west-1 gateway instance:
    # export ST_AUTH="http://us-west-1.cephcookbook.com:7480/auth/1.0"
    # export ST_KEY=7VJm8uAp71xKQZkjoPZmHu4sACA1SY8jTjay9dP5
    # export ST_USER=us-east:swift
    # swift list
    
    How to do it…
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.93.12