memstore=0
bluestore=0
rgw_frontend="civetweb"
+rgw_compression=""
lockdep=${LOCKDEP:-1}
filestore_path=
usage=$usage"\t--mgr_num specify ceph mgr count\n"
usage=$usage"\t--rgw_port specify ceph rgw http listen port\n"
usage=$usage"\t--rgw_frontend specify the rgw frontend configuration\n"
+usage=$usage"\t--rgw_compression specify the rgw compression plugin\n"
usage=$usage"\t-b, --bluestore use bluestore as the osd objectstore backend\n"
usage=$usage"\t--memstore use memstore as the osd objectstore backend\n"
usage=$usage"\t--cache <pool>: enable cache tiering on pool\n"
rgw_frontend=$2
shift
;;
+ --rgw_compression )
+ rgw_compression=$2
+ shift
+ ;;
--filestore_path )
filestore_path=$2
shift
mon data avail crit = 1
erasure code dir = $EC_PATH
plugin dir = $CEPH_LIB
- osd pool default erasure code profile = plugin=jerasure technique=reed_sol_van k=2 m=1 ruleset-failure-domain=osd
+ osd pool default erasure code profile = plugin=jerasure technique=reed_sol_van k=2 m=1 crush-failure-domain=osd
rgw frontends = $rgw_frontend port=$CEPH_RGW_PORT
; needed for s3tests
- rgw enable static website = 1
rgw crypt s3 kms encryption keys = testkey-1=YmluCmJvb3N0CmJvb3N0LWJ1aWxkCmNlcGguY29uZgo= testkey-2=aWIKTWFrZWZpbGUKbWFuCm91dApzcmMKVGVzdGluZwo=
rgw crypt require ssl = false
rgw lc debug interval = 10
log file = $CEPH_OUT_DIR/\$name.\$pid.log
admin socket = $CEPH_OUT_DIR/\$name.\$pid.asok
+[client.rgw]
+
[mds]
$DAEMONOPTS
$CMDSDEBUG
mds root ino gid = `id -g`
$extra_conf
[mgr]
- mgr modules = restful fsstatus dashboard
mgr data = $CEPH_DEV_DIR/mgr.\$id
mgr module path = $MGR_PYTHON_PATH
mon reweight min pgs per osd = 4
$COSDSHORT
$extra_conf
[mon]
+ mgr initial modules = restful status dashboard
mon pg warn min per osd = 3
mon osd allow primary affinity = true
- mon osd allow pg upmap = true
mon reweight min pgs per osd = 4
mon osd prime pg temp = true
crushtool = $CEPH_BIN/crushtool
--cap mgr 'allow *' \
"$keyring_fn"
+ prun $SUDO "$CEPH_BIN/ceph-authtool" --gen-key --name=client.rgw \
+ --cap mon 'allow rw' \
+ --cap osd 'allow rwx' \
+ --cap mgr 'allow rw' \
+ "$keyring_fn"
+
# build a fresh fs monmap, mon fs
local str=""
local count=0
host = $HOSTNAME
EOF
- ceph_adm config-key put mgr/dashboard/$name/server_addr $IP
ceph_adm config-key put mgr/dashboard/$name/server_port $MGR_PORT
DASH_URLS+="http://$IP:$MGR_PORT/"
MGR_PORT=$(($MGR_PORT + 1000))
- ceph_adm config-key put mgr/restful/$name/server_addr $IP
ceph_adm config-key put mgr/restful/$name/server_port $MGR_PORT
RESTFUL_URLS+="https://$IP:$MGR_PORT"
run 'mgr' $CEPH_BIN/ceph-mgr -i $name $ARGS
done
- SF=`mktemp`
- ceph_adm tell mgr restful create-self-signed-cert
- ceph_adm tell mgr restful create-key admin -o $SF
- RESTFUL_SECRET=`cat $SF`
- rm $SF
+ if ceph_adm tell mgr restful create-self-signed-cert; then
+ SF=`mktemp`
+ ceph_adm tell mgr restful create-key admin -o $SF
+ RESTFUL_SECRET=`cat $SF`
+ rm $SF
+ else
+ echo MGR Restful is not working, perhaps the package is not installed?
+ fi
}
start_mds() {
}
do_hitsets $hitset
-do_rgw()
+do_rgw_create_users()
{
# Create S3 user
local akey='0555b35654ad1656d804'
echo " user : tester"
echo " password : testing"
echo ""
+}
+do_rgw()
+{
+ if [ "$new" -eq 1 ]; then
+ do_rgw_create_users
+ if [ -n "$rgw_compression" ]; then
+ echo "setting compression type=$rgw_compression"
+ $CEPH_BIN/radosgw-admin zone placement modify -c $conf_fn --rgw-zone=default --placement-id=default-placement --compression=$rgw_compression > /dev/null
+ fi
+ fi
# Start server
- echo start rgw on http://localhost:$CEPH_RGW_PORT
RGWDEBUG=""
if [ "$debug" -ne 0 ]; then
RGWDEBUG="--debug-rgw=20"
RGWSUDO=
[ $CEPH_RGW_PORT -lt 1024 ] && RGWSUDO=sudo
n=$(($CEPH_NUM_RGW - 1))
- for rgw in `seq 0 $n`; do
- run 'rgw' $RGWSUDO $CEPH_BIN/radosgw -c $conf_fn --log-file=${CEPH_OUT_DIR}/rgw.$rgw.log ${RGWDEBUG} --debug-ms=1
+ i=0
+ for rgw in j k l m n o p q r s t u v; do
+ echo start rgw on http://localhost:$((CEPH_RGW_PORT + i))
+ run 'rgw' $RGWSUDO $CEPH_BIN/radosgw -c $conf_fn --log-file=${CEPH_OUT_DIR}/rgw.$rgw.log ${RGWDEBUG} --debug-ms=1 -n client.rgw "--rgw_frontends=${rgw_frontend} port=$((CEPH_RGW_PORT + i))"
+ i=$(($i + 1))
+ [ $i -eq $CEPH_NUM_RGW ] && break
done
}
if [ "$CEPH_NUM_RGW" -gt 0 ]; then