EOF
fi
-# Ganesha Daemons
-if [ $GANESHA_DAEMON_NUM -gt 0 ]; then
- pseudo_path="/cephfs"
- if [ "$cephadm" -gt 0 ]; then
- cluster_id="vstart"
- prun ceph_adm nfs cluster create $cluster_id
- prun ceph_adm nfs export create cephfs "a" $cluster_id $pseudo_path
- port="2049"
- else
- start_ganesha
- port="<ganesha-port-num>"
- fi
- echo "Mount using: mount -t nfs -o port=$port $IP:$pseudo_path mountpoint"
-fi
-
do_cache() {
while [ -n "$*" ]; do
p="$1"
}
do_hitsets $hitset
+do_rgw_create_bucket()
+{
+ # Create RGW Bucket
+ local rgw_python_file='rgw-create-bucket.py'
+ echo "import boto
+import boto.s3.connection
+
+conn = boto.connect_s3(
+ aws_access_key_id = '$s3_akey',
+ aws_secret_access_key = '$s3_skey',
+ host = '$HOSTNAME',
+ port = 80,
+ is_secure=False,
+ calling_format = boto.s3.connection.OrdinaryCallingFormat(),
+ )
+
+bucket = conn.create_bucket('nfs-bucket')
+print('created new bucket')" > "$CEPH_OUT_DIR/$rgw_python_file"
+ prun python $CEPH_OUT_DIR/$rgw_python_file
+}
+
do_rgw_create_users()
{
# Create S3 user
- local akey='0555b35654ad1656d804'
- local skey='h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q=='
+ s3_akey='0555b35654ad1656d804'
+ s3_skey='h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q=='
debug echo "setting up user testid"
- $CEPH_BIN/radosgw-admin user create --uid testid --access-key $akey --secret $skey --display-name 'M. Tester' --email tester@ceph.com -c $conf_fn > /dev/null
+ $CEPH_BIN/radosgw-admin user create --uid testid --access-key $s3_akey --secret $s3_skey --display-name 'M. Tester' --email tester@ceph.com -c $conf_fn > /dev/null
# Create S3-test users
# See: https://github.com/ceph/s3-tests
echo ""
echo "S3 User Info:"
- echo " access key: $akey"
- echo " secret key: $skey"
+ echo " access key: $s3_akey"
+ echo " secret key: $s3_skey"
echo ""
echo "Swift User Info:"
echo " account : test"
do_rgw
fi
+# Ganesha Daemons
+if [ $GANESHA_DAEMON_NUM -gt 0 ]; then
+ pseudo_path="/cephfs"
+ if [ "$cephadm" -gt 0 ]; then
+ cluster_id="vstart"
+ port="2049"
+ prun ceph_adm nfs cluster create $cluster_id
+ if [ $CEPH_NUM_MDS -gt 0 ]; then
+ prun ceph_adm nfs export create cephfs "a" $cluster_id $pseudo_path
+ echo "Mount using: mount -t nfs -o port=$port $IP:$pseudo_path mountpoint"
+ fi
+ if [ "$CEPH_NUM_RGW" -gt 0 ]; then
+ pseudo_path="/rgw"
+ do_rgw_create_bucket
+ prun ceph_adm nfs export create rgw "nfs-bucket" $cluster_id $pseudo_path
+ echo "Mount using: mount -t nfs -o port=$port $IP:$pseudo_path mountpoint"
+ fi
+ else
+ start_ganesha
+ echo "Mount using: mount -t nfs -o port=<ganesha-port-num> $IP:$pseudo_path mountpoint"
+ fi
+fi
- docker_service(){
+docker_service(){
local service=''
#prefer podman
if command -v podman > /dev/null; then
else
echo "cannot find docker or podman, please restart service and rerun."
fi
- }
+}
echo ""
if [ $with_jaeger -eq 1 ]; then