diff options
| author | generalfuzz <generalfuzz@gmail.com> | 2022-03-17 11:15:08 -0700 |
|---|---|---|
| committer | Radosław Piliszek <radoslaw.piliszek@gmail.com> | 2022-05-30 08:11:54 +0000 |
| commit | d424a63d6049d8d241ab1294aea035d4b187a111 (patch) | |
| tree | f9970225c97849aade902d953c60135ad73942bd /docker/letsencrypt | |
| parent | 9d5bdbf36d477da38b0dd7d44b3fc6feb9325378 (diff) | |
| download | kolla-d424a63d6049d8d241ab1294aea035d4b187a111.tar.gz kolla-d424a63d6049d8d241ab1294aea035d4b187a111.zip | |
Replace Certbot with Lego for Let's Encrypt container
Replaces Certbot with Lego for certificate retrieval and renewal.
Lego includes support for DNS ACME Challenges.
Adds ssh-client to LetsEncrypt and ssh-server to HAProxy to allow both
the transfer of Let's Encrypt certificates to the HAProxy container and
to enable live updating of HAProxy certifices using the HAProxy API
exposed on the local HAProxy socket.
Implements: blueprint letsencrypt-https
Change-Id: I737e1ce5bfc37d0703879c8272a9e915084c5ca6
Diffstat (limited to 'docker/letsencrypt')
| -rw-r--r-- | docker/letsencrypt/Dockerfile.j2 | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/docker/letsencrypt/Dockerfile.j2 b/docker/letsencrypt/Dockerfile.j2 index b344c6734..30062f0b0 100644 --- a/docker/letsencrypt/Dockerfile.j2 +++ b/docker/letsencrypt/Dockerfile.j2 @@ -5,25 +5,32 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" {% import "macros.j2" as macros with context %} -{# NOTE(jkirsch): EPEL required for lego #} -{{ macros.enable_extra_repos(['epel']) }} - {% if base_package_type == 'rpm' %} {% set letsencrypt_packages = [ - 'certbot', + 'openssh-clients', 'cronie' ] %} {% elif base_package_type == 'deb' %} {% set letsencrypt_packages = [ - 'certbot', + 'openssh-client', 'cron' ] %} {% endif %} {{ macros.install_packages(letsencrypt_packages | customizable("packages")) }} - COPY extend_start.sh /usr/local/bin/kolla_extend_start RUN chmod 644 /usr/local/bin/kolla_extend_start +{% block lego_repository %} +ENV lego_version=4.6.0 +ENV lego_download_url=https://github.com/go-acme/lego/releases/download/v${lego_version}/lego_v${lego_version}_linux_{{debian_arch}}.tar.gz +{% endblock %} + +{% block lego_install %} +RUN curl -o /tmp/lego.tar.gz ${lego_download_url} \ + && tar xvf /tmp/lego.tar.gz -C /opt/ \ + && rm -f /tmp/lego.tar.gz +{% endblock %} + {% block letsencrypt_footer %}{% endblock %} {% block footer %}{% endblock %} |
