You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datalab.apache.org by lf...@apache.org on 2021/10/13 09:51:14 UTC

[incubator-datalab] branch DATALAB-2409 updated (0b2c554 -> 9559339)

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

lfrolov pushed a change to branch DATALAB-2409
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git.


    from 0b2c554  [DATALAB-2409]: added output to configure_keycloak
     new b5cf134  [DATALAB-2409]: added variable definition
     new 9559339  [DATALAB-2409]: removed prints from configure_keycloak.py

The 2 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.


Summary of changes:
 infrastructure-provisioning/src/base/scripts/configure_keycloak.py   | 5 +----
 .../src/general/scripts/azure/ssn_configure.py                       | 2 ++
 infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py | 2 ++
 3 files changed, 5 insertions(+), 4 deletions(-)

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


[incubator-datalab] 01/02: [DATALAB-2409]: added variable definition

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

lfrolov pushed a commit to branch DATALAB-2409
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit b5cf13499441838521635f1ef2972f7575be1f60
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Wed Oct 13 12:50:17 2021 +0300

    [DATALAB-2409]: added variable definition
---
 infrastructure-provisioning/src/general/scripts/azure/ssn_configure.py | 2 ++
 infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/infrastructure-provisioning/src/general/scripts/azure/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/azure/ssn_configure.py
index ee959e6..3e8dcdc 100644
--- a/infrastructure-provisioning/src/general/scripts/azure/ssn_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/azure/ssn_configure.py
@@ -588,6 +588,8 @@ if __name__ == "__main__":
             f.write(json.dumps(res))
 
         logging.info('Upload response file')
+        local_log_filepath = "/logs/{}/{}_{}.log".format(os.environ['conf_resource'], os.environ['conf_resource'],
+                                                         os.environ['request_id'])
         params = "--instance_name {} --local_log_filepath {} --os_user {} --instance_hostname {}". \
             format(ssn_conf['instance_name'], local_log_filepath, ssn_conf['datalab_ssh_user'], ssn_conf['instnace_ip'])
         subprocess.run("~/scripts/{}.py {}".format('upload_response_file', params), shell=True, check=True)
diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
index 31e0876..d55fce0 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_configure.py
@@ -573,6 +573,8 @@ if __name__ == "__main__":
             f.write(json.dumps(res))
 
         logging.info('Upload response file')
+        local_log_filepath = "/logs/{}/{}_{}.log".format(os.environ['conf_resource'], os.environ['conf_resource'],
+                                                         os.environ['request_id'])
         params = "--instance_name {} --local_log_filepath {} --os_user {} --instance_hostname {}". \
             format(ssn_conf['instance_name'], local_log_filepath, ssn_conf['datalab_ssh_user'],
                    ssn_conf['instance_hostname'])

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


[incubator-datalab] 02/02: [DATALAB-2409]: removed prints from configure_keycloak.py

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

lfrolov pushed a commit to branch DATALAB-2409
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git

commit 955933941cdecdb129318914dd946c71e4168245
Author: leonidfrolov <fr...@gmail.com>
AuthorDate: Wed Oct 13 12:50:52 2021 +0300

    [DATALAB-2409]: removed prints from configure_keycloak.py
---
 infrastructure-provisioning/src/base/scripts/configure_keycloak.py | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/infrastructure-provisioning/src/base/scripts/configure_keycloak.py b/infrastructure-provisioning/src/base/scripts/configure_keycloak.py
index d5df582..5974b2c 100644
--- a/infrastructure-provisioning/src/base/scripts/configure_keycloak.py
+++ b/infrastructure-provisioning/src/base/scripts/configure_keycloak.py
@@ -48,7 +48,6 @@ args = parser.parse_args()
 if __name__ == "__main__":
     try:
         logging.info('[CONFIGURE KEYCLOAK]')
-        print(args)
         keycloak_auth_server_url = '{}/realms/master/protocol/openid-connect/token'.format(
             args.keycloak_auth_server_url)
         keycloak_auth_data = {
@@ -88,15 +87,13 @@ if __name__ == "__main__":
 
         try:
             keycloak_token = requests.post(keycloak_auth_server_url, data=keycloak_auth_data, verify=False).json()
-            print(keycloak_token)
             keycloak_client = requests.post(keycloak_client_create_url, json=keycloak_client_data,
                                             headers={"Authorization": "Bearer " + keycloak_token.get("access_token"),
                                                      "Content-Type": "application/json"}, verify=False)
-            print(keycloak_client)
 
         except Exception as err:
             append_result("Failed to configure keycloak.")
             raise Exception
     except Exception as err:
-        print('Error: {0}'.format(err))
+        logging.error('Error: {0}'.format(err))
         append_result("Failed to configure keycloak.", str(err))
\ No newline at end of file

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