You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by lf...@apache.org on 2020/08/04 16:10:46 UTC
[incubator-dlab] 02/03: [DLAB-1594]: added letsencrypt certificates
for edge
This is an automated email from the ASF dual-hosted git repository.
lfrolov pushed a commit to branch DLAB-1594-2
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit b39670c64f8428db4e177b86bbcb3c8b10cbb2c4
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Tue Aug 4 19:09:41 2020 +0300
[DLAB-1594]: added letsencrypt certificates for edge
---
infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py b/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
index 582d58e..0c62005 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/edge_lib.py
@@ -105,6 +105,14 @@ def install_nginx_lua(edge_ip, nginx_version, keycloak_auth_server_url, keycloak
use_sudo=True)
sudo('systemctl daemon-reload')
sudo('systemctl enable step-cert-manager.service')
+ elif os.environ['conf_letsencrypt_enabled'] == 'true':
+ print("Configuring letsencrypt certificates.")
+ install_certbot(os.environ['conf_os_family'])
+ if 'conf_letsencrypt_email' in os.environ:
+ run_certbot(os.environ['conf_letsencrypt_domain_name'], os.environ['"project_name"'], os.environ['conf_letsencrypt_email'])
+ else:
+ run_certbot(os.environ['conf_letsencrypt_domain_name'], os.environ['"project_name"'])
+ configure_nginx_LE(os.environ['conf_letsencrypt_domain_name'], os.environ['"project_name"'])
else:
sudo('openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/certs/dlab.key \
-out /etc/ssl/certs/dlab.crt -subj "/C=US/ST=US/L=US/O=dlab/CN={}"'.format(hostname))
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org