You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2019/09/02 10:01:03 UTC

[incubator-dlab] branch DLAB-terraform updated: added Dlab Java Docker files

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

omartushevskyi 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 04b7ae8  added Dlab Java Docker files
04b7ae8 is described below

commit 04b7ae86e73d8e779e846fe73b8a49bbd95bc5e5
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Mon Sep 2 13:00:55 2019 +0300

    added Dlab Java Docker files
---
 services/billing-aws/Dockerfile     | 28 ++++++++++++++++++++++++++
 services/self-service/Dockerfile    | 40 +++++++++++++++++++++++++++++++++++++
 services/self-service/entrypoint.sh | 12 +++++++++++
 3 files changed, 80 insertions(+)

diff --git a/services/billing-aws/Dockerfile b/services/billing-aws/Dockerfile
new file mode 100644
index 0000000..66d2812
--- /dev/null
+++ b/services/billing-aws/Dockerfile
@@ -0,0 +1,28 @@
+# *****************************************************************************
+#
+# 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 openjdk:8-alpine
+
+USER root
+
+COPY billing-aws-2.1.jar /root/
+
+CMD java -Xmx1024M -jar -Duser.timezone=UTC -Dfile.encoding=UTF-8 /root/billing-aws-2.1.jar --conf /root/billing.yml
\ No newline at end of file
diff --git a/services/self-service/Dockerfile b/services/self-service/Dockerfile
new file mode 100644
index 0000000..fec58d2
--- /dev/null
+++ b/services/self-service/Dockerfile
@@ -0,0 +1,40 @@
+# *****************************************************************************
+#
+# 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 openjdk:8-alpine
+
+
+USER root
+
+RUN apk add --update \
+    python \
+    python-dev \
+    py-pip \
+    build-base \
+    && pip install awscli --upgrade \
+    && apk --purge -v del py-pip \
+    && rm -rf /var/cache/apk/*
+
+COPY self-service-2.1.jar /root/
+COPY entrypoint.sh /
+RUN chmod 755 /entrypoint.sh
+
+ENTRYPOINT ["/entrypoint.sh"]
\ No newline at end of file
diff --git a/services/self-service/entrypoint.sh b/services/self-service/entrypoint.sh
new file mode 100644
index 0000000..6137f03
--- /dev/null
+++ b/services/self-service/entrypoint.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+/bin/mkdir -p /root/keys
+
+/usr/bin/aws s3 cp s3://${SSN_BUCKET_NAME}/dlab/certs/ssn/ssn.keystore.jks /root/keys/ssn.keystore.jks
+/usr/bin/aws s3 cp s3://${SSN_BUCKET_NAME}/dlab/certs/ssn/ssn.crt /root/keys/ssn.crt
+/usr/bin/aws s3 cp s3://${SSN_BUCKET_NAME}/dlab/certs/endpoint/endpoint.crt /root/keys/endpoint.crt
+
+/usr/bin/keytool -importcert -trustcacerts -alias dlab -file /root/keys/ssn.crt -noprompt -storepass changeit -keystore /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/cacerts
+/usr/bin/keytool -importcert -trustcacerts -file /root/keys/endpoint.crt -noprompt -storepass changeit -keystore /usr/lib/jvm/java-1.8-openjdk/jre/lib/security/cacerts
+
+/usr/bin/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


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