Skip to content

Commit

Permalink
Merge pull request #27269 from rhcs-dashboard/wip-39030-master
Browse files Browse the repository at this point in the history
mgr/dashboard: update vstart to use new ssl port

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
  • Loading branch information
sebastian-philipp committed Apr 1, 2019
2 parents 77df70d + 5792c03 commit 4b86d98
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/vstart.sh
Expand Up @@ -781,6 +781,7 @@ EOF

start_mgr() {
local mgr=0
local ssl=${DASHBOARD_SSL:-1}
# avoid monitors on nearby ports (which test/*.sh use extensively)
MGR_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
Expand All @@ -799,11 +800,18 @@ start_mgr() {
EOF

if $with_mgr_dashboard ; then
ceph_adm config set mgr mgr/dashboard/$name/server_port $MGR_PORT --force
local port_option="ssl_server_port"
local http_proto="https"
if [ "$ssl" == "0" ]; then
port_option="server_port"
http_proto="http"
ceph_adm config set mgr mgr/dashboard/ssl false --force
fi
ceph_adm config set mgr mgr/dashboard/$name/$port_option $MGR_PORT --force
if [ $mgr -eq 1 ]; then
DASH_URLS="https://$IP:$MGR_PORT"
DASH_URLS="$http_proto://$IP:$MGR_PORT"
else
DASH_URLS+=", https://$IP:$MGR_PORT"
DASH_URLS+=", $http_proto://$IP:$MGR_PORT"
fi
fi
MGR_PORT=$(($MGR_PORT + 1000))
Expand All @@ -827,8 +835,10 @@ EOF
# setting login credentials for dashboard
if $with_mgr_dashboard; then
ceph_adm tell mgr dashboard ac-user-create admin admin administrator
if ! ceph_adm tell mgr dashboard create-self-signed-cert; then
echo dashboard module not working correctly!
if [ "$ssl" != "0" ]; then
if ! ceph_adm tell mgr dashboard create-self-signed-cert; then
echo dashboard module not working correctly!
fi
fi
fi

Expand Down

0 comments on commit 4b86d98

Please sign in to comment.