Add LetsEncrypt images for cert request/renewal

Adds container images for LetsEncrypt.

Implements: blueprint letsencrypt-https
Change-Id: I36d1a367fd8f40bb93ebc49122c8ee4fdcc151b2
Co-Authored-By: Jason Anderson <jasonanderson@uchicago.edu>
This commit is contained in:
Jason Anderson 2020-05-04 12:32:51 -05:00 committed by James Kirsch
parent 57f56e7062
commit 68f5856728
4 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,29 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}"
{% block letsencrypt_header %}{% endblock %}
{% 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',
'cronie'
] %}
{% elif base_package_type == 'deb' %}
{% set letsencrypt_packages = [
'certbot',
'cron'
] %}
{% endif %}
{{ macros.install_packages(letsencrypt_packages | customizable("packages")) }}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block letsencrypt_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -0,0 +1,10 @@
#!/bin/bash
if [[ ! -d "/var/log/kolla/letsencrypt" ]]; then
mkdir -p /var/log/kolla/letsencrypt
fi
if [[ $(stat -c %a /var/log/kolla/letsencrypt) != "755" ]]; then
chmod 755 /var/log/kolla/letsencrypt
fi
. /usr/local/bin/kolla_httpd_setup

View File

@ -58,6 +58,7 @@ _PROFILE_OPTS = [
'keepalived', 'keepalived',
'kibana', 'kibana',
'kolla-toolbox', 'kolla-toolbox',
'letsencrypt',
'logstash', 'logstash',
'mariadb', 'mariadb',
'memcached', 'memcached',
@ -946,6 +947,10 @@ USERS = {
'proxysql-user': { 'proxysql-user': {
'uid': 42487, 'uid': 42487,
'gid': 42487, 'gid': 42487,
},
'letsencrypt-user': {
'uid': 42488,
'gid': 42488,
} }
} }

View File

@ -0,0 +1,4 @@
---
features:
- |
Adds containers for integration with Let's Encrypt.