Skip to content

Inelegant approach to support --renewer-config-file command-line argument - #447

Merged
schoen merged 2 commits into
masterfrom
renewer_config_location
May 29, 2015
Merged

schoen merged 2 commits into
masterfrom
renewer_config_location

Conversation

@schoen

@schoen schoen commented May 27, 2015

Copy link
Copy Markdown
Contributor

This commit allows the client to accept a --renewer-config-file argument which specifies the location of the renewer configuration file that provides defaults for where to save renewal-enrolled certs. These defaults supersede those that would otherwise have been provided by constants.py. (The ability to do this was already available in storage.py but there was previously no way to make use of it because there was no way for the options to be provided on the command line.)

For integration testing, you can make a file, say /tmp/tmp.muglQrnKEA, containing the following lines:

renewal_configs_dir = /tmp/tmp.sOKNLm86qy/configs
archive_dir = /tmp/tmp.sOKNLm86qy/archive
live_dir = /tmp/tmp.sOKNLm86qy/live

Then if you invoke the client with --renewer-config-file /tmp/tmp.muglQrnKEA, the renewer code will use these paths as the default location for saving stuff, in lieu of the defaults locations under /etc/letsencrypt. I think the client will be willing to create configs, archive, and live if they don't already exist.

Note that other parts of the code might still try to write files to /etc for historical reasons (which is now obsolete behavior that should be phased out), but those parts can be controlled by previously-existing command-line options like --work-dir. This new command-line option affects only the renewer enrollment functionality invoked via storage.RenewableCert.new_lineage, which had previously insisted on writing to /etc/letsencrypt and couldn't be induced to do otherwise.

Fixes #436. Ought to be superseded by a comprehensive approach to #446 and possibly also a future client CLI redesign. Cc @jsha.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.02%) to 94.87% when pulling b617305 on renewer_config_location into 9bc9abe on master.

@kuba

kuba commented May 28, 2015

Copy link
Copy Markdown
Contributor

LGTM 👍

Conflicts:
	letsencrypt/cli.py
	letsencrypt/client.py
	letsencrypt/interfaces.py
@schoen

schoen commented May 28, 2015

Copy link
Copy Markdown
Contributor Author

I edited my comment above to note that the correct field name is renewal_configs_dir.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.02%) to 94.86% when pulling e15b7b4 on renewer_config_location into 3dbf47e on master.

@schoen
schoen merged commit e15b7b4 into master May 29, 2015
@schoen
schoen deleted the renewer_config_location branch May 29, 2015 19:00
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.

Renewer directory command line flag

3 participants