Skip to content

Organise command line help into topics - #485

Merged
pde merged 15 commits into
masterfrom
help
Jun 24, 2015
Merged

pde merged 15 commits into
masterfrom
help

Conversation

@pde

@pde pde commented Jun 8, 2015

Copy link
Copy Markdown
Member

This branch organises command line flags into topics, so that the default help is short and manageable; there's letsencrypt --help security, letsencrypt --help apache, etc and letsencrypt --help all if you want very extensive output like a man page.

This pull request probably isn't ready for merging yet; it needs a bit more work on integration with subcommands, and may need rebasing too.

But any significant CLI work should probably be built on top of it.

@kuba

kuba commented Jun 9, 2015

Copy link
Copy Markdown
Contributor

Any significant CLI work should be based on #440 and #473, thanks. Maybe you could review it? I've been stuck with my CLI work and blocked on it for a while... :(

@pde

pde commented Jun 10, 2015

Copy link
Copy Markdown
Member Author

@kuba Sorry I hadn't seen those PRs. Unfortunately I'm going to have to land this one first, because Sascha and Yasemin's UI work is blocking on this, and config path cleanups & code reorgs are lower priority than getting the UI to look like we actually want it to for launch, so that it can receive usability testing.

@kuba

kuba commented Jun 11, 2015

Copy link
Copy Markdown
Contributor

It might not be clear from the PR intro message, but #440 and #473 fix the following issues: #438, #451, #456, #469, #472. Isn't bug fixing and Boulder integration testing more important than general usability?

@pde

pde commented Jun 16, 2015

Copy link
Copy Markdown
Member Author

@kuba bug fixes absolutely need to land well before launch. But a usability mockup needs to be finished before that, so that a team of UX researchers can go and test the mockup on a group of sysadmins, and bring us back feedback in time for the launch.

pde added 3 commits June 16, 2015 12:59
Conflicts:
	letsencrypt/cli.py

Not clear what topic that tweak flag should be under; leaving it under testing
for now...
pde added 2 commits June 22, 2015 01:10
Commonly, this will be caused by a failure to sudo, so the previous text was
not necessarily going to be helpful.
@pde

pde commented Jun 22, 2015

Copy link
Copy Markdown
Member Author

The basic usage printf will be something like this:

  letsencrypt [SUBCOMMAND] [options] [domains]

The Let's Encrypt agent can obtain and install HTTPS/TLS/SSL certificates.  By
default, it will attempt to use a webserver both for obtaining and installing
the cert.  Major SUBCOMMANDS are:

  (default)         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
  rollback          Rollback server configuration changes made during install
  config-changes    Show changes made to server config during installation

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)
  OR:
  --authenticator standalone --installer nginx

More detailed help:

  -h, --help [topic]    print this message, or detailed help on a topic; 
                        the available topics are:

   all, apache, automation, nginx, paths, security, testing, or any of the
   sucommands

And full help from letsencrypt --help all

usage: letsencrypt [-h] [-c CONFIG_FILE]
                   [--apache-server-root APACHE_SERVER_ROOT]
                   [--apache-mod-ssl-conf APACHE_MOD_SSL_CONF]
                   [--apache-ctl APACHE_CTL] [--apache-enmod APACHE_ENMOD]
                   [--apache-init-script APACHE_INIT_SCRIPT]
                   [--nginx-server-root NGINX_SERVER_ROOT]
                   [--nginx-mod-ssl-conf NGINX_MOD_SSL_CONF]
                   [--nginx-ctl NGINX_CTL] [--version] [--no-confirm]
                   [--agree-eula] [--no-verify-ssl] [--dvsni-port DVSNI_PORT]
                   [--no-simple-http-tls] [-B N] [-r]
                   [--config-dir CONFIG_DIR] [--work-dir WORK_DIR]
                   [--backup-dir BACKUP_DIR] [--key-dir KEY_DIR]
                   [--cert-dir CERT_DIR] [--le-vhost-ext LE_VHOST_EXT]
                   [--cert-path CERT_PATH] [--chain-path CHAIN_PATH]
                   [--renewer-config-file RENEWER_CONFIG_FILE] [-s SERVER]
                   SUBCOMMAND ...

Let's Encrypt CLI. Args that start with '--' (eg. --apache-server-root) can
also be set in a config file (/etc/letsencrypt/cli.ini or specified via -c) by
using .ini or .yaml-style syntax (eg. apache-server-root=value or v=TRUE). If
an arg is specified in more than one place, then commandline values override
config file values which override defaults.

positional arguments:
  SUBCOMMAND
    run                 Obtain a certificate and install.
    auth                Obtain a certificate (no install).
    install             Install cert in server software (no auth).
    revoke              Revoke.
    rollback            Rollback.
    config_changes      View config changes.
    plugins             List plugins.

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG_FILE, --config CONFIG_FILE
                        config file path (default: None)

apache:
  Apache Web Server

  --apache-server-root APACHE_SERVER_ROOT
                        Apache server root directory. (default: /etc/apache2)
  --apache-mod-ssl-conf APACHE_MOD_SSL_CONF
                        Contains standard Apache SSL directives. (default:
                        /etc/letsencrypt/options-ssl-apache.conf)
  --apache-ctl APACHE_CTL
                        Path to the 'apache2ctl' binary, used for 'configtest'
                        and retrieving Apache2 version number. (default:
                        apache2ctl)
  --apache-enmod APACHE_ENMOD
                        Path to the Apache 'a2enmod' binary. (default:
                        a2enmod)
  --apache-init-script APACHE_INIT_SCRIPT
                        Path to the Apache init script (used for server
                        reload/restart). (default: /etc/init.d/apache2)

nginx:
  Nginx Web Server

  --nginx-server-root NGINX_SERVER_ROOT
                        Nginx server root directory. (default: /etc/nginx)
  --nginx-mod-ssl-conf NGINX_MOD_SSL_CONF
                        Contains standard nginx SSL directives. (default:
                        /etc/letsencrypt/options-ssl-nginx.conf)
  --nginx-ctl NGINX_CTL
                        Path to the 'nginx' binary, used for 'configtest' and

standalone:
  Standalone Authenticator

automation:
  Arguments for automating execution & other tweaks

  --version             show program's version number and exit
  --no-confirm          Turn off confirmation screens, currently used for
                        --revoke (default: False)
  --agree-eula, -e      Agree to the Let's Encrypt Subscriber Agreement
                        (default: False)

testing:
  The following flags are meant for testing purposes only! Do NOT change
  them, unless you really know what you're doing!

  --no-verify-ssl       Disable SSL certificate verification. (default: False)
  --dvsni-port DVSNI_PORT
                        Port number to perform DVSNI challenge. Boulder in
                        testing mode defaults to 5001. (default: 443)
  --no-simple-http-tls  Do not use TLS when solving SimpleHTTP challenges.
                        (default: False)

security:
  Security parameters & server settings

  -B N, --rsa-key-size N
                        Size of the RSA key. (default: 2048)
  -r, --redirect        Automatically redirect all HTTP traffic to HTTPS for
                        the newly authenticated vhost. (default: False)

paths:
  Arguments changing execution paths & servers

  --config-dir CONFIG_DIR
                        Configuration directory. (default: /etc/letsencrypt)
  --work-dir WORK_DIR   Working directory. (default: /var/lib/letsencrypt)
  --backup-dir BACKUP_DIR
                        Configuration backups directory. (default:
                        /var/lib/letsencrypt/backups)
  --key-dir KEY_DIR     Keys storage. (default: /etc/letsencrypt/keys)
  --cert-dir CERT_DIR   Certificates storage. (default:
                        /etc/letsencrypt/certs)
  --le-vhost-ext LE_VHOST_EXT
                        SSL vhost configuration extension. (default: -le-
                        ssl.conf)
  --cert-path CERT_PATH
                        Let's Encrypt certificate file path. (default:
                        /etc/letsencrypt/certs/cert-letsencrypt.pem)
  --chain-path CHAIN_PATH
                        Let's Encrypt chain file path. (default:
                        /etc/letsencrypt/certs/chain-letsencrypt.pem)
  --renewer-config-file RENEWER_CONFIG_FILE
                        Location of renewal configuration file. (default:
                        /etc/letsencrypt/renewer.conf)
  -s SERVER, --server SERVER
                        CA hostname (and optionally :port). The server
                        certificate must be trusted in order to avoid further
                        modifications to the client. (default: https://www
                        .letsencrypt-demo.org/acme/new-reg)

@jcb82

jcb82 commented Jun 22, 2015

Copy link
Copy Markdown

*"Install" the certificate is never really defined. I think it should be made clear this involves changing the configuration of the webserver. For example "Use the Apache plugin for authentication and installation" doesn't really make it clear that this will modify the local Apache configuration.
*Why is there no nginx_init_script?
*I'd add a similar warning (to the testing warning) not to modify RSA key size unless the user knows what they're doing.

Some small comments, mostly these are my personal wording preferences:

*"HTTPS/TLS/SSL certificates" I'd prefer "HTTPS (TLS/SSL) certificates"
*"positional arguments:\n SUBCOMMAND" is a little confusing.
*Inconsistent about having periods at the end of descriptions. They are there for subcommands, not for many optional arguments
*"standalone\n Standalone Authenticator" could be elided.

pde added 4 commits June 23, 2015 14:13
Keep argparse in place for --help <TOPIC>, but try to make that match
the customised short help as much as possible.
@pde

pde commented Jun 24, 2015

Copy link
Copy Markdown
Member Author

Ok, I think this should be ready for review. Let's get it landed so we can unblock other cli stuff.

@pde

pde commented Jun 24, 2015

Copy link
Copy Markdown
Member Author

(There are a few more item's from Joe's review to address, but I think we should merge this to unblock @kuba and I'll keep working on those)

pde added a commit that referenced this pull request Jun 24, 2015
Organise command line help into topics
@pde
pde merged commit 271ba9a into master Jun 24, 2015
@jdkasten
jdkasten deleted the help branch June 24, 2015 21:56
kuba added a commit to kuba/letsencrypt that referenced this pull request Jun 26, 2015
Additonally:
- remove "-s", it will not be used often
- remove --accountkey (former --authkey), as it is not used
- CLI_DEFAULTS: cert_path -> auth_cert_path, chain_path -> auth_chain_path
- remove remaining "LetsEncrypt" error prefixes (fixes certbot#487).
- HeplfulParser:
  - call add_plugin_args from outside (this makes sure plugins are
    displayed last in --help all)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants