MON_ADDR=""
DASH_URLS=""
+DASH_V2_URLS=""
RESTFUL_URLS=""
conf_fn="$CEPH_CONF_PATH/ceph.conf"
else
DASH_URLS+=", http://$IP:$MGR_PORT"
fi
- MGR_PORT=$(($MGR_PORT + 1000))
+ MGR_PORT=$(($MGR_PORT + 1000))
- ceph_adm config-key set mgr/restful/$name/server_port $MGR_PORT
+ ceph_adm config-key set mgr/restful/$name/server_port $MGR_PORT
if [ $mgr -eq 1 ]; then
RESTFUL_URLS="https://$IP:$MGR_PORT"
else
RESTFUL_URLS+=", https://$IP:$MGR_PORT"
fi
- MGR_PORT=$(($MGR_PORT + 1000))
+ MGR_PORT=$(($MGR_PORT + 1000))
+
+ # dashboard_v2
+ ceph_adm config-key set mgr/dashboard_v2/$name/server_port $MGR_PORT
+ if [ $mgr -eq 1 ]; then
+ DASH_V2_URLS="http://$IP:$MGR_PORT"
+ else
+ DASH_V2_URLS+=", http://$IP:$MGR_PORT"
+ fi
+ MGR_PORT=$(($MGR_PORT + 1000))
echo "Starting mgr.${name}"
run 'mgr' $CEPH_BIN/ceph-mgr -i $name $ARGS
else
echo MGR Restful is not working, perhaps the package is not installed?
fi
+
+ # dashboard_v2
+ # build frontend
+ pushd $MGR_PYTHON_PATH/dashboard_v2/frontend
+ npm install
+ npm run build
+ popd
+ # setting login credentials for dashboard_v2
+ ceph_adm mgr module enable dashboard_v2
+ ceph_adm tell mgr dashboard set-login-credentials admin admin
}
start_mds() {
echo " restful urls: $RESTFUL_URLS"
echo " w/ user/pass: admin / $RESTFUL_SECRET"
echo ""
+echo "dashboard_v2 urls: $DASH_V2_URLS"
+echo " w/ user/pass: admin / admin"
+echo ""
echo "export PYTHONPATH=./pybind:$PYTHONPATH"
echo "export LD_LIBRARY_PATH=$CEPH_LIB"