[incubator-dlab] branch DLAB-3 updated: Update configure_docker.py
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a commit to branch DLAB-3 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-3 by this push: new d2fd4dd Update configure_docker.py d2fd4dd is described below commit d2fd4dde86043312da61570c919b66a8b9023d50 Author: i.oleksandr AuthorDate: Mon May 13 19:21:31 2019 +0300 Update configure_docker.py --- infrastructure-provisioning/src/ssn/scripts/configure_docker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py index d2722e1..0c5e37f 100644 --- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py +++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py @@ -122,9 +122,9 @@ def configure_guacamole(): sudo('docker exec -i guac-mysql /bin/bash -c "cat /tmp/scripts/initdb.sql | mysql -u root -p{} guacamole"'.format(mysql_pass)) sudo("docker run --name guacamole --restart unless-stopped --link guacd:guacd --link guac-mysql:mysql -e MYSQL_DATABASE='guacamole' -e MYSQL_USER='guacamole' -e MYSQL_PASSWORD='guacamole' -d -p 8080:8080 guacamole/guacamole") #create cronjob for run containers on reboot -sudo('ls -dl /opt/dlab/*/') -sudo('touch /opt/dlab/mysql-cron.sh') -sudo('chmod 755 /opt/dlab/mysql-cron.sh') +sudo('mkdir /opt/dlab/cron') +sudo('touch /opt/dlab/cron/mysql.sh') +sudo('chmod 755 /opt/dlab/cron/mysql.sh') return True except Exception as err: traceback.print_exc() - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-3 updated: Update configure_docker.py
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a commit to branch DLAB-3 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-3 by this push: new 146e250 Update configure_docker.py 146e250 is described below commit 146e25039d8ccaef3670c34bca9a4ca9ff1e0ab1 Author: i.oleksandr AuthorDate: Mon May 13 18:48:16 2019 +0300 Update configure_docker.py --- infrastructure-provisioning/src/ssn/scripts/configure_docker.py | 1 + 1 file changed, 1 insertion(+) diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py index 9879196..d2722e1 100644 --- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py +++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py @@ -122,6 +122,7 @@ def configure_guacamole(): sudo('docker exec -i guac-mysql /bin/bash -c "cat /tmp/scripts/initdb.sql | mysql -u root -p{} guacamole"'.format(mysql_pass)) sudo("docker run --name guacamole --restart unless-stopped --link guacd:guacd --link guac-mysql:mysql -e MYSQL_DATABASE='guacamole' -e MYSQL_USER='guacamole' -e MYSQL_PASSWORD='guacamole' -d -p 8080:8080 guacamole/guacamole") #create cronjob for run containers on reboot +sudo('ls -dl /opt/dlab/*/') sudo('touch /opt/dlab/mysql-cron.sh') sudo('chmod 755 /opt/dlab/mysql-cron.sh') return True - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-3 updated: Update configure_docker.py
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a commit to branch DLAB-3 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-3 by this push: new 7b96471 Update configure_docker.py 7b96471 is described below commit 7b9647103545b45bc106dc1465b32f288a773942 Author: i.oleksandr AuthorDate: Mon May 13 18:19:08 2019 +0300 Update configure_docker.py --- infrastructure-provisioning/src/ssn/scripts/configure_docker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py index 50c4fc6..9879196 100644 --- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py +++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py @@ -124,10 +124,11 @@ def configure_guacamole(): #create cronjob for run containers on reboot sudo('touch /opt/dlab/mysql-cron.sh') sudo('chmod 755 /opt/dlab/mysql-cron.sh') +return True except Exception as err: traceback.print_exc() print('Failed to configure guacamole: ', str(err)) -sys.exit(1) +return False ## - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-3 updated: Update configure_docker.py
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a commit to branch DLAB-3 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-3 by this push: new 4fe05f7 Update configure_docker.py 4fe05f7 is described below commit 4fe05f7a45aaeae3586fade3b83df72043ee475c Author: i.oleksandr AuthorDate: Mon May 13 17:45:00 2019 +0300 Update configure_docker.py --- infrastructure-provisioning/src/ssn/scripts/configure_docker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py index b235a6d..50c4fc6 100644 --- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py +++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py @@ -122,8 +122,8 @@ def configure_guacamole(): sudo('docker exec -i guac-mysql /bin/bash -c "cat /tmp/scripts/initdb.sql | mysql -u root -p{} guacamole"'.format(mysql_pass)) sudo("docker run --name guacamole --restart unless-stopped --link guacd:guacd --link guac-mysql:mysql -e MYSQL_DATABASE='guacamole' -e MYSQL_USER='guacamole' -e MYSQL_PASSWORD='guacamole' -d -p 8080:8080 guacamole/guacamole") #create cronjob for run containers on reboot -sudo('touch /opt/dlab/handlers/mysql-cron.sh') -sudo('chmod 755 /opt/dlab/handlers/mysql-cron.sh') +sudo('touch /opt/dlab/mysql-cron.sh') +sudo('chmod 755 /opt/dlab/mysql-cron.sh') except Exception as err: traceback.print_exc() print('Failed to configure guacamole: ', str(err)) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-433 updated: [DLAB-623] Removed Spark installation and added it to Dockerfile_jupyter [bugfixing]
This is an automated email from the ASF dual-hosted git repository. dmysakovets pushed a commit to branch DLAB-433 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-433 by this push: new d066bdc [DLAB-623] Removed Spark installation and added it to Dockerfile_jupyter [bugfixing] d066bdc is described below commit d066bdc5a788a89f6a42a5ee6d04fe0b9dc31f20 Author: Dyoma33 AuthorDate: Mon May 13 17:07:29 2019 +0300 [DLAB-623] Removed Spark installation and added it to Dockerfile_jupyter [bugfixing] --- infrastructure-provisioning/src/general/lib/os/fab.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py index 52441b7..fb21896 100644 --- a/infrastructure-provisioning/src/general/lib/os/fab.py +++ b/infrastructure-provisioning/src/general/lib/os/fab.py @@ -247,14 +247,14 @@ def ensure_jupyter_docker_files(os_user, jupyter_dir, spark_script, jupyter_conf sudo('touch {}'.format(spark_script)) sudo('echo "#!/bin/bash" >> {}'.format(spark_script)) sudo( - 'echo "PYJ=`find /opt/spark/ -name \'*py4j*.zip\' | tr \'\\n\' \':\' | sed \'s|:$||g\'`; sed -i \'s|PY4J|'$PYJ\'|g\' /tmp/pyspark_local_template.json" >> {}'.format( + 'echo "PYJ=`find /opt/spark/ -name \'*py4j*.zip\' | tr \'\\n\' \':\' | sed \'s|:$||g\'`; sed -i \'s|PY4J|\'$PYJ\'|g\' /tmp/pyspark_local_template.json" >> {}'.format( spark_script)) sudo( 'echo "sed -i \'14s/:",/:\/home\/dlab-user\/caffe\/python:\/home\/dlab-user\/pytorch\/build:",/\' /tmp/pyspark_local_template.json" >> {}'.format( spark_script)) sudo('echo \'sed -i "s|SP_VER|2.3.2|g" /tmp/pyspark_local_template.json\' >> {}'.format(spark_script)) sudo( - 'echo "PYJ=`find /opt/spark/ -name \'*py4j*.zip\' | tr \'\\n\' \':\' | sed \'s|:$||g\'`; sed -i \'s|PY4J|'$PYJ\'|g\' /tmp/py3spark_local_template.json" >> {}'.format( + 'echo "PYJ=`find /opt/spark/ -name \'*py4j*.zip\' | tr \'\\n\' \':\' | sed \'s|:$||g\'`; sed -i \'s|PY4J|\'$PYJ\'|g\' /tmp/py3spark_local_template.json" >> {}'.format( spark_script)) sudo( 'echo "sed -i \'14s/:",/:\/home\/dlab-user\/caffe\/python:\/home\/dlab-user\/pytorch\/build:",/\' /tmp/py3spark_local_template.json" >> {}'.format( @@ -280,7 +280,7 @@ def ensure_jupyter_docker_files(os_user, jupyter_dir, spark_script, jupyter_conf sys.exit(1) -def ensure_pyspark_local_kernel(os_user, pyspark_local_path_dir, templates_dir, spark_version, jupyter_dir): +def ensure_pyspark_local_kernel(os_user, pyspark_local_path_dir, templates_dir, spark_version): if not exists('/home/' + os_user + '/.ensure_dir/pyspark_local_kernel_ensured'): try: sudo('mkdir -p ' + pyspark_local_path_dir) @@ -296,7 +296,7 @@ def ensure_pyspark_local_kernel(os_user, pyspark_local_path_dir, templates_dir, sys.exit(1) -def ensure_py3spark_local_kernel(os_user, py3spark_local_path_dir, templates_dir, spark_version, jupyter_dir): +def ensure_py3spark_local_kernel(os_user, py3spark_local_path_dir, templates_dir, spark_version): if not exists('/home/' + os_user + '/.ensure_dir/py3spark_local_kernel_ensured'): try: sudo('mkdir -p ' + py3spark_local_path_dir) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-433 updated: [DLAB-623] Removed Spark installation and added it to Dockerfile_jupyter
This is an automated email from the ASF dual-hosted git repository. dmysakovets pushed a commit to branch DLAB-433 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-433 by this push: new 89a3b5d [DLAB-623] Removed Spark installation and added it to Dockerfile_jupyter 89a3b5d is described below commit 89a3b5da4982aec88199e4d752355c4a7d004b99 Author: Dyoma33 AuthorDate: Mon May 13 16:47:29 2019 +0300 [DLAB-623] Removed Spark installation and added it to Dockerfile_jupyter --- .../src/general/lib/os/fab.py | 37 ++ .../src/jupyter-docker/Dockerfile_jupyter | 57 +- .../src/jupyter-docker/jupyter_run.sh | 21 .../scripts/configure_jupyter-docker_node.py | 33 +++-- 4 files changed, 110 insertions(+), 38 deletions(-) diff --git a/infrastructure-provisioning/src/general/lib/os/fab.py b/infrastructure-provisioning/src/general/lib/os/fab.py index 30a946a..52441b7 100644 --- a/infrastructure-provisioning/src/general/lib/os/fab.py +++ b/infrastructure-provisioning/src/general/lib/os/fab.py @@ -223,12 +223,16 @@ def configure_docker(os_user, http_file, https_file): print('Failed to configure Docker:', str(err)) sys.exit(1) -def ensure_jupyter_docker_files(os_user, jupyter_dir, jupyter_conf_file, jupyter_version, docker_jupyter_conf, exploratory_name): +def ensure_jupyter_docker_files(os_user, jupyter_dir, spark_script, jupyter_conf_file, jupyter_version, docker_jupyter_conf, exploratory_name): if not exists(jupyter_dir): try: sudo('mkdir {}'.format(jupyter_dir)) + put(templates_dir + 'pyspark_local_template.json', '/tmp/pyspark_local_template.json') + put(templates_dir + 'py3spark_local_template.json', '/tmp/py3spark_local_template.json') put('/root/Dockerfile_jupyter', '/tmp/Dockerfile_jupyter') put('/root/jupyter_run.sh', '/tmp/jupyter_run.sh') + sudo('\cp /tmp/pyspark_local_template.json ' + jupyter_dir + 'pyspark_local_template.json') + sudo('\cp /tmp/py3spark_local_template.json ' + jupyter_dir + 'py3spark_local_template.json') sudo('mv /tmp/jupyter_run.sh {}jupyter_run.sh'.format(jupyter_dir)) sudo('mv /tmp/Dockerfile_jupyter {}Dockerfile_jupyter'.format(jupyter_dir)) sudo('sed -i \'s/jup_version/{}/\' {}Dockerfile_jupyter'.format(jupyter_version, jupyter_dir)) @@ -240,6 +244,26 @@ def ensure_jupyter_docker_files(os_user, jupyter_dir, jupyter_conf_file, jupyter sudo('echo \'c.NotebookApp.cookie_secret = b"{0}"\' >> {1}'.format(id_generator(), jupyter_conf_file)) sudo('''echo "c.NotebookApp.token = u''" >> {}'''.format(jupyter_conf_file)) sudo('echo \'c.KernelSpecManager.ensure_native_kernel = False\' >> {}'.format(jupyter_conf_file)) + sudo('touch {}'.format(spark_script)) + sudo('echo "#!/bin/bash" >> {}'.format(spark_script)) + sudo( + 'echo "PYJ=`find /opt/spark/ -name \'*py4j*.zip\' | tr \'\\n\' \':\' | sed \'s|:$||g\'`; sed -i \'s|PY4J|'$PYJ\'|g\' /tmp/pyspark_local_template.json" >> {}'.format( + spark_script)) + sudo( + 'echo "sed -i \'14s/:",/:\/home\/dlab-user\/caffe\/python:\/home\/dlab-user\/pytorch\/build:",/\' /tmp/pyspark_local_template.json" >> {}'.format( + spark_script)) + sudo('echo \'sed -i "s|SP_VER|2.3.2|g" /tmp/pyspark_local_template.json\' >> {}'.format(spark_script)) + sudo( + 'echo "PYJ=`find /opt/spark/ -name \'*py4j*.zip\' | tr \'\\n\' \':\' | sed \'s|:$||g\'`; sed -i \'s|PY4J|'$PYJ\'|g\' /tmp/py3spark_local_template.json" >> {}'.format( + spark_script)) + sudo( + 'echo "sed -i \'14s/:",/:\/home\/dlab-user\/caffe\/python:\/home\/dlab-user\/pytorch\/build:",/\' /tmp/py3spark_local_template.json" >> {}'.format( + spark_script)) + sudo('echo \'sed -i "s|SP_VER|2.3.2|g" /tmp/py3spark_local_template.json\' >> {}'.format(spark_script)) + sudo('echo "cp /tmp/pyspark_local_template.json /home/{}/.local/share/jupyter/kernels/pyspark_local/kernel.json" >> {}'.format(os_user, spark_script)) + sudo( + 'echo "cp /tmp/py3spark_local_template.json /home/{}/.local/share/jupyter/kernels/py3spark_local/kernel.json" >> {}'.format( + os_user, spark_script)) sudo('chown {0}:{0} /etc/rc.local'.format(os_user)) sudo('cat /dev/null > /etc/rc.local') sudo('echo -e \'#!/bin/sh -e\n\nexec 2> /tmp/rc.local.log \nexec 1>&2 \nset -x\n\ndocker run -d -p : -v jup_volume:/opt/ jupyter-notebook:latest\n\nexit 0\' > /etc/rc.local') @@ -266,10 +290,7 @@ def ensure_pyspark_local_kernel(os_user, pyspark_local_path_dir, templates_dir,
[incubator-dlab] branch DLAB-3 updated: Update configure_docker.py
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a commit to branch DLAB-3 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-3 by this push: new 2e49780 Update configure_docker.py 2e49780 is described below commit 2e497802c593619edc41bec402b6ed86098081bd Author: i.oleksandr AuthorDate: Mon May 13 15:44:20 2019 +0300 Update configure_docker.py --- infrastructure-provisioning/src/ssn/scripts/configure_docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py index a7d013c..b235a6d 100644 --- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py +++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py @@ -117,7 +117,7 @@ def configure_guacamole(): sudo('docker run --name guac-mysql --restart unless-stopped -v /tmp/scripts:/tmp/scripts -v /opt/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD={} -d mysql:latest'.format(mysql_pass)) time.sleep(180) sudo('touch /opt/mysql/dock-query.sql') -sudo("""echo "CREATE DATABASE guacamole; CREATE USER 'guacamole' IDENTIFIED BY '{}'; GRANT SELECT,INSERT,UPDATE,DELETE ON guacamolala7.* TO 'guacamolala7';" > /opt/mysql/dock-query.sql""".format(mysql_pass)) +sudo("""echo "CREATE DATABASE guacamole; CREATE USER 'guacamole' IDENTIFIED BY '{}'; GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole.* TO 'guacamole';" > /opt/mysql/dock-query.sql""".format(mysql_pass)) sudo('docker exec -i guac-mysql /bin/bash -c "mysql -u root -p{} < /var/lib/mysql/dock-query.sql"'.format(mysql_pass)) sudo('docker exec -i guac-mysql /bin/bash -c "cat /tmp/scripts/initdb.sql | mysql -u root -p{} guacamole"'.format(mysql_pass)) sudo("docker run --name guacamole --restart unless-stopped --link guacd:guacd --link guac-mysql:mysql -e MYSQL_DATABASE='guacamole' -e MYSQL_USER='guacamole' -e MYSQL_PASSWORD='guacamole' -d -p 8080:8080 guacamole/guacamole") - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-3 updated: Update configure_docker.py
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a commit to branch DLAB-3 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-3 by this push: new 4f09046 Update configure_docker.py 4f09046 is described below commit 4f090467a5f8baebb8a8f5cbe63dcba74cf79af1 Author: i.oleksandr AuthorDate: Mon May 13 15:23:18 2019 +0300 Update configure_docker.py --- infrastructure-provisioning/src/ssn/scripts/configure_docker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py index 3a4df55..a7d013c 100644 --- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py +++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py @@ -114,10 +114,10 @@ def configure_guacamole(): sudo('mkdir /tmp/scripts') sudo('cp initdb.sql /tmp/scripts') sudo('mkdir /opt/mysql') -sudo('docker run --name guac-mysql -v /tmp/scripts:/tmp/scripts -v /opt/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD={} -d mysql:latest'.format(mysql_pass)) -time.sleep(1800) +sudo('docker run --name guac-mysql --restart unless-stopped -v /tmp/scripts:/tmp/scripts -v /opt/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD={} -d mysql:latest'.format(mysql_pass)) +time.sleep(180) sudo('touch /opt/mysql/dock-query.sql') -sudo("""echo "CREATE DATABASE guacamole; CREATE USER 'guacamole' IDENTIFIED BY '{}'; GRANT SELECT,INSERT,UPDATE,DELETE ON guacamolala7.* TO 'guacamolala7';" > /opt/mysql/dock-query.sql""") +sudo("""echo "CREATE DATABASE guacamole; CREATE USER 'guacamole' IDENTIFIED BY '{}'; GRANT SELECT,INSERT,UPDATE,DELETE ON guacamolala7.* TO 'guacamolala7';" > /opt/mysql/dock-query.sql""".format(mysql_pass)) sudo('docker exec -i guac-mysql /bin/bash -c "mysql -u root -p{} < /var/lib/mysql/dock-query.sql"'.format(mysql_pass)) sudo('docker exec -i guac-mysql /bin/bash -c "cat /tmp/scripts/initdb.sql | mysql -u root -p{} guacamole"'.format(mysql_pass)) sudo("docker run --name guacamole --restart unless-stopped --link guacd:guacd --link guac-mysql:mysql -e MYSQL_DATABASE='guacamole' -e MYSQL_USER='guacamole' -e MYSQL_PASSWORD='guacamole' -d -p 8080:8080 guacamole/guacamole") - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-3 updated: Update configure_docker.py
This is an automated email from the ASF dual-hosted git repository. ioleksandr pushed a commit to branch DLAB-3 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git The following commit(s) were added to refs/heads/DLAB-3 by this push: new 8ac2297 Update configure_docker.py 8ac2297 is described below commit 8ac22979b950b4da2a3f30b536ecbd5e642231e1 Author: i.oleksandr AuthorDate: Mon May 13 14:18:24 2019 +0300 Update configure_docker.py --- infrastructure-provisioning/src/ssn/scripts/configure_docker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py index 5f8c824..3a4df55 100644 --- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py +++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py @@ -27,6 +27,7 @@ import json import sys from dlab.ssn_lib import * import os +import time parser = argparse.ArgumentParser() parser.add_argument('--hostname', type=str, default='') @@ -113,7 +114,8 @@ def configure_guacamole(): sudo('mkdir /tmp/scripts') sudo('cp initdb.sql /tmp/scripts') sudo('mkdir /opt/mysql') -sudo('docker run --name guac-mysql --restart unless-stopped -v /tmp/scripts:/tmp/scripts -v /opt/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD={} -d mysql:latest'.format(mysql_pass)) +sudo('docker run --name guac-mysql -v /tmp/scripts:/tmp/scripts -v /opt/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD={} -d mysql:latest'.format(mysql_pass)) +time.sleep(1800) sudo('touch /opt/mysql/dock-query.sql') sudo("""echo "CREATE DATABASE guacamole; CREATE USER 'guacamole' IDENTIFIED BY '{}'; GRANT SELECT,INSERT,UPDATE,DELETE ON guacamolala7.* TO 'guacamolala7';" > /opt/mysql/dock-query.sql""") sudo('docker exec -i guac-mysql /bin/bash -c "mysql -u root -p{} < /var/lib/mysql/dock-query.sql"'.format(mysql_pass)) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/01: Merge pull request #122 from apache/DLAB-4
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 19578916f5b1983824328cc416310d092f86763a Merge: d5efe85 2953957 Author: bhliva AuthorDate: Mon May 13 13:00:52 2019 +0300 Merge pull request #122 from apache/DLAB-4 [DLAB-4]: fixed location and token for connection .../src/app/core/services/healthStatus.service.ts | 2 +- .../resources-grid/resources-grid.component.html | 2 +- .../src/app/shared/navbar/navbar.component.html| 2 +- .../src/app/shared/navbar/navbar.component.scss| 5 - .../src/app/shared/navbar/navbar.component.ts | 2 +- .../src/app/webterminal/webterminal.component.scss | 9 +++- .../src/app/webterminal/webterminal.component.ts | 26 ++ 7 files changed, 28 insertions(+), 20 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch develop updated (d5efe85 -> 1957891)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. from d5efe85 Merge pull request #121 from apache/DLAB-4 add 2ec9c37 [DLAB-4]: fixed location and token for connection add 3b38426 [DLAB-290]: added hint for commit trimmed field add 2953957 [DLAB-290]: fixed metadata error handling new 1957891 Merge pull request #122 from apache/DLAB-4 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. Summary of changes: .../src/app/core/services/healthStatus.service.ts | 2 +- .../resources-grid/resources-grid.component.html | 2 +- .../src/app/shared/navbar/navbar.component.html| 2 +- .../src/app/shared/navbar/navbar.component.scss| 5 - .../src/app/shared/navbar/navbar.component.ts | 2 +- .../src/app/webterminal/webterminal.component.scss | 9 +++- .../src/app/webterminal/webterminal.component.ts | 26 ++ 7 files changed, 28 insertions(+), 20 deletions(-) - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-4 deleted (was 2953957)
This is an automated email from the ASF dual-hosted git repository. bhliva pushed a change to branch DLAB-4 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. was 2953957 [DLAB-290]: fixed metadata error handling The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository. - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] branch DLAB-4 created (now 2953957)
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a change to branch DLAB-4 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git. at 2953957 [DLAB-290]: fixed metadata error handling This branch includes the following new commits: new 2ec9c37 [DLAB-4]: fixed location and token for connection new 3b38426 [DLAB-290]: added hint for commit trimmed field new 2953957 [DLAB-290]: fixed metadata error handling The 3 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-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 01/03: [DLAB-4]: fixed location and token for connection
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a commit to branch DLAB-4 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 2ec9c3767d491516380fffccdfb2a049f516e400 Author: Andriana Kovalyshyn AuthorDate: Mon May 13 12:55:39 2019 +0300 [DLAB-4]: fixed location and token for connection --- .../src/app/webterminal/webterminal.component.scss | 9 +++- .../src/app/webterminal/webterminal.component.ts | 26 ++ 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/webterminal/webterminal.component.scss b/services/self-service/src/main/resources/webapp/src/app/webterminal/webterminal.component.scss index 57b8cc4..cdf9269 100644 --- a/services/self-service/src/main/resources/webapp/src/app/webterminal/webterminal.component.scss +++ b/services/self-service/src/main/resources/webapp/src/app/webterminal/webterminal.component.scss @@ -19,5 +19,12 @@ #terminal { height: 100vh; - display: block; + display: flex; + flex-direction: column; + align-items: center; +} +@media screen and (min-width: 1281px) { + #terminal { +justify-content: center; + } } diff --git a/services/self-service/src/main/resources/webapp/src/app/webterminal/webterminal.component.ts b/services/self-service/src/main/resources/webapp/src/app/webterminal/webterminal.component.ts index eae2e12..e11964f 100644 --- a/services/self-service/src/main/resources/webapp/src/app/webterminal/webterminal.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/webterminal/webterminal.component.ts @@ -17,12 +17,13 @@ * under the License. */ -import { Component, OnInit, ViewEncapsulation, ViewContainerRef, ViewChild, Renderer2, ElementRef, Inject } from '@angular/core'; +import { Component, OnInit, ViewEncapsulation, ViewContainerRef, ViewChild, Inject } from '@angular/core'; import { DOCUMENT } from '@angular/common'; import { ActivatedRoute } from '@angular/router'; - import Guacamole from 'guacamole-common-js'; +import { StorageService } from '../core/services'; + @Component({ selector: 'dlab-webterminal', templateUrl: './webterminal.component.html', @@ -33,9 +34,8 @@ export class WebterminalComponent implements OnInit { @ViewChild('terminal', { read: ViewContainerRef }) terminal: ViewContainerRef; constructor( -private elementRef: ElementRef, -private renderer: Renderer2, private route: ActivatedRoute, +private storageService: StorageService, @Inject(DOCUMENT) private document) { } @@ -45,33 +45,31 @@ export class WebterminalComponent implements OnInit { this.open(this.id); } - open(parameters) { - + public open(id_parameter: string) { const tunnel = new Guacamole.HTTPTunnel( - 'https://localhost:8443/api/tunnel', false, - { 'Authorization': 'Bearer token123' } + `${window.location.origin}/api/tunnel`, false, + { 'Authorization': `Bearer ${this.storageService.getToken()}` } ); + const guac = new Guacamole.Client(tunnel); const display = document.getElementById('display'); display.appendChild(guac.getDisplay().getElement()); - -guac.connect('52.10.77.216'); +const guacDisplay = guac.getDisplay(); +const layer = guacDisplay.getDefaultLayer(); +guac.connect(id_parameter); // Error handler -guac.onerror = (error) => alert(error); +guac.onerror = (error) => console.log(error.message); window.onunload = () => guac.disconnect(); // Mouse const mouse = new Guacamole.Mouse(guac.getDisplay().getElement()); - mouse.onmousemove = (mouseState) => guac.sendMouseState(mouseState); // Keyboard const keyboard = new Guacamole.Keyboard(document); - keyboard.onkeydown = (keysym) => guac.sendKeyEvent(1, keysym); - keyboard.onkeyup = (keysym) => guac.sendKeyEvent(0, keysym); } } - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 03/03: [DLAB-290]: fixed metadata error handling
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a commit to branch DLAB-4 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 29539573d3c4fd8e31166bd4d64eb084febcd0ba Author: Andriana Kovalyshyn AuthorDate: Mon May 13 12:58:04 2019 +0300 [DLAB-290]: fixed metadata error handling --- .../main/resources/webapp/src/app/core/services/healthStatus.service.ts | 2 +- .../src/app/resources/resources-grid/resources-grid.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/core/services/healthStatus.service.ts b/services/self-service/src/main/resources/webapp/src/app/core/services/healthStatus.service.ts index 545c481..4908bc5 100644 --- a/services/self-service/src/main/resources/webapp/src/app/core/services/healthStatus.service.ts +++ b/services/self-service/src/main/resources/webapp/src/app/core/services/healthStatus.service.ts @@ -181,7 +181,7 @@ export class HealthStatusService { .buildGetAppMetaData() .pipe( map(response => response), -catchError(error => error)); +catchError(ErrorUtils.handleServiceError)); } public resetStatusValue() { diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html index 559cd13..d5536c7 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/resources/resources-grid/resources-grid.component.html @@ -141,7 +141,7 @@ developer_board Manage libraries - + laptop Open terminal - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org
[incubator-dlab] 02/03: [DLAB-290]: added hint for commit trimmed field
This is an automated email from the ASF dual-hosted git repository. ankovalyshyn pushed a commit to branch DLAB-4 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git commit 3b3842673c5a0b6d97228925c8ecb3cb58c3c528 Author: Andriana Kovalyshyn AuthorDate: Mon May 13 12:56:59 2019 +0300 [DLAB-290]: added hint for commit trimmed field --- .../resources/webapp/src/app/shared/navbar/navbar.component.html | 2 +- .../resources/webapp/src/app/shared/navbar/navbar.component.scss | 5 - .../main/resources/webapp/src/app/shared/navbar/navbar.component.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html index 8bb75c9..6c3ca0f 100644 --- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.html @@ -58,7 +58,7 @@ Revision: -{{ metadata?.commit }} +{{ metadata?.commit }} diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss index 45bc4da..e941536 100644 --- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss +++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.scss @@ -103,7 +103,7 @@ width: 120px; display: inline-block; } -.helper_instructiongit { +.helper_instruction { font-size: 14px; i { vertical-align: bottom; @@ -115,6 +115,9 @@ vertical-align: bottom; } } + .commit { +cursor: pointer; + } } a.nav-item { position: relative; diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts index aab32e2..ef87728 100644 --- a/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/shared/navbar/navbar.component.ts @@ -204,7 +204,7 @@ export class NavbarComponent implements OnInit, OnDestroy { public checkVersionData(): void { this.healthStatusService.getAppMetaData().subscribe( result => this.metadata = result || null, - error => console.log(error)); + error => this.toastr.error('Metadata loading failed!', 'Oops!')); } private selectQuotesAlert(type: string, user_quota?: number, total_quota?: number): string { - To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org For additional commands, e-mail: commits-h...@dlab.apache.org