You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by jm...@apache.org on 2016/08/27 00:58:33 UTC

[1/2] incubator-guacamole-client git commit: GUACAMOLE-93: Build guacamole-docker using parent guacamole-client source.

Repository: incubator-guacamole-client
Updated Branches:
  refs/heads/master a5cfccb09 -> 25d259e67


GUACAMOLE-93: Build guacamole-docker using parent guacamole-client source.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/e68ce294
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/e68ce294
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/e68ce294

Branch: refs/heads/master
Commit: e68ce294197486d46c263f3cfb6e9509ccd7e772
Parents: a5cfccb
Author: Michael Jumper <mj...@apache.org>
Authored: Fri Aug 26 15:58:20 2016 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Fri Aug 26 16:06:30 2016 -0700

----------------------------------------------------------------------
 guacamole-docker/Dockerfile                |  26 +++---
 guacamole-docker/bin/build-guacamole.sh    | 110 ++++++++++++++++++++++++
 guacamole-docker/bin/download-guacamole.sh |  49 -----------
 guacamole-docker/bin/download-jdbc-auth.sh |  83 ------------------
 guacamole-docker/bin/download-ldap-auth.sh |  62 -------------
 guacamole-docker/bin/start.sh              |   6 ++
 6 files changed, 132 insertions(+), 204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/e68ce294/guacamole-docker/Dockerfile
----------------------------------------------------------------------
diff --git a/guacamole-docker/Dockerfile b/guacamole-docker/Dockerfile
index a3b2941..cddab01 100644
--- a/guacamole-docker/Dockerfile
+++ b/guacamole-docker/Dockerfile
@@ -25,20 +25,26 @@
 FROM tomcat:8.0.20-jre8
 MAINTAINER Michael Jumper <mi...@guac-dev.org>
 
-# Version info
+# Environment variables
 ENV \
-    GUAC_VERSION=0.9.9      \
-    GUAC_JDBC_VERSION=0.9.9 \
-    GUAC_LDAP_VERSION=0.9.9
+    BUILD_DIR=/tmp/guacamole-docker-BUILD \
+    BUILD_DEPENDENCIES="                  \
+        maven                             \
+        openjdk-8-jdk-headless"
 
 # Add configuration scripts
-COPY bin /opt/guacamole/bin/
+COPY guacamole-docker/bin /opt/guacamole/bin/
 
-# Download and install latest guacamole-client and authentication
-RUN \
-    /opt/guacamole/bin/download-guacamole.sh "$GUAC_VERSION" /usr/local/tomcat/webapps && \
-    /opt/guacamole/bin/download-jdbc-auth.sh "$GUAC_JDBC_VERSION" /opt/guacamole       && \
-    /opt/guacamole/bin/download-ldap-auth.sh "$GUAC_LDAP_VERSION" /opt/guacamole
+# Copy source to container for sake of build
+COPY . "$BUILD_DIR"
+
+# Build latest guacamole-client and authentication
+RUN apt-get update                                                    && \
+    apt-get install -y --no-install-recommends $BUILD_DEPENDENCIES    && \
+    /opt/guacamole/bin/build-guacamole.sh "$BUILD_DIR" /opt/guacamole && \
+    rm -Rf "$BUILD_DIR"                                               && \
+    rm -Rf /var/lib/apt/lists/*                                       && \
+    apt-get purge -y --auto-remove $BUILD_DEPENDENCIES
 
 # Start Guacamole under Tomcat, listening on 0.0.0.0:8080
 EXPOSE 8080

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/e68ce294/guacamole-docker/bin/build-guacamole.sh
----------------------------------------------------------------------
diff --git a/guacamole-docker/bin/build-guacamole.sh b/guacamole-docker/bin/build-guacamole.sh
new file mode 100755
index 0000000..0f531e2
--- /dev/null
+++ b/guacamole-docker/bin/build-guacamole.sh
@@ -0,0 +1,110 @@
+#!/bin/sh -e
+#
+# 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.
+#
+
+##
+## @fn build-guacamole.sh
+##
+## Builds Guacamole, saving "guacamole.war" and all applicable extension .jars
+## using the incubator-guacamole-client source contained within the given
+## directory. Extension files will be grouped by their associated type, with
+## all MySQL files being placed within the "mysql/" subdirectory of the
+## destination, all PostgreSQL files being placed within the "postgresql/"
+## subdirectory of the destination, etc.
+##
+## @param BUILD_DIR
+##     The directory which currently contains the guacamole-client source and
+##     in which the build should be performed.
+##
+## @param DESTINATION
+##     The directory to save guacamole.war within, along with all extension
+##     .jars.  Note that this script will create extension-specific
+##     subdirectories within this directory, and files will thus be grouped by
+##     extension type.
+##
+
+BUILD_DIR="$1"
+DESTINATION="$2"
+
+#
+# Create destination, if it does not yet exist
+#
+
+mkdir -p "$DESTINATION"
+
+#
+# Build guacamole.war and all extensions
+#
+
+cd "$BUILD_DIR"
+mvn package
+rm -Rf ~/.m2
+
+#
+# Copy guacamole.war to destination
+#
+
+cp guacamole/target/*.war "$DESTINATION/guacamole.war"
+
+#
+# Copy JDBC auth extensions and SQL scripts
+#
+
+tar -xzf extensions/guacamole-auth-jdbc/target/*.tar.gz \
+    -C "$DESTINATION"                                   \
+    --wildcards                                         \
+    --no-anchored                                       \
+    --strip-components=1                                \
+    "*.jar"                                             \
+    "*.sql"
+
+#
+# Download MySQL JDBC driver
+#
+
+echo "Downloading MySQL Connector/J ..."
+curl -L "http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.35.tar.gz" | \
+tar -xz                        \
+    -C "$DESTINATION/mysql/"   \
+    --wildcards                \
+    --no-anchored              \
+    --no-wildcards-match-slash \
+    --strip-components=1       \
+    "mysql-connector-*.jar"
+
+#
+# Download PostgreSQL JDBC driver
+#
+
+echo "Downloading PostgreSQL JDBC driver ..."
+curl -L "https://jdbc.postgresql.org/download/postgresql-9.4-1201.jdbc41.jar" > "$DESTINATION/postgresql/postgresql-9.4-1201.jdbc41.jar"
+
+#
+# Copy LDAP auth extension and schema modifications
+#
+
+mkdir -p "$DESTINATION/ldap"
+tar -xzf extensions/guacamole-auth-ldap/target/*.tar.gz \
+    -C "$DESTINATION/ldap"                              \
+    --wildcards                                         \
+    --no-anchored                                       \
+    --xform="s#.*/##"                                   \
+    "*.jar"                                             \
+    "*.ldif"
+

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/e68ce294/guacamole-docker/bin/download-guacamole.sh
----------------------------------------------------------------------
diff --git a/guacamole-docker/bin/download-guacamole.sh b/guacamole-docker/bin/download-guacamole.sh
deleted file mode 100755
index 2feca4f..0000000
--- a/guacamole-docker/bin/download-guacamole.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh -e
-#
-# 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.
-#
-
-##
-## @fn download-guacamole.sh
-##
-## Downloads Guacamole, saving the specified version to "guacamole.war" within
-## the given directory.
-##
-## @param VERSION
-##     The version of guacamole.war to download, such as "0.9.6".
-##
-## @param DESTINATION
-##     The directory to save guacamole.war within.
-##
-
-VERSION="$1"
-DESTINATION="$2"
-
-#
-# Create destination, if it does not yet exist
-#
-
-mkdir -p "$DESTINATION"
-
-#
-# Download guacamole.war, placing in specified destination
-#
-
-echo "Downloading Guacamole version $VERSION to $DESTINATION ..."
-curl -L "http://sourceforge.net/projects/guacamole/files/current/binary/guacamole-${VERSION}.war" > "$DESTINATION/guacamole.war"
-

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/e68ce294/guacamole-docker/bin/download-jdbc-auth.sh
----------------------------------------------------------------------
diff --git a/guacamole-docker/bin/download-jdbc-auth.sh b/guacamole-docker/bin/download-jdbc-auth.sh
deleted file mode 100755
index 7ee3127..0000000
--- a/guacamole-docker/bin/download-jdbc-auth.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh -e
-#
-# 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.
-#
-
-##
-## @fn download-jdbc-auth.sh
-##
-## Downloads JDBC authentication support, including any required JDBC drivers.
-## The downloaded files will be grouped by their associated database type, with
-## all MySQL files being placed within the "mysql/" subdirectory of the
-## destination, and all PostgreSQL files being placed within the "postgresql/"
-## subdirectory of the destination.
-##
-## @param VERSION
-##     The version of guacamole-auth-jdbc to download, such as "0.9.6".
-##
-## @param DESTINATION
-##     The directory to save downloaded files within. Note that this script
-##     will create database-specific subdirectories within this directory,
-##     and downloaded files will be thus grouped by their respected database
-##     types.
-##
-
-VERSION="$1"
-DESTINATION="$2"
-
-#
-# Create destination, if it does not yet exist
-#
-
-mkdir -p "$DESTINATION"
-
-#
-# Download Guacamole JDBC auth
-#
-
-echo "Downloading JDBC auth version $VERSION ..."
-curl -L "http://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-jdbc-$VERSION.tar.gz" | \
-tar -xz                  \
-    -C "$DESTINATION"    \
-    --wildcards          \
-    --no-anchored        \
-    --strip-components=1 \
-    "*.jar"              \
-    "*.sql"
-
-#
-# Download MySQL JDBC driver
-#
-
-echo "Downloading MySQL Connector/J ..."
-curl -L "http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.35.tar.gz" | \
-tar -xz                        \
-    -C "$DESTINATION/mysql/"   \
-    --wildcards                \
-    --no-anchored              \
-    --no-wildcards-match-slash \
-    --strip-components=1       \
-    "mysql-connector-*.jar"
-
-#
-# Download PostgreSQL JDBC driver
-#
-
-echo "Downloading PostgreSQL JDBC driver ..."
-curl -L "https://jdbc.postgresql.org/download/postgresql-9.4-1201.jdbc41.jar" > "$DESTINATION/postgresql/postgresql-9.4-1201.jdbc41.jar"
-

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/e68ce294/guacamole-docker/bin/download-ldap-auth.sh
----------------------------------------------------------------------
diff --git a/guacamole-docker/bin/download-ldap-auth.sh b/guacamole-docker/bin/download-ldap-auth.sh
deleted file mode 100755
index f39a54d..0000000
--- a/guacamole-docker/bin/download-ldap-auth.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh -e
-#
-# 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.
-#
-
-##
-## @fn download-ldap-auth.sh
-##
-## Downloads LDAP authentication support. The LDAP authentication .jar file
-## will be placed within the specified destination directory.
-##
-## @param VERSION
-##     The version of guacamole-auth-ldap to download, such as "0.9.6".
-##
-## @param DESTINATION
-##     The directory to save downloaded files within.
-##
-
-VERSION="$1"
-DESTINATION="$2"
-
-#
-# Use ldap/ subdirectory within DESTINATION.
-#
-
-DESTINATION="$DESTINATION/ldap"
-
-#
-# Create destination, if it does not yet exist
-#
-
-mkdir -p "$DESTINATION"
-
-#
-# Download Guacamole LDAP auth
-#
-
-echo "Downloading LDAP auth version $VERSION ..."
-curl -L "http://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-ldap-$VERSION.tar.gz" | \
-tar -xz               \
-    -C "$DESTINATION" \
-    --wildcards       \
-    --no-anchored     \
-    --xform="s#.*/##" \
-    "*.jar"           \
-    "*.ldif"
-

http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/e68ce294/guacamole-docker/bin/start.sh
----------------------------------------------------------------------
diff --git a/guacamole-docker/bin/start.sh b/guacamole-docker/bin/start.sh
index 3d324d7..c17f0ad 100755
--- a/guacamole-docker/bin/start.sh
+++ b/guacamole-docker/bin/start.sh
@@ -325,8 +325,14 @@ END
 ## last function run within the script.
 ##
 start_guacamole() {
+
+    # Install webapp
+    ln -sf /opt/guacamole/guacamole.war /usr/local/tomcat/webapps/
+
+    # Start tomcat
     cd /usr/local/tomcat
     exec catalina.sh run
+
 }
 
 #


[2/2] incubator-guacamole-client git commit: GUACAMOLE-93: Merge updates to guacamole-client docker image.

Posted by jm...@apache.org.
GUACAMOLE-93: Merge updates to guacamole-client docker image.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/25d259e6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/25d259e6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/25d259e6

Branch: refs/heads/master
Commit: 25d259e67cb1cf72525e43b6e5a3e902b5410dfc
Parents: a5cfccb e68ce29
Author: James Muehlner <ja...@guac-dev.org>
Authored: Fri Aug 26 17:57:26 2016 -0700
Committer: James Muehlner <ja...@guac-dev.org>
Committed: Fri Aug 26 17:57:26 2016 -0700

----------------------------------------------------------------------
 guacamole-docker/Dockerfile                |  26 +++---
 guacamole-docker/bin/build-guacamole.sh    | 110 ++++++++++++++++++++++++
 guacamole-docker/bin/download-guacamole.sh |  49 -----------
 guacamole-docker/bin/download-jdbc-auth.sh |  83 ------------------
 guacamole-docker/bin/download-ldap-auth.sh |  62 -------------
 guacamole-docker/bin/start.sh              |   6 ++
 6 files changed, 132 insertions(+), 204 deletions(-)
----------------------------------------------------------------------