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.
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"
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"
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
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
us-east-1
node:# swift list # swift upload container-1 us.json # swift list # swift list container-1
# radosgw-agent -c cluster-data-sync.conf
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
18.191.93.12