forked from linux/documentation
make it more clear
This commit is contained in:
1 parent
12df5e2563
commit
4f965f3871
1 file changed
+18
-6
@@ -1,15 +1,27 @@
|
||||
# ACME - Automatic HTTPS Certificates
|
||||
|
||||
Until there is an puppet module to configure ACME via certbot, these are the steps needed to configure ACME (for nginx).
|
||||
Until there is a custom puppet module to configure ACME via certbot, it is possible to do this with already existing Hiera/Puppet features.
|
||||
Below you find two configuration examples:
|
||||
|
||||
- normal webserver (here `nginx`)
|
||||
- docker service (also `nginx`)
|
||||
|
||||
Note that instead of `nginx` this can be adapted to any other type of (web)service requiring TLS/SSL certificates and
|
||||
these are the steps needed to configure ACME (for nginx).
|
||||
Configuration with docker is down below.
|
||||
|
||||
## Configuration for Webserver/Webservice
|
||||
|
||||
Following steps are required, except step number 4, all can be automated via Hiera and Puppet:
|
||||
|
||||
|
||||
1. Install certbot
|
||||
2. Create a /etc/letsencrypt/cli.ini file
|
||||
3. (optional) Create a post hook script to reload nginx after certificate renewal
|
||||
4. Request the certificate once via the certbot command
|
||||
5. Enable the certbot renewal timer
|
||||
|
||||
Except step number 4, all the above can be automated via Hiera and Puppet as follows:
|
||||
|
||||
Hiera example:
|
||||
|
||||
```yaml
|
||||
# Install certbot and nginx packages
|
||||
@@ -36,14 +48,14 @@ files::files:
|
||||
key-type = ecdsa
|
||||
elliptic-curve = secp384r1
|
||||
# Register e-mail
|
||||
email = linux-eng@psi.ch
|
||||
email = $YOUR_TEAM_EMAIL_ADDRESS
|
||||
# We don't read it anyways
|
||||
agree-tos = true
|
||||
# Server configuration. This is the same for everyone
|
||||
server = https://one.digicert.com/mpki/api/v1/acme/v2/directory
|
||||
# Server authentication. Due to having this, we do not need to do a DNS challenge.
|
||||
eab-kid = pass
|
||||
eab-hmac-key = pass
|
||||
eab-kid = $ID_YOU_GET_FROM_NETWORK_TEAM
|
||||
eab-hmac-key = $KEY_YOU_GET_FROM_NETWORK_TEAM
|
||||
# Post hook to reload nginx after certificate renewal
|
||||
/etc/letsencrypt/renewal-hooks/post/nginx.sh:
|
||||
mode: "0544"
|
||||
|
||||
Reference in new issue
Block a user