def __init__(self, args=None):
        # If no args are passed to the class, then we're calling this
        # class from another library or code so we shouldn't execute
        # parser or anything else
        if args:
            options = self.parse_args(args)
            if len(options.hash_password) > 0:
                print_header("HASHING PASSWORD TO SHA512")
                backend.hash_password(options.hash_password)
                sys.exit(0)

            make_default_dir()

            if options.web:
                print_header("Starting DC/OS installer in web mode")
                async_server.start(options)

            if options.genconf:
                print_header("EXECUTING CONFIGURATION GENERATION")
                code = backend.do_configure()
                if code != 0:
                    sys.exit(1)
                sys.exit(0)

            if options.validate_config:
                print_header('VALIDATING CONFIGURATION')
                log_warn_only()
                validation_errors = backend.do_validate_gen_config()
                if validation_errors:
                    print_validation_errors(validation_errors)
                    sys.exit(1)
                sys.exit(0)

            validate_ssh_config_or_exit()
            action = None

            if options.preflight:
                print_header("EXECUTING PREFLIGHT")
                action = action_lib.run_preflight

            if options.deploy:
                print_header("EXECUTING DC/OS INSTALLATION")
                action = action_lib.install_dcos

            if options.postflight:
                print_header("EXECUTING POSTFLIGHT")
                action = action_lib.run_postflight

            if options.uninstall:
                print_header("EXECUTING UNINSTALL")
                tall_enough_to_ride()
                action = action_lib.uninstall_dcos

            if options.install_prereqs:
                print_header("EXECUTING INSTALL PREREQUISITES")
                action = action_lib.install_prereqs

            sys.exit(run_loop(action, options))
The web based installer leverages Flask to present end-users of
dataset/ETHPy150Open dcos/dcos/ext/dcos-installer/dcos_installer/__init__.py/DcosInstaller.__init__