You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by io...@apache.org on 2019/05/23 08:56:49 UTC

[incubator-dlab] branch DLAB-657 created (now 1090d60)

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

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


      at 1090d60  POC for webui image

This branch includes the following new commits:

     new 1090d60  POC for webui image

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



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


[incubator-dlab] 01/01: POC for webui image

Posted by io...@apache.org.
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

commit 1090d6026ce61f736b00d8d2a89b65de8d1f7a86
Author: Oleksandr_Isniuk <i....@gmail.com>
AuthorDate: Thu May 23 11:57:17 2019 +0300

    POC for webui image
---
 .../src/general/files/aws/webui_Dockerfile         | 39 ++++++++++++++++++++++
 .../src/general/lib/os/debian/ssn_lib.py           | 14 ++++++++
 .../src/ssn/scripts/configure_ui.py                |  4 +++
 3 files changed, 57 insertions(+)

diff --git a/infrastructure-provisioning/src/general/files/aws/webui_Dockerfile b/infrastructure-provisioning/src/general/files/aws/webui_Dockerfile
new file mode 100644
index 0000000..35911a2
--- /dev/null
+++ b/infrastructure-provisioning/src/general/files/aws/webui_Dockerfile
@@ -0,0 +1,39 @@
+# *****************************************************************************
+#
+# 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.
+#
+# ******************************************************************************
+
+FROM ubuntu:16.04
+
+
+USER root
+RUN  apt-get update && \
+     apt-get -y upgrade && \
+     apt-get -y install software-properties-common && \
+     apt-get -y install curl tar sudo
+
+
+# java
+RUN apt-get install -y default-jre && \
+    apt-get install -y default-jdk && \
+    apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+
+COPY 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 2b2c075..36f12b0 100644
--- a/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
+++ b/infrastructure-provisioning/src/general/lib/os/debian/ssn_lib.py
@@ -302,6 +302,20 @@ def start_ss(keyfile, host_string, dlab_conf_dir, web_path,
         sys.exit(1)
 
 
+def create_kuber_images():
+    try:
+        sudo("mkdir /opt/dlab/sources/infrastructure-provisioning/src/tmp-kuber/")
+        sudo("cp -r /opt/dlab/conf/ /opt/dlab/sources/infrastructure-provisioning/src/tmp-kuber/")
+        sudo("cp -r /opt/dlab/webapp/self-service/lib/*.jar /opt/dlab/sources/infrastructure-provisioning/src/tmp-kuber/")
+        sudo("cp -r /opt/dlab/webapp/security-service/lib/*.jar /opt/dlab/sources/infrastructure-provisioning/src/tmp-kuber/")
+        sudo("cp -r /opt/dlab/webapp/provisioning-service/lib/*.jar /opt/dlab/sources/infrastructure-provisioning/src/tmp-kuber/")
+        sudo("cp -r /opt/dlab/webapp/billing/lib/*.jar /opt/dlab/sources/infrastructure-provisioning/src/tmp-kuber/")
+        sudo("cd /opt/dlab/sources/infrastructure-provisioning/src/; docker build --file general/files/aws/webui_Dockerfile --no-cache -t docker.dlab-ui .")
+    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/ssn/scripts/configure_ui.py b/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
index 364a45f..87fda84 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_ui.py
@@ -240,3 +240,7 @@ if __name__ == "__main__":
              args.hostname, args.datalake_store_name, args.subscription_id, args.validate_permission_scope,
              args.dlab_id, args.usage_date, args.product, args.usage_type,
              args.usage, args.cost, args.resource_id, args.tags)
+
+    #raw draft for kuber
+    print("Creating Kuber images")
+    create_kuber_images()
\ No newline at end of file


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