You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by ad...@apache.org on 2019/09/20 09:16:09 UTC

[incubator-dlab] branch commented_certs_for_endpoint created (now 157e817)

This is an automated email from the ASF dual-hosted git repository.

adamsd pushed a change to branch commented_certs_for_endpoint
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


      at 157e817  Commented certs pulling and importing for Endpoint.

This branch includes the following new commits:

     new 157e817  Commented certs pulling and importing for Endpoint.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org


[incubator-dlab] 01/01: Commented certs pulling and importing for Endpoint.

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adamsd pushed a commit to branch commented_certs_for_endpoint
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git

commit 157e817dadd8767356b7f7d0962c7c1fbaf77786
Author: AdamsDisturber <ad...@gmail.com>
AuthorDate: Fri Sep 20 12:15:58 2019 +0300

    Commented certs pulling and importing for Endpoint.
---
 .../terraform/gcp/endpoint/provisioning.py         | 44 +++++++++++-----------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/infrastructure-provisioning/terraform/gcp/endpoint/provisioning.py b/infrastructure-provisioning/terraform/gcp/endpoint/provisioning.py
index 32f3b63..0dea897 100644
--- a/infrastructure-provisioning/terraform/gcp/endpoint/provisioning.py
+++ b/infrastructure-provisioning/terraform/gcp/endpoint/provisioning.py
@@ -169,38 +169,38 @@ def create_key_dir_endpoint():
 
 def configure_keystore_endpoint(os_user):
     try:
-        # TEMPORARY COMENTED!!!
-        if args.cloud_provider == "aws":
-            conn.sudo('apt-get install -y awscli')
-            if not exists(conn, '/home/' + args.os_user + '/keys/endpoint.keystore.jks'):
-                conn.sudo('aws s3 cp s3://{0}/dlab/certs/endpoint/endpoint.keystore.jks '
-                          '/home/{1}/keys/endpoint.keystore.jks'
-                          .format(args.ssn_bucket_name, args.os_user))
-            if not exists(conn, '/home/' + args.os_user + '/keys/dlab.crt'):
-                conn.sudo('aws s3 cp s3://{0}/dlab/certs/endpoint/endpoint.crt'
-                          ' /home/{1}/keys/endpoint.crt'.format(args.ssn_bucket_name, args.os_user))
+        # TEMPORARY COMMENTED!!!
+        # if args.cloud_provider == "aws":
+        #     conn.sudo('apt-get install -y awscli')
+        #     if not exists(conn, '/home/' + args.os_user + '/keys/endpoint.keystore.jks'):
+        #         conn.sudo('aws s3 cp s3://{0}/dlab/certs/endpoint/endpoint.keystore.jks '
+        #                   '/home/{1}/keys/endpoint.keystore.jks'
+        #                   .format(args.ssn_bucket_name, args.os_user))
+        #     if not exists(conn, '/home/' + args.os_user + '/keys/dlab.crt'):
+        #         conn.sudo('aws s3 cp s3://{0}/dlab/certs/endpoint/endpoint.crt'
+        #                   ' /home/{1}/keys/endpoint.crt'.format(args.ssn_bucket_name, args.os_user))
         #     if not exists(conn, '/home/' + args.os_user + '/keys/ssn.crt'):
         #         conn.sudo('aws s3 cp '
         #                   's3://{0}/dlab/certs/ssn/ssn.crt /home/{1}/keys/ssn.crt'
         #                   .format(args.ssn_bucket_name, args.os_user))
-        elif args.cloud_provider == "gcp":
-            if not exists(conn, '/home/' + args.os_user + '/keys/endpoint.keystore.jks'):
-                conn.sudo('gsutil -m cp -r gs://{0}/dlab/certs/endpoint/endpoint.keystore.jks '
-                          '/home/{1}/keys/'
-                          .format(args.ssn_bucket_name, args.os_user))
-            if not exists(conn, '/home/' + args.os_user + '/keys/dlab.crt'):
-                conn.sudo('gsutil -m cp -r gs://{0}/dlab/certs/endpoint/endpoint.crt'
-                          ' /home/{1}/keys/'.format(args.ssn_bucket_name, args.os_user))
+        # elif args.cloud_provider == "gcp":
+        #     if not exists(conn, '/home/' + args.os_user + '/keys/endpoint.keystore.jks'):
+        #         conn.sudo('gsutil -m cp -r gs://{0}/dlab/certs/endpoint/endpoint.keystore.jks '
+        #                   '/home/{1}/keys/'
+        #                   .format(args.ssn_bucket_name, args.os_user))
+        #     if not exists(conn, '/home/' + args.os_user + '/keys/dlab.crt'):
+        #         conn.sudo('gsutil -m cp -r gs://{0}/dlab/certs/endpoint/endpoint.crt'
+        #                   ' /home/{1}/keys/'.format(args.ssn_bucket_name, args.os_user))
         #     if not exists(conn, '/home/' + args.os_user + '/keys/ssn.crt'):
         #         conn.sudo('gsutil -m cp -r '
         #                   'gs://{0}/dlab/certs/ssn/ssn.crt /home/{1}/keys/'
         #                   .format(args.ssn_bucket_name, args.os_user))
-        if not exists(conn, '/home/' + args.os_user + '/.ensure_dir/cert_imported'):
-            conn.sudo('keytool -importcert -trustcacerts -alias dlab -file /home/{0}/keys/endpoint.crt -noprompt \
-                 -storepass changeit -keystore {1}/lib/security/cacerts'.format(os_user, java_home))
+        # if not exists(conn, '/home/' + args.os_user + '/.ensure_dir/cert_imported'):
+        #     conn.sudo('keytool -importcert -trustcacerts -alias dlab -file /home/{0}/keys/endpoint.crt -noprompt \
+        #          -storepass changeit -keystore {1}/lib/security/cacerts'.format(os_user, java_home))
         #     conn.sudo('keytool -importcert -trustcacerts -file /home/{0}/keys/ssn.crt -noprompt \
         #          -storepass changeit -keystore {1}/lib/security/cacerts'.format(os_user, java_home))
-            conn.sudo('touch /home/' + args.os_user + '/.ensure_dir/cert_imported')
+        #     conn.sudo('touch /home/' + args.os_user + '/.ensure_dir/cert_imported')
         print("Certificates are imported.")
     except Exception as err:
         print('Failed to configure Keystore certificates: ', str(err))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org