@@ -4,11 +4,73 @@ Configures ACME-based clients (Automated Certificate Management Environment)
44that make it possible to automate the issuance and renewal of SSL certificates
55without needing human interaction.
66
7- ## Recipes
7+ Two different systems are supported:
8+ - certbot - Python-based Let's Encrypt client and ACME library.
9+ - lego - Go languaged-based Let's Encrypt client and ACME library.
810
9- - ` boxcutter_acme::lego ` - Let’s Encrypt client and ACME library written in Go.
11+ ## Using certbot to automate the issuance and renewal of SSL certificates
12+
13+ Add ` include_recipe 'boxcutter_acme::certbot' ` to install the certbot Let's
14+ Encrypt client and ACME library. A Python virtual environment will be
15+ created in ` /opt/certbot/venv ` .
16+
17+ The certbot binary is installed in ` /opt/certbot/venv/bin/certbot ` .
18+
19+ You can specify SSL certificate configurations to be managed under
20+ ` node['boxcutter_acme']['certbot']['config'] ` .
21+
22+ For example:
23+
24+ ```
25+ node.default['boxcutter_acme']['certbot']['config'] = {
26+ 'example' => {
27+ 'domains' => 'server.example.com',
28+ 'certbot_bin' => '/opt/certbot/venv/bin/certbot',
29+ 'renew_script_path' => '/opt/certbot/bin/lego_renew.sh.erb',
30+ 'email' => 'letsencrypt@example.com',
31+ 'cloudflare_ini' => '/etc/chef/cloudflare.ini',
32+ 'extra_args' => [
33+ '--dns-cloudflare',
34+ '--dns-cloudflare-credentials /etc/chef/cloudflare.ini',
35+ '--test-cert',
36+ ].join(' '),
37+ },
38+ }
39+ ```
40+
41+ ### Fields
42+
43+ Required fields:
44+
45+ * ` renew_script_path ` : Full path where the automation should put the script
46+ that obtains and renews
47+ * ` email ` : Email used for registration and recovery contact.
48+ * ` domains ` : Array containing the list of domain values to be added to the SSL
49+ certificate
50+ * ` certbot_bin `
51+
52+ Optional fields:
53+
54+ * ` config_dir ` : Specifies the directory where Certbot saves its configuration
55+ and certificates. Default: ` /etc/letsencrypt ` .
56+ * ` logs_dir ` : Specifies the directory where Certbot saves logs.
57+ Default: ` /var/log/letsencrypt ` .
58+ * ` work_dir ` : Specifies the working directory for temporary files.
59+ Default: ` /var/lib/letsencrypt ` .
60+ * ` certbot_bin `
61+
62+
63+ * ` renew_days ` : The number of days left on a certificate to renew it. (default: 30)
64+ * ` server ` : Let's Encrypt ACME server to be used. If you'd like to test
65+ something without issuing real certificates, you can use the staging
66+ endpoint ` https://acme-staging-v02.api.letsencrypt.org/directory ` .
67+ * ` extra_parameters ` : Additional global options to be added to the command
68+ line, not covered by required fields (` --dns-resolvers value ` ). Default is ` --http ` .
69+ * ` extra_environment ` : Additional environment variables to be configured for
70+ the renew script. Usually environment variables required for the DNS
71+ tokens.
1072
11- ## Usage
73+ ## Using lego to automate the issuance and renewal of SSL certificates
1274
1375Add ` include_recipe 'boxcutter_acme::lego' ` to install the Let's Encryt client
1476and ACME library for Go. The LEGO binaries will be installed to ` /opt/lego `
@@ -60,3 +122,9 @@ Optional fields:
60122* ` extra_environment ` : Additional environment variables to be configured for
61123 the renew script. Usually environment variables required for the DNS
62124 tokens.
125+
126+ ## Recipes
127+
128+ - ` boxcutter_acme::lego ` - Let’s Encrypt client and ACME library written in Go.
129+
130+ References: https://github.com/schubergphilis/chef-acme/blob/master/README.md
0 commit comments