Merge pull request #1038 from letsencrypt/cli

Implement --standalone
This commit is contained in:
bmw 2015-10-20 14:20:18 -07:00
commit 2cab4e577e

View file

@ -60,7 +60,7 @@ the cert. """
# altogether
USAGE = SHORT_USAGE + """Major SUBCOMMANDS are:
(default) everything Obtain & install a cert in your current webserver
(default) run Obtain & install a cert in your current webserver
auth Authenticate & obtain cert, but do not install it
install Install a previously obtained cert in a server
revoke Revoke a previously obtained certificate
@ -71,7 +71,7 @@ Choice of server for authentication/installation:
--apache Use the Apache plugin for authentication & installation
--nginx Use the Nginx plugin for authentication & installation
--standalone Run a standalone HTTPS server (for authentication only)
--standalone Run a standalone webserver for authentication
OR:
--authenticator standalone --installer nginx
@ -380,6 +380,8 @@ def choose_configurator_plugins(args, config, plugins, verb):
if args.apache:
req_inst = set_configurator(req_inst, "apache")
req_auth = set_configurator(req_auth, "apache")
if args.standalone:
req_auth = set_configurator(req_auth, "standalone")
logger.debug("Requested authenticator %s and installer %s", req_auth, req_inst)
# Try to meet the user's request and/or ask them to pick plugins
@ -738,10 +740,6 @@ def create_parser(plugins, args):
None, "-t", "--text", dest="text_mode", action="store_true",
help="Use the text output instead of the curses UI.")
helpful.add(None, "-m", "--email", help=config_help("email"))
helpful.add(None, "--apache", action="store_true",
help="Obtain and install certs using Apache")
helpful.add(None, "--nginx", action="store_true",
help="Obtain and install certs using Nginx")
# positional arg shadows --domains, instead of appending, and
# --domains is useful, because it can be stored in config
#for subparser in parser_run, parser_auth, parser_install:
@ -854,7 +852,6 @@ def _create_subparsers(helpful):
"--checkpoints", type=int, metavar="N",
default=flag_default("rollback_checkpoints"),
help="Revert configuration N number of checkpoints.")
helpful.add("plugins",
"--init", action="store_true", help="Initialize plugins.")
helpful.add("plugins",
@ -919,6 +916,12 @@ def _plugins_parsing(helpful, plugins):
"plugins", "--configurator", help="Name of the plugin that is "
"both an authenticator and an installer. Should not be used "
"together with --authenticator or --installer.")
helpful.add("plugins", "--apache", action="store_true",
help="Obtain and install certs using Apache")
helpful.add("plugins", "--nginx", action="store_true",
help="Obtain and install certs using Nginx")
helpful.add("plugins", "--standalone", action="store_true",
help='Obtain certs using a "standalone" webserver.')
# things should not be reorder past/pre this comment:
# plugins_group should be displayed in --help before plugin