]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: add --ssh to enable+configure ssh orchestrator
authorSage Weil <sage@redhat.com>
Mon, 30 Sep 2019 22:01:38 +0000 (17:01 -0500)
committerSage Weil <sage@redhat.com>
Fri, 4 Oct 2019 19:37:28 +0000 (14:37 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/vstart.sh

index 5eb4e723feb15f35ee11dcdb0c52393c7efcf15a..af046cf6d7057a12f2af8e73bde09a51b5e64ff6 100755 (executable)
@@ -126,6 +126,7 @@ redirect=0
 smallmds=0
 short=0
 ec=0
+ssh=0
 hitset=""
 overwrite_conf=1
 cephx=1 #turn cephx on by default
@@ -209,6 +210,7 @@ usage=$usage"\t--crimson: use crimson-osd instead of ceph-osd\n"
 usage=$usage"\t--osd-args: specify any extra osd specific options\n"
 usage=$usage"\t--bluestore-devs: comma-separated list of blockdevs to use for bluestore\n"
 usage=$usage"\t--inc-osd: append some more osds into existing vcluster\n"
+usage=$usage"\t--ssh: enable ssh orchestrator with ~/.ssh/id_rsa[.pub]\n"
 
 usage_exit() {
     printf "$usage"
@@ -269,6 +271,9 @@ case $1 in
     --msgr21 )
         msgr="21"
         ;;
+    --ssh )
+        ssh=1
+        ;;
     --valgrind )
         [ -z "$2" ] && usage_exit
         valgrind=$2
@@ -954,6 +959,15 @@ EOF
             echo MGR Restful is not working, perhaps the package is not installed?
         fi
     fi
+
+    if [ "$ssh" -eq 1 ]; then
+        echo Enabling ssh orchestrator
+        ceph_adm config-key set mgr/ssh/ssh_identity_key -i ~/.ssh/id_rsa
+        ceph_adm config-key set mgr/ssh/ssh_identity_pub -i ~/.ssh/id_rsa.pub
+        ceph_adm mgr module enable ssh
+        ceph_adm orchestrator set backend ssh
+        ceph_adm orchestrator host add $HOSTNAME
+    fi
 }
 
 start_mds() {