[incubator-dlab] branch DLAB-terraform updated: Add copyright disclaimers

2019-07-04 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-terraform by this push:
 new 4d64d2d  Add copyright disclaimers
4d64d2d is described below

commit 4d64d2de1fca6a08fdb7bcfddf2df415d2f4
Author: Oleksandr_Isniuk 
AuthorDate: Thu Jul 4 18:44:57 2019 +0300

Add copyright disclaimers
---
 .../aws/modules/dlab-ui/dlab-ui-chart/.helmignore  | 21 +
 .../aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml   | 21 +
 .../dlab-ui/dlab-ui-chart/templates/NOTES.txt  | 21 +
 .../dlab-ui/dlab-ui-chart/templates/_helpers.tpl   | 20 
 .../dlab-ui-chart/templates/deployment.yaml| 20 
 .../dlab-ui/dlab-ui-chart/templates/ingress.yaml   | 22 +-
 .../dlab-ui/dlab-ui-chart/templates/service.yaml   | 21 +
 .../aws/modules/dlab-ui/dlab-ui-chart/values.yaml  | 21 +
 8 files changed, 166 insertions(+), 1 deletion(-)

diff --git 
a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/.helmignore
 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/.helmignore
index 50af031..4976779 100644
--- 
a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/.helmignore
+++ 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/.helmignore
@@ -1,3 +1,24 @@
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# 
**
+
 # Patterns to ignore when building packages.
 # This supports shell glob matching, relative path matching, and
 # negation (prefixed with !). Only one pattern per line.
diff --git 
a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml
 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml
index 0fe03fe..3e7800b 100644
--- 
a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml
+++ 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml
@@ -1,3 +1,24 @@
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# 
**
+
 apiVersion: v1
 appVersion: "1.0"
 description: A Helm chart for Kubernetes
diff --git 
a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/NOTES.txt
 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/NOTES.txt
index 27f3f3a..3d3445a 100644
--- 
a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/NOTES.txt
+++ 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/NOTES.txt
@@ -1,3 +1,24 @@
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The

[incubator-dlab] branch DLAB-terraform updated: [DLAB-759] TF module for Mongo-HA [DLAB-836] TF module for nginx load balancer [DLAB-811] chart for dlab-ui

2019-07-04 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-terraform by this push:
 new 7733f96  [DLAB-759] TF module for Mongo-HA [DLAB-836] TF module for 
nginx load balancer [DLAB-811] chart for dlab-ui
7733f96 is described below

commit 7733f9665cc05adf4ee3772109b549a1dc13686e
Author: Oleksandr_Isniuk 
AuthorDate: Thu Jul 4 17:58:16 2019 +0300

[DLAB-759] TF module for Mongo-HA
[DLAB-836] TF module for nginx load balancer
[DLAB-811] chart for dlab-ui
---
 .../aws/modules/dlab-ui/dlab-ui-chart/.helmignore  | 22 
 .../aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml   |  5 ++
 .../dlab-ui/dlab-ui-chart/templates/NOTES.txt  | 21 
 .../dlab-ui/dlab-ui-chart/templates/_helpers.tpl   | 45 
 .../dlab-ui-chart/templates/deployment.yaml| 52 ++
 .../dlab-ui/dlab-ui-chart/templates/ingress.yaml   | 35 +
 .../dlab-ui/dlab-ui-chart/templates/service.yaml   | 16 ++
 .../aws/modules/dlab-ui/dlab-ui-chart/values.yaml  | 49 +
 .../terraform/aws/modules/dlab-ui/dlab-ui.tf   | 20 +++
 .../terraform/aws/modules/mongo/mongo.tf   | 61 ++
 .../terraform/aws/modules/mongo/variables.tf   | 40 ++
 .../terraform/aws/modules/nginx/nginx.tf   | 48 +
 .../terraform/aws/modules/nginx/variables.tf   | 28 ++
 13 files changed, 442 insertions(+)

diff --git 
a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/.helmignore
 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/.helmignore
new file mode 100644
index 000..50af031
--- /dev/null
+++ 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/.helmignore
@@ -0,0 +1,22 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git 
a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml
 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml
new file mode 100644
index 000..0fe03fe
--- /dev/null
+++ 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/Chart.yaml
@@ -0,0 +1,5 @@
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for Kubernetes
+name: dlab-ui
+version: 0.1.0
diff --git 
a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/NOTES.txt
 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/NOTES.txt
new file mode 100644
index 000..27f3f3a
--- /dev/null
+++ 
b/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/NOTES.txt
@@ -0,0 +1,21 @@
+1. Get the application URL by running these commands:
+{{- if .Values.ingress.enabled }}
+{{- range $host := .Values.ingress.hosts }}
+  {{- range .paths }}
+  http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
+  {{- end }}
+{{- end }}
+{{- else if contains "NodePort" .Values.service.type }}
+  export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o 
jsonpath="{.spec.ports[0].nodePort}" services {{ include "dlab-ui.fullname" . 
}})
+  export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o 
jsonpath="{.items[0].status.addresses[0].address}")
+  echo http://$NODE_IP:$NODE_PORT
+{{- else if contains "LoadBalancer" .Values.service.type }}
+ NOTE: It may take a few minutes for the LoadBalancer IP to be available.
+   You can watch the status of by running 'kubectl get --namespace {{ 
.Release.Namespace }} svc -w {{ include "dlab-ui.fullname" . }}'
+  export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ 
include "dlab-ui.fullname" . }} -o 
jsonpath='{.status.loadBalancer.ingress[0].ip}')
+  echo http://$SERVICE_IP:{{ .Values.service.port }}
+{{- else if contains "ClusterIP" .Values.service.type }}
+  export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l 
"app.kubernetes.io/name={{ include "dlab-ui.name" . 
}},app.kubernetes.io/instance={{ .Release.Name }}" -o 
jsonpath="{.items[0].metadata.name}")
+  echo "Visit http://127.0.0.1:8080 to use your application"
+  kubectl port-forward $POD_NAME 8080:80
+{{- end }}
diff --git 
a/infrastructure-provisioning/terraform/aws/modules/dlab-ui/dlab-ui-chart/templates/_helpers.tpl
 
b/infrastructure-provisioning/terraform/aws/mo

[incubator-dlab] branch DLAB-657 updated: [DLAB-656] Prepare docker images for MongoDB/UI/Billing services

2019-06-06 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 205c3bc  [DLAB-656] Prepare docker images for MongoDB/UI/Billing 
services
205c3bc is described below

commit 205c3bc5c6ae2595043d0d6096bc343e023d9b5f
Author: Oleksandr_Isniuk 
AuthorDate: Thu Jun 6 16:23:52 2019 +0300

[DLAB-656] Prepare docker images for MongoDB/UI/Billing services
---
 infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py | 4 ++--
 infrastructure-provisioning/src/ssn/scripts/configure_mongo.py   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

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 9079c99..84c6a9a 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
@@ -175,7 +175,7 @@ def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
  locale, region_info, ldap_login, tenant_id,
  application_id, hostname, data_lake_name, subscription_id,
  validate_permission_scope, dlab_id, usage_date, product,
- usage_type, usage, cost, resource_id, tags, report_path=''):
+ usage_type, usage, cost, resource_id, tags, report_path='', 
k8s=False):
 try:
 if not exists(os.environ['ssn_dlab_path'] + 'tmp/ss_started'):
 java_path = sudo("update-alternatives --query java | grep 'Value: 
' | grep -o '/.*/jre'")
@@ -281,7 +281,7 @@ def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
 except:
 append_result("Unable to generate cert and copy to java 
keystore")
 sys.exit(1)
-if kuber_enabled:
+if k8s:
 try:
 dlab_source_dir = 
'{}sources/infrastructure-provisioning/src/'.format(dlab_path)
 k8s_dir = '{}tmp-kuber/'.format(dlab_source_dir)
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
index 1a0cbab..301b228 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
@@ -36,7 +36,7 @@ parser = argparse.ArgumentParser()
 parser.add_argument('--dlab_path', type=str, default='')
 parser.add_argument('--mongo_parameters', type=str, default='')
 parser.add_argument('--cloud_provider', type=str, default='')
-parser.add_argument('--kuber', type=str, default=True)
+parser.add_argument('--k8s', type=str, default=False)
 args = parser.parse_args()
 
 
@@ -81,7 +81,7 @@ if __name__ == "__main__":
 # Setting up admin's password and enabling security
 client = MongoClient(mongo_ip + ':' + str(mongo_port))
 pass_upd = True
-if args.kuber:
+if args.k8s:
 local("cd {}sources/infrastructure-provisioning/src/; docker build 
--build-arg CLOUD_PROVIDER={} --file ssn/files/os/mongo_Dockerfile -t 
docker.dlab-mongo ."
  .format(args.dlab_path, args.cloud_provider))
 local("mkdir -p /opt/mongo_vol")


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



[incubator-dlab] branch DLAB-657 updated: fixes

2019-06-06 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new aa35372  fixes
aa35372 is described below

commit aa3537275c59f46a8221c3a457c5c8c8adf5e17a
Author: Oleksandr_Isniuk 
AuthorDate: Thu Jun 6 11:54:21 2019 +0300

fixes
---
 infrastructure-provisioning/src/ssn/scripts/configure_mongo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
index ee792d8..1a0cbab 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
@@ -86,7 +86,7 @@ if __name__ == "__main__":
  .format(args.dlab_path, args.cloud_provider))
 local("mkdir -p /opt/mongo_vol")
 local("docker run --name dlab-mongo -p 27017:27017 -v 
/opt/mongo_vol:/data/db -d docker.dlab-mongo --smallfiles")
-local("docker exec dlab-mongo sh -c 'mongo < /root/create_db.js'")
+local("sleep 10; docker exec dlab-mongo sh -c 'mongo < 
/root/create_db.js'")
 local("docker exec dlab-mongo sh -c 'mongoimport --jsonArray --db 
dlabdb --collection roles --file /root/mongo_roles.json'")
 else:
 try:


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



[incubator-dlab] branch DLAB-657 updated: fixes

2019-06-06 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new d8a683b  fixes
d8a683b is described below

commit d8a683b133de2e4b3866d862246c0ba3f64fa16a
Author: Oleksandr_Isniuk 
AuthorDate: Thu Jun 6 11:21:51 2019 +0300

fixes
---
 infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile 
b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
index e0d7ff2..9c2a6b5 100644
--- a/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
+++ b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
@@ -29,7 +29,7 @@ COPY ssn/files/${CLOUD_PROVIDER}/mongo_roles.json /root/
 RUN mv /root/mongodb.conf /etc/mongodb.conf
 
 RUN mkdir -p /data/logs \
-chown -R mongodb:mongodb /data/logs
+&& chown -R mongodb:mongodb /data/logs
 
 CMD ["mongod", "--config", "/etc/mongodb.conf"]
 


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



[incubator-dlab] branch DLAB-657 updated: fixes

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new be97067  fixes
be97067 is described below

commit be9706770f35afbbc92cbdb591f38f0c37c3ffae
Author: Oleksandr_Isniuk 
AuthorDate: Wed Jun 5 18:27:41 2019 +0300

fixes
---
 infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile 
b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
index a558c77..e0d7ff2 100644
--- a/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
+++ b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
@@ -28,7 +28,7 @@ COPY ssn/files/os/mongodb.conf /root/
 COPY ssn/files/${CLOUD_PROVIDER}/mongo_roles.json /root/
 RUN mv /root/mongodb.conf /etc/mongodb.conf
 
-RUN chown -R mongodb:mongodb /data/db2 && \
+RUN mkdir -p /data/logs \
 chown -R mongodb:mongodb /data/logs
 
 CMD ["mongod", "--config", "/etc/mongodb.conf"]


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



[incubator-dlab] branch DLAB-657 updated: fixes

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 690efb0  fixes
690efb0 is described below

commit 690efb0e5a96b58fdd12cacfa5ea57a4f607865b
Author: Oleksandr_Isniuk 
AuthorDate: Wed Jun 5 17:51:43 2019 +0300

fixes
---
 infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile 
b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
index e254491..a558c77 100644
--- a/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
+++ b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
@@ -28,7 +28,7 @@ COPY ssn/files/os/mongodb.conf /root/
 COPY ssn/files/${CLOUD_PROVIDER}/mongo_roles.json /root/
 RUN mv /root/mongodb.conf /etc/mongodb.conf
 
-RUN && chown -R mongodb:mongodb /data/db2 && \
+RUN chown -R mongodb:mongodb /data/db2 && \
 chown -R mongodb:mongodb /data/logs
 
 CMD ["mongod", "--config", "/etc/mongodb.conf"]


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



[incubator-dlab] branch DLAB-657 updated: fixes

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 796e295  fixes
796e295 is described below

commit 796e2953448c239ae2f4b7197d9dfb496be58525
Author: Oleksandr_Isniuk 
AuthorDate: Wed Jun 5 17:33:20 2019 +0300

fixes
---
 infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile  | 4 +---
 infrastructure-provisioning/src/ssn/scripts/configure_mongo.py | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile 
b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
index 994adfd..e254491 100644
--- a/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
+++ b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
@@ -28,9 +28,7 @@ COPY ssn/files/os/mongodb.conf /root/
 COPY ssn/files/${CLOUD_PROVIDER}/mongo_roles.json /root/
 RUN mv /root/mongodb.conf /etc/mongodb.conf
 
-RUN mkdir -p /data/db2 \
-&& mkdir -p /data/logs \
-&& chown -R mongodb:mongodb /data/db2 && \
+RUN && chown -R mongodb:mongodb /data/db2 && \
 chown -R mongodb:mongodb /data/logs
 
 CMD ["mongod", "--config", "/etc/mongodb.conf"]
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
index 9ab678a..ee792d8 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
@@ -84,8 +84,8 @@ if __name__ == "__main__":
 if args.kuber:
 local("cd {}sources/infrastructure-provisioning/src/; docker build 
--build-arg CLOUD_PROVIDER={} --file ssn/files/os/mongo_Dockerfile -t 
docker.dlab-mongo ."
  .format(args.dlab_path, args.cloud_provider))
-local("mkdir -p /opt/mongo-vol")
-local("docker run --name dlab-mongo -p 27017:27017 -v 
/opt/mongo_vol:/data/db2 -d docker.dlab-mongo")
+local("mkdir -p /opt/mongo_vol")
+local("docker run --name dlab-mongo -p 27017:27017 -v 
/opt/mongo_vol:/data/db -d docker.dlab-mongo --smallfiles")
 local("docker exec dlab-mongo sh -c 'mongo < /root/create_db.js'")
 local("docker exec dlab-mongo sh -c 'mongoimport --jsonArray --db 
dlabdb --collection roles --file /root/mongo_roles.json'")
 else:


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



[incubator-dlab] branch DLAB-657 updated: Update configure_mongo.py

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 340e5ae  Update configure_mongo.py
340e5ae is described below

commit 340e5ae7dd422625d1f5b50f5854f3b39d897d5d
Author: i.oleksandr 
AuthorDate: Wed Jun 5 15:32:00 2019 +0300

Update configure_mongo.py
---
 infrastructure-provisioning/src/ssn/scripts/configure_mongo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
index 469c0b3..1fbf3fb 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
@@ -85,7 +85,7 @@ if __name__ == "__main__":
 local("cd {}sources/infrastructure-provisioning/src/; docker build 
--build-arg CLOUD_PROVIDER={} --file ssn/files/os/mongo_Dockerfile -t 
docker.dlab-mongo ."
  .format(args.dlab_path, args.cloud_provider))
 local("mkdir -p /opt/mongo-vol")
-local("docker run --name dlab-mongo -p 27017:27017 -v -d 
docker.dlab-mongo")
+local("docker run --name dlab-mongo -p 27017:27017 -v 
/opt/mongo_vol:/data/db2 -d docker.dlab-mongo")
 local("docker exec some-mongo sh -c 'mongo < /root/create_db.js'")
 local("docker exec some-mongo sh -c 'mongoimport --jsonArray --db 
dlabdb --collection roles --file /root/mongo_roles.json'")
 else:


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



[incubator-dlab] branch DLAB-657 updated: Update mongo_Dockerfile

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 7a7d91c  Update mongo_Dockerfile
7a7d91c is described below

commit 7a7d91c6c39dfcd21ff7004421621c0a750a1ee1
Author: i.oleksandr 
AuthorDate: Wed Jun 5 15:11:29 2019 +0300

Update mongo_Dockerfile
---
 infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile 
b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
index 62dacf0..994adfd 100644
--- a/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
+++ b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
@@ -24,6 +24,7 @@ FROM mongo:4.0-xenial
 ARG CLOUD_PROVIDER
 
 COPY ssn/files/os/create_db.js /root/
+COPY ssn/files/os/mongodb.conf /root/
 COPY ssn/files/${CLOUD_PROVIDER}/mongo_roles.json /root/
 RUN mv /root/mongodb.conf /etc/mongodb.conf
 


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



[incubator-dlab] branch DLAB-657 updated: Update configure_mongo.py

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 380136c  Update configure_mongo.py
380136c is described below

commit 380136c287c7e3e58d77a091dd17d06f6f6f8795
Author: i.oleksandr 
AuthorDate: Wed Jun 5 14:15:33 2019 +0300

Update configure_mongo.py
---
 infrastructure-provisioning/src/ssn/scripts/configure_mongo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
index 57c556b..469c0b3 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
@@ -82,7 +82,7 @@ if __name__ == "__main__":
 client = MongoClient(mongo_ip + ':' + str(mongo_port))
 pass_upd = True
 if args.kuber:
-local("cd {}infrastructure-provisioning/src/; docker build --build-arg 
CLOUD_PROVIDER={} --file ssn/files/os/mongo_Dockerfile -t docker.dlab-mongo ."
+local("cd {}sources/infrastructure-provisioning/src/; docker build 
--build-arg CLOUD_PROVIDER={} --file ssn/files/os/mongo_Dockerfile -t 
docker.dlab-mongo ."
  .format(args.dlab_path, args.cloud_provider))
 local("mkdir -p /opt/mongo-vol")
 local("docker run --name dlab-mongo -p 27017:27017 -v -d 
docker.dlab-mongo")


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



[incubator-dlab] branch DLAB-657 updated: Update configure_mongo.py

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 014ae9b  Update configure_mongo.py
014ae9b is described below

commit 014ae9b0ff34f0b0dc169e28dbf9f376c836d78e
Author: i.oleksandr 
AuthorDate: Wed Jun 5 13:53:26 2019 +0300

Update configure_mongo.py
---
 infrastructure-provisioning/src/ssn/scripts/configure_mongo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
index 4115798..57c556b 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
@@ -82,7 +82,7 @@ if __name__ == "__main__":
 client = MongoClient(mongo_ip + ':' + str(mongo_port))
 pass_upd = True
 if args.kuber:
-local("cd {}; docker build --build-arg CLOUD_PROVIDER={} --file 
ssn/files/os/mongo_Dockerfile -t docker.dlab-mongo ."
+local("cd {}infrastructure-provisioning/src/; docker build --build-arg 
CLOUD_PROVIDER={} --file ssn/files/os/mongo_Dockerfile -t docker.dlab-mongo ."
  .format(args.dlab_path, args.cloud_provider))
 local("mkdir -p /opt/mongo-vol")
 local("docker run --name dlab-mongo -p 27017:27017 -v -d 
docker.dlab-mongo")


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



[incubator-dlab] branch DLAB-657 updated: Update configure_mongo.py

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 3642dda  Update configure_mongo.py
3642dda is described below

commit 3642dda8159eb75dbb8a9b68e8ce74f0701a6e3a
Author: i.oleksandr 
AuthorDate: Wed Jun 5 13:16:25 2019 +0300

Update configure_mongo.py
---
 infrastructure-provisioning/src/ssn/scripts/configure_mongo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
index d64fbee..4115798 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
@@ -81,7 +81,7 @@ if __name__ == "__main__":
 # Setting up admin's password and enabling security
 client = MongoClient(mongo_ip + ':' + str(mongo_port))
 pass_upd = True
-if kuber:
+if args.kuber:
 local("cd {}; docker build --build-arg CLOUD_PROVIDER={} --file 
ssn/files/os/mongo_Dockerfile -t docker.dlab-mongo ."
  .format(args.dlab_path, args.cloud_provider))
 local("mkdir -p /opt/mongo-vol")


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



[incubator-dlab] branch DLAB-657 updated: fix

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 0f68cfa  fix
 new 989ad83  Merge remote-tracking branch 'origin/DLAB-657' into DLAB-657
0f68cfa is described below

commit 0f68cfa53ea3c0bfb835e1855e2e7a4ae60130c7
Author: Oleksandr_Isniuk 
AuthorDate: Wed Jun 5 12:55:48 2019 +0300

fix
---
 infrastructure-provisioning/src/general/lib/os/debian/common_lib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py 
b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
index b4a5ca5..2cc64a8 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
@@ -64,7 +64,7 @@ def change_pkg_repos():
 sudo('touch /tmp/pkg_china_ensured')
 
 
-def update-alternatives --query java | grep 'Value: ' | grep -o '/.*/jre'():
+def find_java_path_remote():
 java_path = sudo("sh -c \"update-alternatives --query java | grep 'Value: 
' | grep -o '/.*/jre'\"")
 return java_path
 


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



[incubator-dlab] branch DLAB-657 updated: Update configure_mongo.py

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new e647dbe  Update configure_mongo.py
e647dbe is described below

commit e647dbe8006c44f048be9515cce0dd4ed555c217
Author: i.oleksandr 
AuthorDate: Wed Jun 5 11:52:17 2019 +0300

Update configure_mongo.py
---
 infrastructure-provisioning/src/ssn/scripts/configure_mongo.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
index b4f26d6..d64fbee 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
@@ -36,7 +36,7 @@ parser = argparse.ArgumentParser()
 parser.add_argument('--dlab_path', type=str, default='')
 parser.add_argument('--mongo_parameters', type=str, default='')
 parser.add_argument('--cloud_provider', type=str, default='')
-parser.add_argument('--kuber', type=str, default=False)
+parser.add_argument('--kuber', type=str, default=True)
 args = parser.parse_args()
 
 


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



[incubator-dlab] branch DLAB-657 updated: fix+redhat version

2019-06-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 577b815  fix+redhat version
577b815 is described below

commit 577b815147be5c5e7c034c2f95793bf04cc841b9
Author: Oleksandr_Isniuk 
AuthorDate: Wed Jun 5 11:14:50 2019 +0300

fix+redhat version
---
 .../src/general/lib/os/debian/ssn_lib.py   |  4 +-
 .../src/general/lib/os/redhat/ssn_lib.py   |  4 +-
 .../files/aws => ssn/files/os}/billing_Dockerfile  |  0
 .../src/ssn/files/os/create_db.js  |  8 
 .../files/os/mongo_Dockerfile} | 24 +---
 .../src/ssn/files/os/mongodb.conf  | 42 
 .../files/aws => ssn/files/os}/webui_Dockerfile|  0
 .../src/ssn/scripts/configure_mongo.py | 45 ++
 .../src/ssn/scripts/configure_ui.py|  4 +-
 9 files changed, 94 insertions(+), 37 deletions(-)

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 eef8b25..9079c99 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
@@ -292,9 +292,9 @@ def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
 sudo("cp -r {0}webapp/provisioning-service/lib/*.jar 
{1}".format(dlab_path, k8s_dir))
 sudo("cp -r {0}webapp/billing/lib/*.jar 
{1}".format(dlab_path, k8s_dir))
 sudo('sed -i "s|ssn.yml|/root/ssn.yml|g" 
{}self-service.yml'.format(k8s_dir))
-sudo("cd {}; docker build --file 
general/files/aws/webui_Dockerfile -t docker.dlab-ui ."
+sudo("cd {}; docker build --file 
ssn/files/os/webui_Dockerfile -t docker.dlab-ui ."
 .format(dlab_source_dir))
-sudo("cd {}; docker build --file 
general/files/aws/billing_Dockerfile -t docker.dlab-billing ."
+sudo("cd {}; docker build --file 
ssn/files/os/billing_Dockerfile -t docker.dlab-billing ."
 .format(dlab_source_dir))
 sudo("rm -rf {}".format(k8s_dir))
 except Exception as err:
diff --git a/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py 
b/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
index 502e8c8..9d22c73 100644
--- a/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
@@ -323,9 +323,9 @@ def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
 sudo("cp -r {0}webapp/provisioning-service/lib/*.jar 
{1}".format(dlab_path, k8s_dir))
 sudo("cp -r {0}webapp/billing/lib/*.jar 
{1}".format(dlab_path, k8s_dir))
 sudo('sed -i "s|ssn.yml|/root/ssn.yml|g" 
{}self-service.yml'.format(k8s_dir))
-sudo("cd {}; docker build --file 
general/files/aws/webui_Dockerfile -t docker.dlab-ui ."
+sudo("cd {}; docker build --file 
ssn/files/os/webui_Dockerfile -t docker.dlab-ui ."
 .format(dlab_source_dir))
-sudo("cd {}; docker build --file 
general/files/aws/billing_Dockerfile -t docker.dlab-billing ."
+sudo("cd {}; docker build --file 
ssn/files/os/billing_Dockerfile -t docker.dlab-billing ."
 .format(dlab_source_dir))
 sudo("rm -rf {}".format(k8s_dir))
 except Exception as err:
diff --git 
a/infrastructure-provisioning/src/general/files/aws/billing_Dockerfile 
b/infrastructure-provisioning/src/ssn/files/os/billing_Dockerfile
similarity index 100%
copy from infrastructure-provisioning/src/general/files/aws/billing_Dockerfile
copy to infrastructure-provisioning/src/ssn/files/os/billing_Dockerfile
diff --git a/infrastructure-provisioning/src/ssn/files/os/create_db.js 
b/infrastructure-provisioning/src/ssn/files/os/create_db.js
new file mode 100644
index 000..96163d2
--- /dev/null
+++ b/infrastructure-provisioning/src/ssn/files/os/create_db.js
@@ -0,0 +1,8 @@
+use dlabdb
+db.createUser(
+{
+  user: "admin",
+  pwd: "PASSWORD",
+  roles: [{'role':'userAdminAnyDatabase','db':'admin'}]
+}
+);
diff --git 
a/infrastructure-provisioning/src/general/files/aws/billing_Dockerfile 
b/infrastructure-provisioning/src/ssn/files/os/mongo_Dockerfile
similarity index 64%
rename from infrastructure-provisioning/src/general/files/aws/billing_Dockerf

[incubator-dlab] branch DLAB-657 updated: fix+redhat version

2019-05-27 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new 9e97347  fix+redhat version
9e97347 is described below

commit 9e973471b9ef7fe4cf69bd8a7db9b0120fd00b05
Author: Oleksandr_Isniuk 
AuthorDate: Mon May 27 17:55:53 2019 +0300

fix+redhat version
---
 .../src/general/lib/os/debian/common_lib.py|  2 +-
 .../src/general/lib/os/debian/ssn_lib.py   | 22 +-
 .../src/general/lib/os/redhat/ssn_lib.py   | 49 +++---
 3 files changed, 37 insertions(+), 36 deletions(-)

diff --git 
a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py 
b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
index 2cc64a8..b4a5ca5 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/common_lib.py
@@ -64,7 +64,7 @@ def change_pkg_repos():
 sudo('touch /tmp/pkg_china_ensured')
 
 
-def find_java_path_remote():
+def update-alternatives --query java | grep 'Value: ' | grep -o '/.*/jre'():
 java_path = sudo("sh -c \"update-alternatives --query java | grep 'Value: 
' | grep -o '/.*/jre'\"")
 return java_path
 
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 eac937e..eef8b25 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
@@ -296,6 +296,7 @@ def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
 .format(dlab_source_dir))
 sudo("cd {}; docker build --file 
general/files/aws/billing_Dockerfile -t docker.dlab-billing ."
 .format(dlab_source_dir))
+sudo("rm -rf {}".format(k8s_dir))
 except Exception as err:
 traceback.print_exc()
 print('Failed to build images for services: ', str(err))
@@ -321,27 +322,6 @@ def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
 print('Failed to start Self-service: ', str(err))
 sys.exit(1)
 
-
-def create_kuber_images(dlab_path):
-try:
-dlab_source_dir = 
'{}sources/infrastructure-provisioning/src/'.format(dlab_path)
-k8s_dir = '{}tmp-kuber/'.format(dlab_source_dir)
-sudo("mkdir {}".format(k8s_dir))
-sudo("cp -r {0}conf/ {1}".format(dlab_path))
-sudo("cp -r {0}webapp/self-service/lib/*.jar {1}".format(dlab_path, 
k8s_dir))
-sudo("cp -r {0}webapp/security-service/lib/*.jar 
{1}".format(dlab_path, k8s_dir))
-sudo("cp -r {0}webapp/provisioning-service/lib/*.jar 
{1}".format(dlab_path, k8s_dir))
-sudo("cp -r {0}webapp/billing/lib/*.jar {1}".format(dlab_path, 
k8s_dir))
-sudo('sed -i "s|ssn.yml|/root/ssn.yml|g" 
{}self-service.yml'.format(k8s_dir))
-sudo("cd {}; docker build --file general/files/aws/webui_Dockerfile -t 
docker.dlab-ui .".format(dlab_source_dir))
-sudo("cd {}; docker build --file general/files/aws/billing_Dockerfile 
-t docker.dlab-billing ."
- .format(dlab_source_dir))
-
-except Exception as err:
-traceback.print_exc()
-print('Failed to build images for Kubernetes', str(err))
-sys.exit(1)
-
 def install_build_dep():
 try:
 if not 
exists('{}tmp/build_dep_ensured'.format(os.environ['ssn_dlab_path'])):
diff --git a/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py 
b/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
index 164dfc5..502e8c8 100644
--- a/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/redhat/ssn_lib.py
@@ -216,17 +216,6 @@ def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
 sudo('mv /tmp/ssn.yml ' + os.environ['ssn_dlab_path'] + 'conf/')
 put('/root/templates/proxy_location_webapp_template.conf', 
'/tmp/proxy_location_webapp_template.conf')
 sudo('mv /tmp/proxy_location_webapp_template.conf ' + 
os.environ['ssn_dlab_path'] + 'tmp/')
-with open('/root/templates/supervisor_svc.conf', 'r') as f:
-text = f.read()
-text = text.replace('WEB_CONF', dlab_conf_dir).replace('OS_USR', 
os_user)
-with open('/root/templates/supervisor_svc.ini', 'w') as f:
-f.write(text)
-put('/root/templates/supervisor_svc.ini', 
'/tmp/supervisor_svc.ini')
-sudo('mv /tmp/supervisor_svc.ini ' + os.environ['ssn_dlab_path'] + 
'tmp/')
- 

[incubator-dlab] branch DLAB-657 updated: [DLAB-656] self-service and billing separate images

2019-05-27 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new f166b16  [DLAB-656] self-service and billing separate images
f166b16 is described below

commit f166b16d0b0855a8819e537b32af1ac4d1432747
Author: Oleksandr_Isniuk 
AuthorDate: Mon May 27 16:31:33 2019 +0300

[DLAB-656] self-service and billing separate images
---
 .../aws/{webui_Dockerfile => billing_Dockerfile}   |  3 +-
 .../src/general/files/aws/webui_Dockerfile |  1 +
 .../src/general/lib/os/debian/ssn_lib.py   | 72 +++---
 .../src/ssn/scripts/configure_ui.py|  6 +-
 4 files changed, 53 insertions(+), 29 deletions(-)

diff --git a/infrastructure-provisioning/src/general/files/aws/webui_Dockerfile 
b/infrastructure-provisioning/src/general/files/aws/billing_Dockerfile
similarity index 92%
copy from infrastructure-provisioning/src/general/files/aws/webui_Dockerfile
copy to infrastructure-provisioning/src/general/files/aws/billing_Dockerfile
index 1ec8721..c0952c4 100644
--- a/infrastructure-provisioning/src/general/files/aws/webui_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/billing_Dockerfile
@@ -35,5 +35,6 @@ RUN apt-get install -y default-jre && \
 apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 
 COPY tmp-kuber/* /root/
+COPY tmp-kuber/conf/* /root/
 
-CMD sudo java -Xmx1024M -jar -Duser.timezone=UTC -Dfile.encoding=UTF-8 
-DDLAB_CONF_DIR=/root/ /root/self-service-2.1.jar server /root/self-service.yml
\ No newline at end of file
+CMD sudo java -Xmx1024M -jar -Duser.timezone=UTC -Dfile.encoding=UTF-8 
-DDLAB_CONF_DIR=/root/ /root/billing-aws-2.1.jar --conf /root/billing.yml
\ No newline at end of file
diff --git a/infrastructure-provisioning/src/general/files/aws/webui_Dockerfile 
b/infrastructure-provisioning/src/general/files/aws/webui_Dockerfile
index 1ec8721..78e6680 100644
--- a/infrastructure-provisioning/src/general/files/aws/webui_Dockerfile
+++ b/infrastructure-provisioning/src/general/files/aws/webui_Dockerfile
@@ -35,5 +35,6 @@ RUN apt-get install -y default-jre && \
 apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 
 COPY tmp-kuber/* /root/
+COPY tmp-kuber/conf/* /root/
 
 CMD sudo java -Xmx1024M -jar -Duser.timezone=UTC -Dfile.encoding=UTF-8 
-DDLAB_CONF_DIR=/root/ /root/self-service-2.1.jar server /root/self-service.yml
\ No newline at end of file
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 36f12b0..eac937e 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
@@ -190,17 +190,6 @@ def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
 sudo('mv /tmp/ssn.yml ' + os.environ['ssn_dlab_path'] + 'conf/')
 put('/root/templates/proxy_location_webapp_template.conf', 
'/tmp/proxy_location_webapp_template.conf')
 sudo('mv /tmp/proxy_location_webapp_template.conf ' + 
os.environ['ssn_dlab_path'] + 'tmp/')
-with open('/root/templates/supervisor_svc.conf', 'r') as f:
-text = f.read()
-text = text.replace('WEB_CONF', dlab_conf_dir).replace('OS_USR', 
os_user)
-with open('/root/templates/supervisor_svc.conf', 'w') as f:
-f.write(text)
-put('/root/templates/supervisor_svc.conf', 
'/tmp/supervisor_svc.conf')
-sudo('mv /tmp/supervisor_svc.conf ' + os.environ['ssn_dlab_path'] 
+ 'tmp/')
-sudo('cp ' + os.environ['ssn_dlab_path'] +
- 'tmp/proxy_location_webapp_template.conf 
/etc/nginx/locations/proxy_location_webapp.conf')
-sudo('cp ' + os.environ['ssn_dlab_path'] + 
'tmp/supervisor_svc.conf {}'.format(supervisor_conf))
-sudo('sed -i \'s=WEB_APP_DIR={}=\' {}'.format(web_path, 
supervisor_conf))
 try:
 sudo('mkdir -p /var/log/application')
 run('mkdir -p /tmp/yml_tmp/')
@@ -292,25 +281,62 @@ def start_ss(keyfile, host_string, dlab_conf_dir, 
web_path,
 except:
 append_result("Unable to generate cert and copy to java 
keystore")
 sys.exit(1)
-sudo('service supervisor start')
-sudo('service nginx restart')
-sudo('service supervisor restart')
-sudo('touch ' + os.environ['ssn_dlab_path'] + 'tmp/ss_started')
+if kuber_enabled:
+try:
+dlab_source_dir = 
'{}sources/infrastructure-provisioning/src/'.format(dlab_path)
+k8s_dir = '{}tmp-kuber/'.format(dlab_source_dir)
+sudo("mkdir {}".format

[incubator-dlab] branch DLAB-657 updated: increase size of storage device for aws(alrd in dev)

2019-05-23 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-657 by this push:
 new ff12848  increase size of storage device for aws(alrd in dev)
ff12848 is described below

commit ff128487489e74f5d531962038f53f97ea449e5d
Author: Oleksandr_Isniuk 
AuthorDate: Thu May 23 14:38:24 2019 +0300

increase size of storage device for aws(alrd in dev)
---
 infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 8 
 1 file changed, 8 insertions(+)

diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py 
b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index 9fe4482..d8e00f3 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -436,6 +436,14 @@ def create_instance(definitions, instance_tag, 
primary_disk_size=12):
 elif definitions.instance_class == 'ssn':
 get_iam_profile(definitions.iam_profile)
 instances = ec2.create_instances(ImageId=definitions.ami_id, 
MinCount=1, MaxCount=1,
+ BlockDeviceMappings=[
+ {
+ "DeviceName": "/dev/sda1",
+ "Ebs":
+ {
+ "VolumeSize": 
int(primary_disk_size)
+ }
+ }],
  KeyName=definitions.key_name,
  
SecurityGroupIds=security_groups_ids,
  
InstanceType=definitions.instance_type,


-
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: change size of storage device for GCP also

2019-05-14 Thread ioleksandr
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 7f6f1a0  change size of storage device for GCP also
7f6f1a0 is described below

commit 7f6f1a0ad4e6e554b1fb0dcd2592498f8a2aeccc
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 14 17:13:50 2019 +0300

change size of storage device for GCP also
---
 infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py 
b/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py
index 4fca82e..afac882 100644
--- a/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/gcp/ssn_prepare.py
@@ -305,11 +305,13 @@ if __name__ == "__main__":
 GCPMeta().get_static_address(ssn_conf['region'], 
ssn_conf['static_address_name'])['address']
 logging.info('[CREATE SSN INSTANCE]')
 print('[CREATE SSN INSTANCE]')
-params = "--instance_name {} --region {} --zone {} --vpc_name {} 
--subnet_name {} --instance_size {} --ssh_key_path {} --initial_user {} 
--service_account_name {} --image_name {} --instance_class {} --static_ip {} 
--network_tag {} --labels '{}'".\
+params = "--instance_name {0} --region {1} --zone {2} --vpc_name {3} 
--subnet_name {4} --instance_size {5}"\
+ " --ssh_key_path {6} --initial_user {7} 
--service_account_name {8} --image_name {9}"\
+ " --instance_class {10} --static_ip {11} --network_tag {12} 
--labels '{13}' --primary_disk_size {14}".\
 format(ssn_conf['instance_name'], ssn_conf['region'], 
ssn_conf['zone'], ssn_conf['vpc_name'],
ssn_conf['subnet_name'], ssn_conf['instance_size'], 
ssn_conf['ssh_key_path'], initial_user,
ssn_conf['service_account_name'], ssn_conf['image_name'], 
'ssn', ssn_conf['static_ip'],
-   ssn_conf['network_tag'], 
json.dumps(ssn_conf['instance_labels']))
+   ssn_conf['network_tag'], 
json.dumps(ssn_conf['instance_labels']), '20')
 try:
 local("~/scripts/{}.py {}".format('common_create_instance', 
params))
 except:


-
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: pass fix

2019-05-14 Thread ioleksandr
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 d5e6e97  pass fix
d5e6e97 is described below

commit d5e6e97fad58209ed1bab259d2158566f3975f86
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 14 16:31:49 2019 +0300

pass fix
---
 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 18ac3d8..7176c8b 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -126,8 +126,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")
+ " -e MYSQL_DATABASE='guacamole' -e MYSQL_USER='guacamole' -e 
MYSQL_PASSWORD='{}'"\
+ " -d -p 8080:8080 guacamole/guacamole".format(mysql_pass))
 #create cronjob for run containers on reboot
 sudo('mkdir /opt/dlab/cron')
 sudo('touch /opt/dlab/cron/mysql.sh')


-
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: final fixes

2019-05-14 Thread ioleksandr
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 ccc00a3  final fixes
ccc00a3 is described below

commit ccc00a3792f2808ece3800716aed9975b11033e1
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 14 15:29:27 2019 +0300

final fixes
---
 .../src/ssn/scripts/configure_docker.py| 12 +-
 .../src/ssn/templates/mysql.sh | 27 --
 2 files changed, 6 insertions(+), 33 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index 24867c4..18ac3d8 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -115,19 +115,19 @@ def configure_guacamole():
 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))
+ ' -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 guacamole.* TO 
'guacamole';" > /opt/mysql/dock-query.sql"""\
+ """ 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")
+ " -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('mkdir /opt/dlab/cron')
 sudo('touch /opt/dlab/cron/mysql.sh')
@@ -136,8 +136,8 @@ def configure_guacamole():
 sudo('echo "docker start guac-mysql" >> /opt/dlab/cron/mysql.sh')
 sudo('echo "docker rm guacamole" >> /opt/dlab/cron/mysql.sh')
 sudo("""echo "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='{}' -d"""\
- """-p 8080:8080 guacamole/guacamole" >> 
/opt/dlab/cron/mysql.sh""".format(mysql_pass))
+ """ -e MYSQL_DATABASE='guacamole' -e MYSQL_USER='guacamole' -e 
MYSQL_PASSWORD='{}' -d"""\
+ """ -p 8080:8080 guacamole/guacamole" >> 
/opt/dlab/cron/mysql.sh""".format(mysql_pass))
 sudo('(crontab -l 2>/dev/null; echo "@reboot sh 
/opt/dlab/cron/mysql.sh") | crontab -')
 return True
 except Exception as err:
diff --git a/infrastructure-provisioning/src/ssn/templates/mysql.sh 
b/infrastructure-provisioning/src/ssn/templates/mysql.sh
deleted file mode 100644
index 09fddda..000
--- a/infrastructure-provisioning/src/ssn/templates/mysql.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-# *
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS&qu

[incubator-dlab] branch DLAB-3 updated: final fixes

2019-05-14 Thread ioleksandr
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 c5b71de  final fixes
c5b71de is described below

commit c5b71dead8d3fd74b1ac1f9e2e36c6d86c16b328
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 14 15:05:56 2019 +0300

final fixes
---
 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 f83c481..24867c4 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -126,7 +126,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'"\ "" \
+ "-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('mkdir /opt/dlab/cron')


-
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: final fixes

2019-05-14 Thread ioleksandr
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 2ce65bf  final fixes
2ce65bf is described below

commit 2ce65bf74c7d10e68e78e99c72eeabcaa09b0169
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 14 14:54:47 2019 +0300

final fixes
---
 .../src/ssn/scripts/configure_docker.py  | 20 ++--
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index 1e06116..f83c481 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -118,10 +118,16 @@ def configure_guacamole():
  '-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 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")
+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")
 #create cronjob for run containers on reboot
 sudo('mkdir /opt/dlab/cron')
 sudo('touch /opt/dlab/cron/mysql.sh')
@@ -129,8 +135,10 @@ def configure_guacamole():
 sudo('echo "docker start guacd" >> /opt/dlab/cron/mysql.sh')
 sudo('echo "docker start guac-mysql" >> /opt/dlab/cron/mysql.sh')
 sudo('echo "docker rm guacamole" >> /opt/dlab/cron/mysql.sh')
-sudo("""echo "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='{}' -d -p 8080:8080 
guacamole/guacamole" >> /opt/dlab/cron/mysql.sh""".format(mysql_pass))
-sudo('crontab -l | { cat; echo "@reboot sh /opt/dlab/cron/mysql.sh"; } 
| crontab -')
+sudo("""echo "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='{}' -d"""\
+ """-p 8080:8080 guacamole/guacamole" >> 
/opt/dlab/cron/mysql.sh""".format(mysql_pass))
+sudo('(crontab -l 2>/dev/null; echo "@reboot sh 
/opt/dlab/cron/mysql.sh") | crontab -')
 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: add cron reboot job and autorestart to dockers

2019-05-14 Thread ioleksandr
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 21344ef  add cron reboot job and autorestart to dockers
21344ef is described below

commit 21344efd6290154c3020fd37b8b0db622cc95105
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 14 13:53:51 2019 +0300

add cron reboot job and autorestart to dockers
---
 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 ea3ee1c..1e06116 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -114,7 +114,7 @@ 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' \ 
+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')


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



[incubator-dlab] 01/03: add cron reboot job and autorestart to dockers

2019-05-14 Thread ioleksandr
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

commit c89eb75ce02451a8361106d488ba2b0f4833a010
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 14 13:36:59 2019 +0300

add cron reboot job and autorestart to dockers
---
 infrastructure-provisioning/src/ssn/scripts/configure_docker.py | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index e61fb2c..3952400 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -123,9 +123,12 @@ def configure_guacamole():
 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('mkdir /opt/dlab/cron')
-put('/root/templates/mysql.sh /opt/dlab/cron/mysql.sh')
+sudo('touch /opt/dlab/cron/mysql.sh')
 sudo('chmod 755 /opt/dlab/cron/mysql.sh')
-sudo('sed -i "s|MYSQL_GENERATED_PASS|{}| 
/opt/dlab/cron/mysql.sh"'.format(mysql_pass))
+sudo('echo "docker start guacd" >> /opt/dlab/cron/mysql.sh')
+sudo('echo "docker start guac-mysql" >> /opt/dlab/cron/mysql.sh')
+sudo('echo "docker rm guacamole" >> /opt/dlab/cron/mysql.sh')
+sudo("""echo "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='{}' -d -p 8080:8080 
guacamole/guacamole" >> /opt/dlab/cron/mysql.sh""".format(mysql_pass))
 sudo('crontab -l | { cat; echo "@reboot sh /opt/dlab/cron/mysql.sh"; } 
| crontab -')
 return True
 except Exception as err:


-
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 (0496b4c -> 973ca43)

2019-05-14 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


from 0496b4c  Update configure_docker.py
 new c89eb75  add cron reboot job and autorestart to dockers
 new 1645fc8  Merge remote-tracking branch 'origin/DLAB-3' into DLAB-3
 new 973ca43  add cron reboot job and autorestart to dockers

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.


Summary of changes:
 .../src/ssn/scripts/configure_docker.py  | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)


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



[incubator-dlab] 03/03: add cron reboot job and autorestart to dockers

2019-05-14 Thread ioleksandr
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

commit 973ca438163f4da47230308dab9e5d885f6df583
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 14 13:38:56 2019 +0300

add cron reboot job and autorestart to dockers
---
 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 3952400..ea3ee1c 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -114,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 --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 guacamole.* TO 
'guacamole';" > /opt/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] 02/03: Merge remote-tracking branch 'origin/DLAB-3' into DLAB-3

2019-05-14 Thread ioleksandr
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

commit 1645fc8f813f76443311b7f1b66ea765b0515fb8
Merge: c89eb75 0496b4c
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 14 13:37:23 2019 +0300

Merge remote-tracking branch 'origin/DLAB-3' into DLAB-3

# Conflicts:
#   infrastructure-provisioning/src/ssn/scripts/configure_docker.py



-
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

2019-05-14 Thread ioleksandr
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 0496b4c  Update configure_docker.py
0496b4c is described below

commit 0496b4c9a8ef7530cc00b1b087f6a17c0d4dfaf4
Author: i.oleksandr 
AuthorDate: Tue May 14 12:50:13 2019 +0300

Update configure_docker.py
---
 infrastructure-provisioning/src/ssn/scripts/configure_docker.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index e61fb2c..aee1698 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -123,6 +123,8 @@ def configure_guacamole():
 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('mkdir /opt/dlab/cron')
+sudo('ls -dl /root/*/')
+sudo('ls -la /root/templates/')
 put('/root/templates/mysql.sh /opt/dlab/cron/mysql.sh')
 sudo('chmod 755 /opt/dlab/cron/mysql.sh')
 sudo('sed -i "s|MYSQL_GENERATED_PASS|{}| 
/opt/dlab/cron/mysql.sh"'.format(mysql_pass))


-
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: add cron reboot job and autorestart to dockers

2019-05-14 Thread ioleksandr
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 d094ac8  add cron reboot job and autorestart to dockers
d094ac8 is described below

commit d094ac8509a120de2a445c33792353e3fcd92af6
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 14 11:41:37 2019 +0300

add cron reboot job and autorestart to dockers
---
 .../src/ssn/scripts/configure_docker.py|  4 +++-
 .../src/ssn/templates/mysql.sh | 27 ++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index 0c5e37f..e79c63c 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -123,8 +123,10 @@ def configure_guacamole():
 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('mkdir /opt/dlab/cron')
-sudo('touch /opt/dlab/cron/mysql.sh')
+sudo('mv /root/templates/mysql.sh /opt/dlab/cron/mysql.sh')
 sudo('chmod 755 /opt/dlab/cron/mysql.sh')
+sudo('sed -i "s|MYSQL_GENERATED_PASS|{}| 
/opt/dlab/cron/mysql.sh"'.format(mysql_pass))
+sudo('crontab -l | { cat; echo "@reboot sh /opt/dlab/cron/mysql.sh"; } 
| crontab -')
 return True
 except Exception as err:
 traceback.print_exc()
diff --git a/infrastructure-provisioning/src/ssn/templates/mysql.sh 
b/infrastructure-provisioning/src/ssn/templates/mysql.sh
new file mode 100644
index 000..09fddda
--- /dev/null
+++ b/infrastructure-provisioning/src/ssn/templates/mysql.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# *
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# 
**
+
+docker start guacd
+docker start guac-mysql
+docker rm guacamole
+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='MYSQL_GENERATED_PASS' -d -p 8080:8080 guacamole/guacamole
\ No newline at end of file


-
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

2019-05-13 Thread ioleksandr
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

2019-05-13 Thread ioleksandr
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

2019-05-13 Thread ioleksandr
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] branch DLAB-3 updated: change ssn primary drive size first configuration of guacamole

2019-05-10 Thread ioleksandr
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 616c4c0  change ssn primary drive size first configuration of guacamole
 new c14cc21  Merge remote-tracking branch 'origin/DLAB-3' into DLAB-3
616c4c0 is described below

commit 616c4c0de785666fc261fadb721776be756822ce
Author: Oleksandr_Isniuk 
AuthorDate: Fri May 10 18:35:49 2019 +0300

change ssn primary drive size
first configuration of guacamole
---
 .../src/ssn/scripts/configure_docker.py | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index 00573b9..5f8c824 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -108,17 +108,20 @@ def build_docker_images(image_list, region, dlab_path):
 def configure_guacamole():
 try:
 mysql_pass = id_generator()
-sudo('docker run --name guacd -d -p 4822:4822 guacamole/guacd')
+sudo('docker run --name guacd --restart unless-stopped -d -p 4822:4822 
guacamole/guacd')
 sudo('docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh 
--mysql > initdb.sql')
 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))
+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('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 -it guac-mysql /bin/bash -c "mysql -u root -p{} < 
/var/lib/mysql/query.mysql"'.format(mysql_pass))
-sudo('docker exec -it guac-mysql /bin/bash -c "cat 
/tmp/scripts/initdb.sql | mysql -u root -p{} guacamole"'.format(mysql_pass))
-sudo("docker run --name guacamole --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")
+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")
+#create cronjob for run containers on reboot
+sudo('touch /opt/dlab/handlers/mysql-cron.sh')
+sudo('chmod 755 /opt/dlab/handlers/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-3 updated: Update configure_docker.py

2019-05-10 Thread ioleksandr
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 546ac58  Update configure_docker.py
546ac58 is described below

commit 546ac582ce2f0f8ce253678d1205c585fb9c7141
Author: i.oleksandr 
AuthorDate: Fri May 10 18:18:46 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 41762c2..035cd73 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('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 ps -a')
-sudo('docker exec -i guac-mysql /bin/bash -c "mysql -u root -p{} < 
/var/lib/mysql/query.mysql"'.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 --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")
 except Exception as err:


-
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: change ssn primary drive size first configuration of guacamole

2019-05-10 Thread ioleksandr
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 8640b86  change ssn primary drive size first configuration of guacamole
8640b86 is described below

commit 8640b866022a99a2093aef56d39fe56385e0d19f
Author: Oleksandr_Isniuk 
AuthorDate: Fri May 10 17:35:05 2019 +0300

change ssn primary drive size
first configuration of guacamole
---
 .../src/ssn/scripts/configure_docker.py| 23 ++
 .../src/ssn/scripts/configure_ssn_node.py  | 22 -
 2 files changed, 23 insertions(+), 22 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
index 56f39fc..00573b9 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_docker.py
@@ -105,6 +105,25 @@ def build_docker_images(image_list, region, dlab_path):
 except:
 return False
 
+def configure_guacamole():
+try:
+mysql_pass = id_generator()
+sudo('docker run --name guacd -d -p 4822:4822 guacamole/guacd')
+sudo('docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh 
--mysql > initdb.sql')
+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))
+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 -it guac-mysql /bin/bash -c "mysql -u root -p{} < 
/var/lib/mysql/query.mysql"'.format(mysql_pass))
+sudo('docker exec -it guac-mysql /bin/bash -c "cat 
/tmp/scripts/initdb.sql | mysql -u root -p{} guacamole"'.format(mysql_pass))
+sudo("docker run --name guacamole --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")
+except Exception as err:
+traceback.print_exc()
+print('Failed to configure guacamole: ', str(err))
+sys.exit(1)
+
 
 ##
 # Run script #
@@ -137,4 +156,8 @@ if __name__ == "__main__":
 if not build_docker_images(deeper_config, args.region, args.dlab_path):
 sys.exit(1)
 
+print("Configuring guacamole")
+if not configure_guacamole():
+sys.exit(1)
+
 sys.exit(0)
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
index e15bd17..6f55ab7 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
@@ -146,25 +146,6 @@ def docker_build_script():
 print('Failed to configure docker_build script: ', str(err))
 sys.exit(1)
 
-def configure_guacamole():
-try:
-mysql_pass = id_generator()
-sudo('docker run --name guacd -d -p 4822:4822 guacamole/guacd')
-sudo('docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh 
--mysql > initdb.sql')
-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))
-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 -it guac-mysql /bin/bash -c "mysql -u root -p{} < 
/var/lib/mysql/query.mysql"'.format(mysql_pass))
-sudo('docker exec -it guac-mysql /bin/bash -c "cat 
/tmp/scripts/initdb.sql | mysql -u root -p{} guacamole"'.format(mysql_pass))
-sudo("docker run --name guacamole --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")
-except Exception as err:
-traceback.print_exc()
-print('Failed to configure guacamole: ', str(err))
-sys.exit(1)
-
 ##
 # Run script #
 ##
@@ -222,8 

[incubator-dlab] branch DLAB-3 updated: change ssn primary drive size first configuration of guacamole

2019-05-10 Thread ioleksandr
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 0d22e40  change ssn primary drive size first configuration of guacamole
0d22e40 is described below

commit 0d22e40e892b5381aa3f32722c1a00c232d919e6
Author: Oleksandr_Isniuk 
AuthorDate: Fri May 10 17:20:28 2019 +0300

change ssn primary drive size
first configuration of guacamole
---
 infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
index ce10c62..e15bd17 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
@@ -160,7 +160,10 @@ def configure_guacamole():
 sudo('docker exec -it guac-mysql /bin/bash -c "mysql -u root -p{} < 
/var/lib/mysql/query.mysql"'.format(mysql_pass))
 sudo('docker exec -it guac-mysql /bin/bash -c "cat 
/tmp/scripts/initdb.sql | mysql -u root -p{} guacamole"'.format(mysql_pass))
 sudo("docker run --name guacamole --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")
-
+except Exception as err:
+traceback.print_exc()
+print('Failed to configure guacamole: ', str(err))
+sys.exit(1)
 
 ##
 # Run script #
@@ -219,5 +222,8 @@ if __name__ == "__main__":
 print("Ensuring safest ssh ciphers")
 ensure_ciphers()
 
+print("Configuring guacamole")
+configure_guacamole()
+
 print("Configuring docker_build script")
 docker_build_script()
\ No newline at end of file


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



[incubator-dlab] 01/01: change ssn primary drive size first configuration of guacamole

2019-05-10 Thread ioleksandr
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

commit d0c98063cdd48f6f1bdd73470e389759ea929804
Author: Oleksandr_Isniuk 
AuthorDate: Fri May 10 16:51:57 2019 +0300

change ssn primary drive size
first configuration of guacamole
---
 .../src/general/lib/aws/actions_lib.py   |  8 
 .../src/general/scripts/aws/ssn_prepare.py   |  4 ++--
 .../src/ssn/scripts/configure_ssn_node.py| 16 
 3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py 
b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index 9fe4482..d8e00f3 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -436,6 +436,14 @@ def create_instance(definitions, instance_tag, 
primary_disk_size=12):
 elif definitions.instance_class == 'ssn':
 get_iam_profile(definitions.iam_profile)
 instances = ec2.create_instances(ImageId=definitions.ami_id, 
MinCount=1, MaxCount=1,
+ BlockDeviceMappings=[
+ {
+ "DeviceName": "/dev/sda1",
+ "Ebs":
+ {
+ "VolumeSize": 
int(primary_disk_size)
+ }
+ }],
  KeyName=definitions.key_name,
  
SecurityGroupIds=security_groups_ids,
  
InstanceType=definitions.instance_type,
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py 
b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
index e864f82..8207708 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py
@@ -426,10 +426,10 @@ if __name__ == "__main__":
 logging.info('[CREATE SSN INSTANCE]')
 print('[CREATE SSN INSTANCE]')
 params = "--node_name {0} --ami_id {1} --instance_type {2} --key_name 
{3} --security_group_ids {4} --subnet_id {5} " \
- "--iam_profile {6} --infra_tag_name {7} --infra_tag_value {8} 
--instance_class {9}".\
+ "--iam_profile {6} --infra_tag_name {7} --infra_tag_value {8} 
--instance_class {9} --primary_disk_size {10}".\
 format(instance_name, ssn_ami_id, 
os.environ['aws_ssn_instance_size'], os.environ['conf_key_name'],
os.environ['aws_security_groups_ids'], 
os.environ['aws_subnet_id'],
-   role_profile_name, tag_name, instance_name, 'ssn')
+   role_profile_name, tag_name, instance_name, 'ssn', '20')
 
 try:
 local("~/scripts/{}.py {}".format('common_create_instance', 
params))
diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
index 6f55ab7..ce10c62 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ssn_node.py
@@ -146,6 +146,22 @@ def docker_build_script():
 print('Failed to configure docker_build script: ', str(err))
 sys.exit(1)
 
+def configure_guacamole():
+try:
+mysql_pass = id_generator()
+sudo('docker run --name guacd -d -p 4822:4822 guacamole/guacd')
+sudo('docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh 
--mysql > initdb.sql')
+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))
+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 -it guac-mysql /bin/bash -c "mysql -u root -p{} < 
/var/lib/mysql/query.mysql"'.format(mysql_pass))
+sudo('docker exec -it guac-mysql /bin/bash -c "cat 
/tmp/scripts/initdb.sql | mysql -u root -p{} guacamole"'.format(mysql_pass))
+sudo

[incubator-dlab] 01/01: [DLAB-592] Change Zeppelin version to 0.8.0 in descriptions

2019-05-07 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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

commit 764000d59f0fe8e6e3d78e009c5fc988aac81c6f
Author: Oleksandr_Isniuk 
AuthorDate: Tue May 7 16:47:01 2019 +0300

[DLAB-592] Change Zeppelin version to 0.8.0 in descriptions
---
 .../src/general/files/aws/zeppelin_description.json   | 4 ++--
 .../src/general/files/azure/zeppelin_description.json | 4 ++--
 .../src/general/files/gcp/zeppelin_description.json   | 4 ++--
 .../examples/azure_templates/zeppelin/zeppelin-notebook.json  | 4 ++--
 .../examples/ec2_templates/zeppelin/zeppelin-notebook.json| 4 ++--
 .../examples/gcp_templates/zeppelin/zeppelin-notebook.json| 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git 
a/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json 
b/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json
index dcd39c6..31cb86d 100644
--- 
a/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json
+++ 
b/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json
@@ -19,10 +19,10 @@
   "exploratory_environment_versions" :
   [
 {
-  "template_name": "Apache Zeppelin 0.8.1",
+  "template_name": "Apache Zeppelin 0.8.0",
   "description": "Base image with Apache Zeppelin node creation routines",
   "environment_type": "exploratory",
-  "version": "zeppelin-0.8.1",
+  "version": "zeppelin-0.8.0",
   "vendor": "AWS"
 }
   ]
diff --git 
a/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json 
b/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json
index f5b829f..499d3ff 100644
--- 
a/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json
+++ 
b/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json
@@ -15,10 +15,10 @@
   "exploratory_environment_versions" :
   [
 {
-  "template_name": "Apache Zeppelin 0.8.1",
+  "template_name": "Apache Zeppelin 0.8.0",
   "description": "Base image with Apache Zeppelin node creation routines",
   "environment_type": "exploratory",
-  "version": "zeppelin-0.8.1",
+  "version": "zeppelin-0.8.0",
   "vendor": "Azure"
 }
   ]
diff --git 
a/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json 
b/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json
index 6539c06..44b7c61 100644
--- 
a/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json
+++ 
b/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json
@@ -23,10 +23,10 @@
   "exploratory_environment_versions" :
   [
 {
-  "template_name": "Apache Zeppelin 0.8.1",
+  "template_name": "Apache Zeppelin 0.8.0",
   "description": "Base image with Apache Zeppelin node creation routines",
   "environment_type": "exploratory",
-  "version": "zeppelin-0.8.1",
+  "version": "zeppelin-0.8.0",
   "vendor": "GCP"
 }
   ]
diff --git 
a/integration-tests/examples/azure_templates/zeppelin/zeppelin-notebook.json 
b/integration-tests/examples/azure_templates/zeppelin/zeppelin-notebook.json
index 1253ca1..2c7aff4 100644
--- a/integration-tests/examples/azure_templates/zeppelin/zeppelin-notebook.json
+++ b/integration-tests/examples/azure_templates/zeppelin/zeppelin-notebook.json
@@ -2,6 +2,6 @@
   "image" : "docker.dlab-zeppelin",
   "name" : "set the name",
   "shape" : "Standard_F2s",
-  "version" : "zeppelin-0.8.1",
-  "template_name": "Apache Zeppelin 0.8.1"
+  "version" : "zeppelin-0.8.0",
+  "template_name": "Apache Zeppelin 0.8.0"
 }
\ No newline at end of file
diff --git 
a/integration-tests/examples/ec2_templates/zeppelin/zeppelin-notebook.json 
b/integration-tests/examples/ec2_templates/zeppelin/zeppelin-notebook.json
index 3fa32ba..287ef45 100644
--- a/integration-tests/examples/ec2_templates/zeppelin/zeppelin-notebook.json
+++ b/integration-tests/examples/ec2_templates/zeppelin/zeppelin-notebook.json
@@ -2,6 +2,6 @@
   "image" : "docker.dlab-zeppelin",
   "name" : "set the name",
   "shape" : "t2.medium",
-  "version" : &q

[incubator-dlab] branch DLAB-592 created (now 764000d)

2019-05-07 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


  at 764000d  [DLAB-592] Change Zeppelin version to 0.8.0 in descriptions

This branch includes the following new commits:

 new 764000d  [DLAB-592] Change Zeppelin version to 0.8.0 in descriptions

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-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org



[incubator-dlab] branch DLAB-592 created (now 107a039)

2019-05-06 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


  at 107a039  [DLAB-592] Change dataproc and Zeppelin version because of 
bug in 0.8.1

This branch includes the following new commits:

 new 107a039  [DLAB-592] Change dataproc and Zeppelin version because of 
bug in 0.8.1

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-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org



[incubator-dlab] 01/01: Merge pull request #116 from apache/docker-script

2019-05-02 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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

commit a9fc8465f01fedf0654fd3998ad54df943651f6b
Merge: b40c062 ad2aa2c
Author: i.oleksandr 
AuthorDate: Thu May 2 12:22:53 2019 +0300

Merge pull request #116 from apache/docker-script

[DLAB-docker-script] Created script that rebuilds docker images on ssn

 .../src/ssn/scripts/configure_ssn_node.py  | 14 -
 .../src/ssn/templates/docker_build.py  | 73 ++
 2 files changed, 86 insertions(+), 1 deletion(-)


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



[incubator-dlab] branch develop updated (b40c062 -> a9fc846)

2019-05-02 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


from b40c062  Merge pull request #115 from apache/DLAB-583
 add 6ce6964  [DLAB-docker-script] Created script that rebuilds docker 
images on ssn
 add b1f4eab  [DLAB-docker-script] Added conditional for azure_auth.json.
 add 04dd664  [DLAB-docker-script] Bugfix
 add 7c232b5  [DLAB-docker-script] Changed name to more appropriate
 add ad2aa2c  [DLAB-docker-script] Parametrized docker-build script
 new a9fc846  Merge pull request #116 from apache/docker-script

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/ssn/scripts/configure_ssn_node.py  | 14 -
 .../src/ssn/templates/docker_build.py  | 73 ++
 2 files changed, 86 insertions(+), 1 deletion(-)
 create mode 100644 
infrastructure-provisioning/src/ssn/templates/docker_build.py


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



[incubator-dlab] branch develop updated (e681bd1 -> 302c380)

2019-04-17 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


from e681bd1  Merge pull request #107 from apache/DLAB-592
 add 393e8a1  [DLAB-569]: Added installation of NTPd
 add 9d0fc97  [DLAB-569]: Fixed issue with NTP in private subnet
 add b1d0863  [DLAB-569]: Fixed issue with NTP in private subnet
 add 3bf62d8  [DLAB-569]: Fixed issue with NTP in private subnet
 add 8f8ddaa  [DLAB-569]: Fixed issue with NTP in private subnet
 add a40d5e2  [DLAB-569]: Fixed issue with NTP in private subnet
 add 9b2266c  [DLAB-569]: fixed issue with ntpd
 new 302c380  Merge pull request #106 from apache/DLAB-569

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/base/scripts/install_prerequisites.py  |  4 
 .../src/general/lib/os/debian/common_lib.py| 16 ++
 .../src/general/lib/os/redhat/common_lib.py| 19 +++-
 .../general/scripts/aws/dataengine_configure.py| 11 ++
 .../general/scripts/aws/deeplearning_configure.py  |  7 +++---
 .../src/general/scripts/aws/edge_prepare.py|  6 ++
 .../src/general/scripts/aws/jupyter_configure.py   |  9 +---
 .../src/general/scripts/aws/rstudio_configure.py   |  6 --
 .../scripts/aws/tensor-rstudio_configure.py|  9 +---
 .../src/general/scripts/aws/tensor_configure.py|  9 +---
 .../src/general/scripts/aws/zeppelin_configure.py  |  6 --
 .../general/scripts/azure/dataengine_configure.py  | 25 +-
 .../scripts/azure/deeplearning_configure.py|  6 +++---
 .../src/general/scripts/azure/edge_prepare.py  | 11 ++
 .../src/general/scripts/azure/jupyter_configure.py |  5 +++--
 .../src/general/scripts/azure/rstudio_configure.py |  5 +++--
 .../src/general/scripts/azure/tensor_configure.py  |  5 +++--
 .../general/scripts/azure/zeppelin_configure.py|  5 +++--
 .../general/scripts/gcp/dataengine_configure.py| 20 +++--
 .../src/general/scripts/gcp/edge_prepare.py|  2 +-
 .../src/general/scripts/gcp/jupyter_configure.py   |  6 --
 .../src/general/scripts/gcp/rstudio_configure.py   |  9 +---
 .../scripts/gcp/tensor-rstudio_configure.py|  9 +---
 .../src/general/scripts/gcp/tensor_configure.py| 12 +++
 .../src/general/scripts/gcp/zeppelin_configure.py  | 13 +--
 25 files changed, 167 insertions(+), 68 deletions(-)


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



[incubator-dlab] 01/01: [DLAB-592] Upgrade Dataproc to 1.2 and 1.4 [bugfix] - update Zeppelin from 0.8.0 to 0.8.1 for Spark 2.4.0 support - change autotest Dataproc version to 1.2 from 1.1

2019-04-17 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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

commit d0c23d260f3654445a478e7871f96f39c7231259
Author: Oleksandr_Isniuk 
AuthorDate: Wed Apr 17 16:31:22 2019 +0300

[DLAB-592] Upgrade Dataproc to 1.2 and 1.4 [bugfix]
 - update Zeppelin from 0.8.0 to 0.8.1 for Spark 2.4.0 support
 - change autotest Dataproc version to 1.2 from 1.1
---
 infrastructure-provisioning/src/general/conf/dlab.ini | 2 +-
 .../src/general/files/aws/zeppelin_description.json   | 4 ++--
 .../src/general/files/azure/zeppelin_description.json | 4 ++--
 .../src/general/files/gcp/zeppelin_description.json   | 4 ++--
 integration-tests/examples/gcp_templates/deeplearning/dataproc.json   | 2 +-
 integration-tests/examples/gcp_templates/jupyter/dataproc.json| 2 +-
 integration-tests/examples/gcp_templates/rstudio/dataproc.json| 2 +-
 integration-tests/examples/gcp_templates/tensor/dataproc.json | 2 +-
 integration-tests/examples/gcp_templates/zeppelin/dataproc.json   | 2 +-
 9 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/infrastructure-provisioning/src/general/conf/dlab.ini 
b/infrastructure-provisioning/src/general/conf/dlab.ini
index ca80d40..91f5658 100644
--- a/infrastructure-provisioning/src/general/conf/dlab.ini
+++ b/infrastructure-provisioning/src/general/conf/dlab.ini
@@ -222,7 +222,7 @@ jupyter_version = 5.7.4
 ### Version of TensorFlow to be installed on notebook
 tensorflow_version = 1.8.0
 ### Version of Zeppelin to be installed on notebook
-zeppelin_version = 0.8.0
+zeppelin_version = 0.8.1
 ### Version of Rstudio to be installed on notebook
 rstudio_version = 1.1.463
 ### Version of Scala to be installed on notebook
diff --git 
a/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json 
b/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json
index 31cb86d..dcd39c6 100644
--- 
a/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json
+++ 
b/infrastructure-provisioning/src/general/files/aws/zeppelin_description.json
@@ -19,10 +19,10 @@
   "exploratory_environment_versions" :
   [
 {
-  "template_name": "Apache Zeppelin 0.8.0",
+  "template_name": "Apache Zeppelin 0.8.1",
   "description": "Base image with Apache Zeppelin node creation routines",
   "environment_type": "exploratory",
-  "version": "zeppelin-0.8.0",
+  "version": "zeppelin-0.8.1",
   "vendor": "AWS"
 }
   ]
diff --git 
a/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json 
b/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json
index 499d3ff..f5b829f 100644
--- 
a/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json
+++ 
b/infrastructure-provisioning/src/general/files/azure/zeppelin_description.json
@@ -15,10 +15,10 @@
   "exploratory_environment_versions" :
   [
 {
-  "template_name": "Apache Zeppelin 0.8.0",
+  "template_name": "Apache Zeppelin 0.8.1",
   "description": "Base image with Apache Zeppelin node creation routines",
   "environment_type": "exploratory",
-  "version": "zeppelin-0.8.0",
+  "version": "zeppelin-0.8.1",
   "vendor": "Azure"
 }
   ]
diff --git 
a/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json 
b/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json
index 44b7c61..6539c06 100644
--- 
a/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json
+++ 
b/infrastructure-provisioning/src/general/files/gcp/zeppelin_description.json
@@ -23,10 +23,10 @@
   "exploratory_environment_versions" :
   [
 {
-  "template_name": "Apache Zeppelin 0.8.0",
+  "template_name": "Apache Zeppelin 0.8.1",
   "description": "Base image with Apache Zeppelin node creation routines",
   "environment_type": "exploratory",
-  "version": "zeppelin-0.8.0",
+  "version": "zeppelin-0.8.1",
   "vendor": "GCP"
 }
   ]
diff --git 
a/integration-tests/examples/gcp_templates/deeplearning/dataproc.json 
b/integration-tests/examples/gcp_templates/deeplearning/dataproc.json
index 9130f3d..1f4724f 100644
--- a/integration-tests/examples/gcp_templates/deeplearning/dataproc.json
+++ b/integration-tests/examples/gcp_templates/deeplearning/dataproc.json
@@ -6,7 +6,7 @@
   "datapro

[incubator-dlab] branch DLAB-606 created (now 36f93e9)

2019-04-16 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


  at 36f93e9  [DLAB-606] create peering route for secondary VPC

This branch includes the following new commits:

 new 36f93e9  [DLAB-606] create peering route for secondary VPC

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-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org



[incubator-dlab] branch DLAB-590 created (now 264f901)

2019-04-15 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


  at 264f901  [DLAB-590] add information to status.json about error

This branch includes the following new commits:

 new 264f901  [DLAB-590] add information to status.json about error

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-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org



[incubator-dlab] branch DLAB-599 updated: [DLAB-599] Add possibility to choose zone during DLab deployment

2019-04-15 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-599 by this push:
 new 7f9695e  [DLAB-599] Add possibility to choose zone during DLab 
deployment
7f9695e is described below

commit 7f9695e526bfba9a70f76be9dada7e0fa9342463
Author: Oleksandr_Isniuk 
AuthorDate: Mon Apr 15 14:40:55 2019 +0300

[DLAB-599] Add possibility to choose zone during DLab deployment
---
 infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py 
b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index cef7424..1664010 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -247,10 +247,8 @@ def create_subnet(vpc_id, subnet, tag, zone):
 try:
 ec2 = boto3.resource('ec2')
 if zone != "":
-print('with zone@@@')
 subnet = ec2.create_subnet(VpcId=vpc_id, CidrBlock=subnet, 
AvailabilityZone=zone)
 else:
-print('without zone@@@')
 subnet = ec2.create_subnet(VpcId=vpc_id, CidrBlock=subnet)
 create_tag(subnet.id, tag)
 subnet.reload()


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



[incubator-dlab] branch DLAB-599 updated: add possibility to choose zone on edge provisioning

2019-04-15 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-599 by this push:
 new a25502c  add possibility to choose zone on edge provisioning
a25502c is described below

commit a25502c43a2ae38b3b4422981a35abca8373e29a
Author: Oleksandr_Isniuk 
AuthorDate: Mon Apr 15 13:10:21 2019 +0300

add possibility to choose zone on edge provisioning
---
 infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py 
b/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py
index 71423cd..3c62665 100644
--- a/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py
+++ b/infrastructure-provisioning/src/general/scripts/aws/edge_prepare.py
@@ -88,6 +88,7 @@ if __name__ == "__main__":
 edge_conf['allowed_ip_cidr'].append({"CidrIp": cidr.replace(' ','')})
 edge_conf['network_type'] = os.environ['conf_network_type']
 edge_conf['all_ip_cidr'] = '0.0.0.0/0'
+edge_conf['zone'] = os.environ['aws_region'] + os.environ['aws_zone']
 if 'aws_user_predefined_s3_policies' not in os.environ:
 os.environ['aws_user_predefined_s3_policies'] = 'None'
 
@@ -111,7 +112,7 @@ if __name__ == "__main__":
 logging.info('[CREATE SUBNET]')
 print('[CREATE SUBNET]')
 params = "--vpc_id '{}' --infra_tag_name {} --infra_tag_value {} 
--username {} --prefix {} " \
- "--user_subnets_range '{}'".format(edge_conf['vpc2_id'], 
edge_conf['tag_name'],
+ "--user_subnets_range '{}' 
--zone".format(edge_conf['vpc2_id'], edge_conf['tag_name'],
 
edge_conf['service_base_name'], os.environ['edge_user_name'],
 
edge_conf['private_subnet_prefix'],
 
os.environ['conf_user_subnets_range'])


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



[incubator-dlab] branch DLAB-599 updated: create ssn subnet in chosen zone

2019-04-12 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/DLAB-599 by this push:
 new 970b474  create ssn subnet in chosen zone
970b474 is described below

commit 970b47429a06f3b64500ecf27f655672abec6da5
Author: Oleksandr_Isniuk 
AuthorDate: Fri Apr 12 17:51:02 2019 +0300

create ssn subnet in chosen zone
---
 infrastructure-provisioning/src/general/conf/dlab.ini | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infrastructure-provisioning/src/general/conf/dlab.ini 
b/infrastructure-provisioning/src/general/conf/dlab.ini
index 2536b00..94562f8 100644
--- a/infrastructure-provisioning/src/general/conf/dlab.ini
+++ b/infrastructure-provisioning/src/general/conf/dlab.ini
@@ -97,7 +97,7 @@ edge_instance_size = t2.medium
 ### Amazon region name for whole dlab provisioning
 region = us-west-2
 ### Amazon zone letter for ssn, edge and notebook subnet provisioning
-# zone = a
+zone = a
 ### Amazon ami name based on debian conf_os_family for all dlab instances
 debian_image_name = 
ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20190212
 ### Amazon ami name based on RedHat conf_os_family for all dlab instances


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



[incubator-dlab] 01/01: create ssn subnet in chosen zone

2019-04-12 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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

commit 709033c13ea1d0ee6db30e43107f37a9bb96c61f
Author: Oleksandr_Isniuk 
AuthorDate: Fri Apr 12 17:15:39 2019 +0300

create ssn subnet in chosen zone
---
 infrastructure-provisioning/src/general/conf/dlab.ini|  2 ++
 .../src/general/lib/aws/actions_lib.py   | 16 ++--
 .../src/general/scripts/aws/common_create_subnet.py  |  3 ++-
 .../src/general/scripts/aws/ssn_prepare.py   | 11 ++-
 4 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/infrastructure-provisioning/src/general/conf/dlab.ini 
b/infrastructure-provisioning/src/general/conf/dlab.ini
index 58175fd..2536b00 100644
--- a/infrastructure-provisioning/src/general/conf/dlab.ini
+++ b/infrastructure-provisioning/src/general/conf/dlab.ini
@@ -96,6 +96,8 @@ ssn_instance_size = t2.large
 edge_instance_size = t2.medium
 ### Amazon region name for whole dlab provisioning
 region = us-west-2
+### Amazon zone letter for ssn, edge and notebook subnet provisioning
+# zone = a
 ### Amazon ami name based on debian conf_os_family for all dlab instances
 debian_image_name = 
ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20190212
 ### Amazon ami name based on RedHat conf_os_family for all dlab instances
diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py 
b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index f6f37d0..54b6900 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -243,10 +243,13 @@ def create_rt(vpc_id, infra_tag_name, infra_tag_value, 
secondary):
 traceback.print_exc(file=sys.stdout)
 
 
-def create_subnet(vpc_id, subnet, tag):
+def create_subnet(vpc_id, subnet, tag, zone):
 try:
 ec2 = boto3.resource('ec2')
-subnet = ec2.create_subnet(VpcId=vpc_id, CidrBlock=subnet)
+if zone == "":
+subnet = ec2.create_subnet(VpcId=vpc_id, CidrBlock=subnet, 
AvailabilityZone=zone)
+else:
+subnet = ec2.create_subnet(VpcId=vpc_id, CidrBlock=subnet)
 create_tag(subnet.id, tag)
 subnet.reload()
 return subnet.id
@@ -438,6 +441,15 @@ def create_instance(definitions, instance_tag, 
primary_disk_size=12):
  SubnetId=definitions.subnet_id,
  IamInstanceProfile={'Name': 
definitions.iam_profile},
  UserData=user_data)
+elif definitions.instance_class == 'ssn':
+get_iam_profile(definitions.iam_profile)
+instances = ec2.create_instances(ImageId=definitions.ami_id, 
MinCount=1, MaxCount=1,
+ KeyName=definitions.key_name,
+ 
SecurityGroupIds=security_groups_ids,
+ 
InstanceType=definitions.instance_type,
+ SubnetId=definitions.subnet_id,
+ IamInstanceProfile={'Name': 
definitions.iam_profile},
+ UserData=user_data)
 else:
 get_iam_profile(definitions.iam_profile)
 instances = ec2.create_instances(ImageId=definitions.ami_id, 
MinCount=1, MaxCount=1,
diff --git 
a/infrastructure-provisioning/src/general/scripts/aws/common_create_subnet.py 
b/infrastructure-provisioning/src/general/scripts/aws/common_create_subnet.py
index bd18cdc..889434a 100644
--- 
a/infrastructure-provisioning/src/general/scripts/aws/common_create_subnet.py
+++ 
b/infrastructure-provisioning/src/general/scripts/aws/common_create_subnet.py
@@ -39,6 +39,7 @@ parser.add_argument('--infra_tag_value', type=str, default='')
 parser.add_argument('--prefix', type=str, default='')
 parser.add_argument('--ssn', type=bool, default=False)
 parser.add_argument('--user_subnets_range', type=str, default='')
+parser.add_argument('--zone', type=str, default='')
 args = parser.parse_args()
 
 
@@ -122,7 +123,7 @@ if __name__ == "__main__":
 if subnet_id == '':
 print("Creating subnet {0} in vpc {1} with tag {2}".
   format(dlab_subnet_cidr, args.vpc_id, json.dumps(tag)))
-subnet_id = create_subnet(args.vpc_id, dlab_subnet_cidr, tag)
+subnet_id = create_subnet(args.vpc_id, dlab_subnet_cidr, tag, 
args.zone)
 else:
 print("REQUESTED SUBNET ALREADY EXISTS. USING CIDR 
{}".format(subnet_check))
 subnet_id = get_subnet_by_cidr(subnet_check)
diff --git a/infrastructure-provisioning/src/general/scripts/aws/ssn_prepare.py 
b/infrastructure-provisionin

[incubator-dlab] branch DLAB-599 created (now 709033c)

2019-04-12 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


  at 709033c  create ssn subnet in chosen zone

This branch includes the following new commits:

 new 709033c  create ssn subnet in chosen zone

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-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org



[incubator-dlab] branch develop updated: [DLAB-580] Removed n1-standard-1 shape from Dataproc jenkins job

2019-04-12 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
 new 4c04126  [DLAB-580] Removed n1-standard-1 shape from Dataproc jenkins 
job
 new 55cd899  Merge pull request #96 from Dyoma33/DLAB-580
4c04126 is described below

commit 4c04126d44dd073ff9e099b36696c9eedee98a5d
Author: Dyoma33 
AuthorDate: Fri Apr 12 14:20:20 2019 +0300

[DLAB-580] Removed n1-standard-1 shape from Dataproc jenkins job
---
 .../templates/gcp/jenkins_jobs/create_dataengine-service/config.xml   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_dataengine-service/config.xml
 
b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_dataengine-service/config.xml
index 29547eb..a1d2393 100644
--- 
a/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_dataengine-service/config.xml
+++ 
b/infrastructure-provisioning/src/general/templates/gcp/jenkins_jobs/create_dataengine-service/config.xml
@@ -49,12 +49,12 @@ under the License.
 
   master_instance_type
   Shape of master node
-  n1-standard-1
+  n1-standard-2
 
 
   slave_instance_type
   Shape of slave nodes
-  n1-standard-1
+  n1-standard-2
 
 
   master_count


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



[incubator-dlab] branch develop updated (85f0db8 -> bbf8b59)

2019-04-11 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


from 85f0db8  Merge pull request #92 from apache/ldab_refactored
 add 22aba18  [DLAB-600]: Fixed issue with missed tags
 new bbf8b59  Merge pull request #93 from apache/DLAB-600

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:
 infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 6 ++
 1 file changed, 6 insertions(+)


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



[incubator-dlab] branch DLAB-600 deleted (was 22aba18)

2019-04-11 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


 was 22aba18  [DLAB-600]: Fixed issue with missed tags

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] 01/01: Merge pull request #93 from apache/DLAB-600

2019-04-11 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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

commit bbf8b59c289262d1f7eb026b8225f304401faa08
Merge: 85f0db8 22aba18
Author: i.oleksandr 
AuthorDate: Thu Apr 11 15:20:02 2019 +0300

Merge pull request #93 from apache/DLAB-600

[DLAB-600]: Fixed issue with missed tags

 infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 6 ++
 1 file changed, 6 insertions(+)


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



[incubator-dlab] branch DLAB-597-fix deleted (was 404eb3c)

2019-04-09 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

ioleksandr pushed a change to branch DLAB-597-fix
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git.


 was 404eb3c  [DLAB-597]: Fixed issue with getting list of Service Accounts

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] 01/01: Merge pull request #89 from apache/DLAB-596

2019-04-09 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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

commit aff5303ed70dd069cd34049365c3f5d9f8e3eece
Merge: f74984a ae2926a
Author: i.oleksandr 
AuthorDate: Tue Apr 9 16:17:34 2019 +0300

Merge pull request #89 from apache/DLAB-596

[DLAB-596]: Fixed issue with header structure after Dataengine creati…

 .../src/general/scripts/os/common_configure_spark.py | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)


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



[incubator-dlab] branch DLAB-596 deleted (was ae2926a)

2019-04-09 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


 was ae2926a  [DLAB-596]: Fixed issue with header structure after 
Dataengine creation with custom Spark configuration

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 develop updated (f74984a -> aff5303)

2019-04-09 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


from f74984a  Merge pull request #88 from apache/DLAB-594
 add ae2926a  [DLAB-596]: Fixed issue with header structure after 
Dataengine creation with custom Spark configuration
 new aff5303  Merge pull request #89 from apache/DLAB-596

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/general/scripts/os/common_configure_spark.py | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)


-
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 #88 from apache/DLAB-594

2019-04-08 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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

commit f74984add985e3c8b5b24d848e2716b505e932dd
Merge: e66a70a 4900f52
Author: i.oleksandr 
AuthorDate: Mon Apr 8 18:36:42 2019 +0300

Merge pull request #88 from apache/DLAB-594

[DLAB-594]: Added tags for resources

 README.md  |  3 +-
 .../src/general/files/aws/ssn_policy.json  |  3 +-
 .../src/general/lib/aws/actions_lib.py | 28 +++-
 .../scripts/aws/common_create_role_policy.py   |  5 +-
 .../general/scripts/aws/common_create_subnet.py|  8 +--
 .../scripts/aws/edge_associate_elastic_ip.py   |  7 +-
 .../src/general/scripts/aws/edge_prepare.py| 26 ---
 .../scripts/aws/ssn_associate_elastic_ip.py|  7 +-
 .../src/general/scripts/aws/ssn_configure.py   | 48 +
 .../src/general/scripts/aws/ssn_create_vpc.py  |  5 ++
 .../src/general/scripts/aws/ssn_prepare.py | 81 ++
 11 files changed, 173 insertions(+), 48 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 (e66a70a -> f74984a)

2019-04-08 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


from e66a70a  Merge pull request #87 from apache/DLAB-593
 add 4c04431  [DLAB-594]: added tags for Elastic IPs
 add 2cad14f  [DLAB-594]: added tags for VPCs,subnets, Route tables, SGs 
and IAM roles
 add e506e4b  [DLAB-594]: fixed issue with creating IAM role and added tag 
for peering connection
 add 4348401  [DLAB-594]: fixed issue with creating IAM role
 add 6c7a30a  [DLAB-594]: fixed issue with removing peering connection 
during rolling back
 add e2b5f80  debugging
 add 74788b1  [DLAB-594]: Fixed issue second VPC
 add b8bec80  [DLAB-594]: Fixed typo
 add 4900f52  [DLAB-594]: Fixed typo
 new f74984a  Merge pull request #88 from apache/DLAB-594

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:
 README.md  |  3 +-
 .../src/general/files/aws/ssn_policy.json  |  3 +-
 .../src/general/lib/aws/actions_lib.py | 28 +++-
 .../scripts/aws/common_create_role_policy.py   |  5 +-
 .../general/scripts/aws/common_create_subnet.py|  8 +--
 .../scripts/aws/edge_associate_elastic_ip.py   |  7 +-
 .../src/general/scripts/aws/edge_prepare.py| 26 ---
 .../scripts/aws/ssn_associate_elastic_ip.py|  7 +-
 .../src/general/scripts/aws/ssn_configure.py   | 48 +
 .../src/general/scripts/aws/ssn_create_vpc.py  |  5 ++
 .../src/general/scripts/aws/ssn_prepare.py | 81 ++
 11 files changed, 173 insertions(+), 48 deletions(-)


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



[incubator-dlab] branch DLAB-593 deleted (was 583cf02)

2019-04-08 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


 was 583cf02  [DLAB-593]: Fixed issue with removing IAM resources

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 develop updated (3e3c33a -> e66a70a)

2019-04-08 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


from 3e3c33a  Merge pull request #86 from apache/DLAB-456
 add 583cf02  [DLAB-593]: Fixed issue with removing IAM resources
 new e66a70a  Merge pull request #87 from apache/DLAB-593

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/general/lib/aws/actions_lib.py| 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)


-
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 #87 from apache/DLAB-593

2019-04-08 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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

commit e66a70a09524c7b6639ebcb28086db8e9b1f024f
Merge: 3e3c33a 583cf02
Author: i.oleksandr 
AuthorDate: Mon Apr 8 15:04:17 2019 +0300

Merge pull request #87 from apache/DLAB-593

 [DLAB-593]: Fixed issue with removing IAM resources

 .../src/general/lib/aws/actions_lib.py| 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)



-
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 #86 from apache/DLAB-456

2019-04-08 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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

commit 3e3c33aca3ddee6a53c8ae811cf179d396ec9de0
Merge: 6cfbeb5 0858bba
Author: i.oleksandr 
AuthorDate: Mon Apr 8 13:36:50 2019 +0300

Merge pull request #86 from apache/DLAB-456

[DLAB-456]: fixed issue with header structure

 .../src/general/lib/aws/actions_lib.py | 41 --
 .../src/general/lib/azure/actions_lib.py   | 41 --
 .../src/general/lib/gcp/actions_lib.py | 41 --
 3 files changed, 69 insertions(+), 54 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 (6cfbeb5 -> 3e3c33a)

2019-04-08 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


from 6cfbeb5  Merge pull request #85 from Dyoma33/DLAB-580
 add 0858bba  [DLAB-456]: fixed issue with header structure
 new 3e3c33a  Merge pull request #86 from apache/DLAB-456

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/general/lib/aws/actions_lib.py | 41 --
 .../src/general/lib/azure/actions_lib.py   | 41 --
 .../src/general/lib/gcp/actions_lib.py | 41 --
 3 files changed, 69 insertions(+), 54 deletions(-)


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



[incubator-dlab] branch DLAB-523 deleted (was d27782d)

2019-04-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


 was d27782d  [GCP]: Fix Data Engine creation fails on DeepLearning  
-remove old and unsupported library Caffe  -change versionc of cuda for Data 
Engine on deeplearning

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-523 created (now d27782d)

2019-04-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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


  at d27782d  [GCP]: Fix Data Engine creation fails on DeepLearning  
-remove old and unsupported library Caffe  -change versionc of cuda for Data 
Engine on deeplearning

This branch includes the following new commits:

 new d27782d  [GCP]: Fix Data Engine creation fails on DeepLearning  
-remove old and unsupported library Caffe  -change versionc of cuda for Data 
Engine on deeplearning

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-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org



[incubator-dlab] 01/01: [GCP]: Fix Data Engine creation fails on DeepLearning -remove old and unsupported library Caffe -change versionc of cuda for Data Engine on deeplearning

2019-04-05 Thread ioleksandr
This is an automated email from the ASF dual-hosted git repository.

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

commit d27782dd503223810edd458edc565760e544d50c
Author: Oleksandr_Isniuk 
AuthorDate: Fri Apr 5 18:23:34 2019 +0300

[GCP]: Fix Data Engine creation fails on DeepLearning
 -remove old and unsupported library Caffe
 -change versionc of cuda for Data Engine on deeplearning
---
 .../src/dataengine/scripts/configure_dataengine.py |  8 +++-
 .../scripts/configure_deep_learning_node.py|  2 -
 .../src/general/lib/os/debian/notebook_lib.py  | 39 --
 .../src/general/lib/os/redhat/notebook_lib.py  | 46 --
 4 files changed, 6 insertions(+), 89 deletions(-)

diff --git 
a/infrastructure-provisioning/src/dataengine/scripts/configure_dataengine.py 
b/infrastructure-provisioning/src/dataengine/scripts/configure_dataengine.py
index 9a4fb29..e5aacb8 100644
--- a/infrastructure-provisioning/src/dataengine/scripts/configure_dataengine.py
+++ b/infrastructure-provisioning/src/dataengine/scripts/configure_dataengine.py
@@ -73,6 +73,12 @@ files_dir = '/root/files/'
 local_spark_path = '/opt/spark/'
 jars_dir = '/opt/jars/'
 r_libs = ['R6', 'pbdZMQ', 'RCurl', 'devtools', 'reshape2', 'caTools', 'rJava', 
'ggplot2']
+if os.environ['application'] == 'deeplearning':
+tensorflow_version = '1.4.0'
+cuda_version = '8.0'
+cuda_file_name = 'cuda_8.0.44_linux-run'
+cudnn_version = '6.0'
+cudnn_file_name = 'cudnn-8.0-linux-x64-v6.0.tgz'
 
 
 def start_spark(os_user, master_ip, node):
@@ -165,8 +171,6 @@ if __name__ == "__main__":
 
 # INSTALL DEEP LEARNING FRAMEWORKS
 if os.environ['application'] == 'deeplearning':
-print("Installing Caffe")
-install_caffe(args.os_user, args.region, caffe_version)
 print("Installing Caffe2")
 install_caffe2(args.os_user, caffe2_version, cmake_version)
 print("Installing Torch")
diff --git 
a/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py
 
b/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py
index ec188ed..3903bbb 100644
--- 
a/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py
+++ 
b/infrastructure-provisioning/src/deeplearning/scripts/configure_deep_learning_node.py
@@ -121,8 +121,6 @@ if __name__ == "__main__":
 install_theano(args.os_user, theano_version)
 print("Installing Keras")
 install_keras(args.os_user, keras_version)
-print("Installing Caffe")
-install_caffe(args.os_user, args.region, caffe_version)
 print("Installing Caffe2")
 install_caffe2(args.os_user, caffe2_version, cmake_version)
 print("Installing Torch")
diff --git 
a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py 
b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
index ecb5f02..91da82d 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/notebook_lib.py
@@ -405,45 +405,6 @@ def get_available_os_pkgs():
 sys.exit(1)
 
 
-def install_caffe(os_user, region, caffe_version):
-if not exists('/home/{}/.ensure_dir/caffe_ensured'.format(os_user)):
-env.shell = "/bin/bash -l -c -i"
-sudo('apt-get install -y python-dev')
-sudo('apt-get install -y python3-dev')
-sudo('apt-get install -y libprotobuf-dev libleveldb-dev libsnappy-dev 
libopencv-dev libhdf5-serial-dev protobuf-compiler')
-sudo('apt-get install -y --no-install-recommends libboost-all-dev')
-sudo('apt-get install -y libatlas-base-dev libopenblas-dev')
-sudo('apt-get install -y libgflags-dev libgoogle-glog-dev liblmdb-dev')
-with cd('/usr/lib/x86_64-linux-gnu/'):
-sudo('ln -s libhdf5_serial_hl.so.10.0.2 libhdf5_hl.so')
-sudo('ln -s libhdf5_serial.so.10.1.0 libhdf5.so')
-sudo('git clone https://github.com/BVLC/caffe.git')
-with cd('/home/{}/caffe/'.format(os_user)):
-sudo('git checkout {}'.format(caffe_version))
-sudo('pip2 install -r python/requirements.txt --no-cache-dir')
-sudo('pip3 install -r python/requirements.txt --no-cache-dir')
-sudo('echo "CUDA_DIR := /usr/local/cuda" > Makefile.config')
-cuda_arch = sudo("/opt/cuda-8.0/extras/demo_suite/deviceQuery | 
grep 'CUDA Capability' | tr -d ' ' | cut -f2 -d ':'")
-sudo('echo "CUDA_ARCH := -gencode arch=compute_{0},code=sm_{0}" >> 
Makefile.config'.format(cuda_arch.replace('.', '')))
-sudo('echo "PYTHON_INCLUDE := /usr/include/python2.7 
/usr/local/lib/python2.7/dist-packages/numpy/core/include" >> Makefi