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


The following commit(s) were added to refs/heads/DLAB-1594-2 by this push:
     new c73e09d  [DLAB-1594]: changed when letsencrypt certificate is 
generated and configured
c73e09d is described below

commit c73e09d7d01956dd212a74a50eb45885a25a8250
Author: leonidfrolov <[email protected]>
AuthorDate: Tue Aug 4 10:58:43 2020 +0300

    [DLAB-1594]: changed when letsencrypt certificate is generated and 
configured
---
 .../src/ssn/scripts/configure_ssn_node.py                   | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
index dd12e9d..d6186e1 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
@@ -236,12 +236,6 @@ def configure_ssl_certs(hostname, custom_ssl_cert):
                     use_sudo=True)
                 sudo('systemctl daemon-reload')
                 sudo('systemctl enable step-cert-manager.service')
-            elif os.environ['conf_letsencrypt_enabled'] == 'true':
-                install_certbot(os.environ['conf_os_family'])
-                if 'conf_letsencrypt_email' in os.environ:
-                    run_certbot(os.environ['conf_letsencrypt_domain_name'], 
os.environ['conf_letsencrypt_email'])
-                else:
-                    run_certbot(os.environ['conf_letsencrypt_domain_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))
@@ -306,7 +300,12 @@ if __name__ == "__main__":
     configure_nginx(deeper_config, args.dlab_path, args.hostname)
 
     if os.environ['conf_letsencrypt_enabled'] == 'true':
-        print("Configuring nginx letsencrypt certificates.")
+        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['conf_letsencrypt_email'])
+        else:
+            run_certbot(os.environ['conf_letsencrypt_domain_name'])
         configure_nginx_LE(os.environ['conf_letsencrypt_domain_name'])
 
     #print("Installing jenkins.")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to