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 5f1e034  [DLAB-1594]: added ssn. sub-domain for ssn node
5f1e034 is described below

commit 5f1e0343220fc96b663f65caa2b85b287496bd3b
Author: leonidfrolov <[email protected]>
AuthorDate: Mon Aug 3 17:15:50 2020 +0300

    [DLAB-1594]: added ssn. sub-domain for ssn node
---
 infrastructure-provisioning/scripts/deploy_dlab.py               | 3 ++-
 infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/infrastructure-provisioning/scripts/deploy_dlab.py 
b/infrastructure-provisioning/scripts/deploy_dlab.py
index 7abc83b..77cfe54 100644
--- a/infrastructure-provisioning/scripts/deploy_dlab.py
+++ b/infrastructure-provisioning/scripts/deploy_dlab.py
@@ -145,7 +145,8 @@ parser.add_argument('--conf_stepcerts_kid_password', 
type=str, default='', help=
 parser.add_argument('--conf_stepcerts_ca_url', type=str, default='', 
help='Step CA URL')
 parser.add_argument('--conf_letsencrypt_enabled', type=str, default='false', 
help='Enable or disable Let`s Encrypt certificates')
 parser.add_argument('--conf_letsencrypt_domain_name', type=str, default='', 
help='Domain names to apply. '
-                         'For multiple domains enter a comma separated list of 
domains as a parameter')
+                         'For multiple domains enter a comma separated list of 
domains as a parameter'
+                         'ssn.domain_name will be used for ssn_node and 
edge.domain_name for edge_node')
 parser.add_argument('--conf_letsencrypt_email', type=str, default='', 
help='Email that will be entered during '
                          'certificate obtaining and can be user for urgent 
renewal and security notices. '
                          'Use comma to register multiple emails, e.g. 
[email protected],[email protected].')
diff --git a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py 
b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
index 2c4ac9b..a24e50c 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
@@ -194,9 +194,9 @@ def run_certbot(domain_name, email):
         print('Running  Certbot')
         sudo('service nginx stop')
         if email != '':
-            sudo('certbot certonly --standalone -n -d {} -m 
{}'.format(domain_name, email))
+            sudo('certbot certonly --standalone -n -d ssn.{} -m 
{}'.format(domain_name, email))
         else:
-            sudo('certbot certonly --standalone -n -d {} 
--register-unsafely-without-email --agree-tos'.format(domain_name))
+            sudo('certbot certonly --standalone -n -d ssn.{} 
--register-unsafely-without-email --agree-tos'.format(domain_name))
     except Exception as err:
         print('Failed to run Certbot: ' + str(err))
         sys.exit(1)
@@ -216,7 +216,7 @@ def find_replace_line(file_path, searched_str, 
replacement_line):
 
 def configure_nginx_LE(domain_name):
     try:
-        server_name_line ='     server_name  {};'.format(domain_name)
+        server_name_line ='     server_name  ssn.{};'.format(domain_name)
         cert_path_line = '    ssl_certificate  
/etc/letsencrypt/live/{}/fullchain.pem;'.format(domain_name)
         cert_key_line = '    ssl_certificate_key 
/etc/letsencrypt/live/{}/privkey.pem;'.format(domain_name)
         certbot_service = 'ExecStart = /usr/bin/certbot -q renew --pre-hook 
"service nginx stop" --post-hook "service nginx start"'


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

Reply via email to