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 <i.oleksa...@gmail.com>
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

Reply via email to