required=False, type=lambda x: bool(strtobool(str(x)))) parsed_args = arg_parser.parse_args() deployment_name = parsed_args.deployment_name tenant_id = parsed_args.tenant_id subscription_id = parsed_args.subscription_id resource_group = parsed_args.resource_group debug_enabled = parsed_args.debug parameter_file = parsed_args.parameter_file no_input = parsed_args.no_input if debug_enabled: az.DEBUG_ENABLED = True install_config: InstallConfiguration = InstallConfiguration.load( default_param_file=parameter_file) install_state = DeploymentState.load() install_config.sql_auth = parsed_args.sql_auth if install_state.is_user_prompts_taken(): prompt_again = False if not no_input: prompt_again = install_state.prompt_stage_repeat( "Previously entered values have been found. Would you like to ignore them and re-enter deployment parameters? (Y/n) " ) if prompt_again: execute_user_prompts( deployment_name=deployment_name, install_config=install_config, resource_group=resource_group,
metavar='resource-group', type=str, help='Azure resource group of deployment', required=True) arg_parser.add_argument( "--artifacts-path", metavar="artifacts-path", help='Local path to artifacts to be uploaded to DBFS', default=DEFAULT_ARTIFACTS_LOCATION) arg_parser.add_argument('--debug', default=False, required=False, type=lambda x: bool(strtobool(str(x)))) parsed_args = arg_parser.parse_args() group = parsed_args.resource_group artifacts_local_path = parsed_args.artifacts_path debug_enabled = parsed_args.debug config: InstallConfiguration = InstallConfiguration.load() install_state = DeploymentState.load() if debug_enabled: az.DEBUG_ENABLED = True initialize_databricks_cluster(install_config=config, resource_group=group, artifacts_path=artifacts_local_path, tenant_id=parsed_args.tenant_id, subscription_id=parsed_args.subscription_id) install_state.complete_stage(Stages.DATABRICKS_CLUSTER_INITIALIZED) print("Databricks cluster has been initialized")