]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: start mgr dashboard, echo URL(s)
authorSage Weil <sage@redhat.com>
Tue, 23 May 2017 19:06:49 +0000 (15:06 -0400)
committerSage Weil <sage@redhat.com>
Thu, 8 Jun 2017 18:29:36 +0000 (14:29 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/vstart.sh

index 17000716ef9ff7d96ccf61c3a2c2d4314ddcbde4..cbf5249544e9eca0ba538a1a40353db5be788b98 100755 (executable)
@@ -115,6 +115,7 @@ filestore_path=
 VSTART_SEC="client.vstart.sh"
 
 MON_ADDR=""
+DASH_URLS=""
 
 conf_fn="$CEPH_CONF_PATH/ceph.conf"
 keyring_fn="$CEPH_CONF_PATH/keyring"
@@ -609,6 +610,8 @@ EOF
 
 start_mgr() {
     local mgr=0
+    # avoid monitors on nearby ports (which test/*.sh use extensively)
+    DASH_PORT=$(($CEPH_PORT + 1000))
     for name in x y z a b c d e f g h i j k l m n o p
     do
         [ $mgr -eq $CEPH_NUM_MGR ] && break
@@ -625,6 +628,11 @@ start_mgr() {
         host = $HOSTNAME
 EOF
 
+        $SUDO $CEPH_BIN/ceph config-key put mgr/$name/dashboard/server_addr $IP
+       $SUDO $CEPH_BIN/ceph config-key put mgr/$name/dashboard/server_port $DASH_PORT
+       DASH_URLS="$DASH_URLS http://$IP:$DASH_PORT/"
+       DASH_PORT=$(($DASH_PORT - 1))
+
         echo "Starting mgr.${name}"
         run 'mgr' $CEPH_BIN/ceph-mgr -i $name $ARGS
     done
@@ -957,6 +965,9 @@ fi
 
 echo "started.  stop.sh to stop.  see out/* (e.g. 'tail -f out/????') for debug output."
 
+echo ""
+echo "dashboard urls: $DASH_URLS"
+
 echo ""
 echo "export PYTHONPATH=./pybind:$PYTHONPATH"
 echo "export LD_LIBRARY_PATH=$CEPH_LIB"