From: Sage Weil Date: Sat, 22 Feb 2020 18:57:03 +0000 (-0600) Subject: Merge PR #33461 into master X-Git-Tag: v15.1.1~301 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a5eec51752006eeb14855620ca3015495df5bbf0;p=ceph-ci.git Merge PR #33461 into master * refs/pull/33461/head: cephadm: Simplify is_available cephadm: Improve type signature of is_available cephadm: Fix type errors found by mypy cephadm: Enable and start chrony using any packager cephadm: Add Packager for Zypper (openSUSE / SLES) cephadm: Normalize mypy annotations Reviewed-by: Sage Weil --- a5eec51752006eeb14855620ca3015495df5bbf0 diff --cc src/cephadm/cephadm index 0a5bc4ad7cf,b58deb0360c..7f3e5e1bcac --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@@ -1977,21 -1982,10 +1984,21 @@@ def command_bootstrap() timeout=args.timeout if args.timeout else 30 # seconds out = cli(['-h'], timeout=timeout) return 'dashboard' in out - is_available('Dashboard', is_dashboard_available)() + is_available('Dashboard', is_dashboard_available) - logger.info('Generating a dashboard self-signed certificate...') - cli(['dashboard', 'create-self-signed-cert']) + + + # dashboard crt and key + if args.dashboard_key and args.dashboard_crt: + logger.info('Using provided dashboard certificate...') + mounts = {} + mounts[pathify(args.dashboard_crt)] = '/tmp/dashboard.crt:z' + mounts[pathify(args.dashboard_key)] = '/tmp/dashboard.key:z' + cli(['dashboard', 'set-ssl-certificate', '-i', '/tmp/dashboard.crt'], extra_mounts=mounts) + cli(['dashboard', 'set-ssl-certificate-key', '-i', '/tmp/dashboard.key'], extra_mounts=mounts) + else: + logger.info('Generating a dashboard self-signed certificate...') + cli(['dashboard', 'create-self-signed-cert']) logger.info('Creating initial admin user...') password = args.initial_dashboard_password or generate_password()