Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BB28C200C48 for ; Thu, 6 Apr 2017 19:55:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B9970160B91; Thu, 6 Apr 2017 17:55:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3DB1F160B81 for ; Thu, 6 Apr 2017 19:54:59 +0200 (CEST) Received: (qmail 86390 invoked by uid 500); 6 Apr 2017 17:54:58 -0000 Mailing-List: contact commits-help@calcite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@calcite.apache.org Delivered-To: mailing list commits@calcite.apache.org Received: (qmail 86357 invoked by uid 99); 6 Apr 2017 17:54:56 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Apr 2017 17:54:56 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 1A0B93A0F90 for ; Thu, 6 Apr 2017 17:54:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1790434 - in /calcite/site/avatica/docs: client_reference.html compatibility.html custom_client_artifacts.html docker.html history.html howto.html index.html json_reference.html protobuf_reference.html roadmap.html security.html Date: Thu, 06 Apr 2017 17:54:55 -0000 To: commits@calcite.apache.org From: elserj@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170406175456.1A0B93A0F90@svn01-us-west.apache.org> archived-at: Thu, 06 Apr 2017 17:55:00 -0000 Author: elserj Date: Thu Apr 6 17:54:55 2017 New Revision: 1790434 URL: http://svn.apache.org/viewvc?rev=1790434&view=rev Log: [CALCITE-1364] Publish Avatica docker docs Added: calcite/site/avatica/docs/docker.html Modified: calcite/site/avatica/docs/client_reference.html calcite/site/avatica/docs/compatibility.html calcite/site/avatica/docs/custom_client_artifacts.html calcite/site/avatica/docs/history.html calcite/site/avatica/docs/howto.html calcite/site/avatica/docs/index.html calcite/site/avatica/docs/json_reference.html calcite/site/avatica/docs/protobuf_reference.html calcite/site/avatica/docs/roadmap.html calcite/site/avatica/docs/security.html Modified: calcite/site/avatica/docs/client_reference.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/client_reference.html?rev=1790434&r1=1790433&r2=1790434&view=diff ============================================================================== --- calcite/site/avatica/docs/client_reference.html (original) +++ calcite/site/avatica/docs/client_reference.html Thu Apr 6 17:54:55 2017 @@ -114,6 +114,8 @@ + + @@ -142,6 +144,8 @@ + + @@ -177,6 +181,8 @@ + + @@ -205,6 +211,8 @@ + + @@ -233,6 +241,8 @@ + + @@ -261,6 +271,8 @@ + + @@ -289,6 +301,8 @@ + + @@ -317,6 +331,8 @@ + + @@ -345,6 +361,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,6 +428,8 @@ + + @@ -408,6 +458,8 @@ + + @@ -436,6 +488,8 @@ + + @@ -758,6 +812,16 @@ necessary when using HTTPS.

  • Custom Client Artifacts
  • + + + + + + + +
  • Docker Images
  • + + Modified: calcite/site/avatica/docs/compatibility.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/compatibility.html?rev=1790434&r1=1790433&r2=1790434&view=diff ============================================================================== --- calcite/site/avatica/docs/compatibility.html (original) +++ calcite/site/avatica/docs/compatibility.html Thu Apr 6 17:54:55 2017 @@ -114,6 +114,8 @@ + + @@ -142,6 +144,8 @@ + + @@ -177,6 +181,8 @@ + + @@ -205,6 +211,8 @@ + + @@ -233,6 +241,8 @@ + + @@ -261,6 +271,8 @@ + + @@ -289,6 +301,8 @@ + + @@ -317,6 +331,8 @@ + + @@ -345,6 +361,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,6 +428,8 @@ + + @@ -408,6 +458,8 @@ + + @@ -436,6 +488,8 @@ + + @@ -685,6 +739,16 @@ running the TCK, reference the provided
  • Custom Client Artifacts
  • + + + + + + + +
  • Docker Images
  • + + Modified: calcite/site/avatica/docs/custom_client_artifacts.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/custom_client_artifacts.html?rev=1790434&r1=1790433&r2=1790434&view=diff ============================================================================== --- calcite/site/avatica/docs/custom_client_artifacts.html (original) +++ calcite/site/avatica/docs/custom_client_artifacts.html Thu Apr 6 17:54:55 2017 @@ -114,6 +114,8 @@ + + @@ -142,6 +144,8 @@ + + @@ -177,6 +181,8 @@ + + @@ -205,6 +211,8 @@ + + @@ -233,6 +241,8 @@ + + @@ -261,6 +271,8 @@ + + @@ -289,6 +301,8 @@ + + @@ -317,6 +331,8 @@ + + @@ -345,6 +361,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,6 +428,8 @@ + + @@ -408,6 +458,8 @@ + + @@ -436,6 +488,8 @@ + + @@ -601,7 +655,7 @@ a brief - + @@ -717,6 +771,16 @@ a brief
  • Custom Client Artifacts
  • + + + + + + + +
  • Docker Images
  • + + Added: calcite/site/avatica/docs/docker.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/docker.html?rev=1790434&view=auto ============================================================================== --- calcite/site/avatica/docs/docker.html (added) +++ calcite/site/avatica/docs/docker.html Thu Apr 6 17:54:55 2017 @@ -0,0 +1,914 @@ + + + + + Docker Images + + + + + + + + + + +
    + +
    + + +
    +
    + + +
    +
    + +
    + +
    + + +
    +
    +

    Docker Images

    + + +

    Docker Images for Avatica

    + +

    Docker is a popular piece of +software that enables other software to run “anywhere”. In the context of Avatica, +we can use Docker to enable a run-anywhere Avatica server. These Docker containers +can be used to easily create a server for the development of custom Avatica clients +or encapsulating database access for testing software that uses Avatica.

    + +

    Base “avatica-server” Docker Image

    + +

    Starting with the Avatica 1.10.0 release, Avatica is providing a number of Docker +containers. Each of these images is based on a “parent” “avatica-server” Docker image.

    + +

    This Docker image has no bindings to a specific database (it has not database-specific +JDBC driver included). It only contains a Java runtime and the Avatica Standalone Server +jar (which contains all the necessary dependencies of the Avatica server). This docker +image is not directly useful for end users; it is useful for those who want to use Avatica +with a database of their choosing.

    + +

    This Docker image will be deployed to the Apache Dockerhub account after the release +of 1.10.0 and will be updated for future releases of Avatica.

    + +

    Database-specific Docker Images

    + +

    To make the lives of end-users who want to use a specific database easier, some Docker +images are provided for some common databases. The current databases include:

    + +
      +
    • HyperSQL (2.3.1)
    • +
    • MySQL (Client 5.1.41, supports MySQL server 4.1, 5.0, 5.1, 5.5, 5.6, 5.7)
    • +
    • PostgreSQL (Client 42.0.0, supports PostgreSQL servers >=8.3)
    • +
    + +

    These images are not deployed as the licensing on each database driver is varied. Please +understand and accept the license of each before using in any software project.

    + +

    Each of these images include a build.sh script which will build the docker image using +the latest avatica-server Docker image. The resulting Docker image will be named according +to the following format: avatica-<database>-server. For example, avatica-hsqldb-server, +avatica-mysql-server, and avatica-postgresql-server.

    + +

    Additionally, Docker Compose configuration files for the above +databases (sans HyperSQL) are provided which configure the database’s standard Docker image +and then connect Avatica to that Docker container. For example, the PostgreSQL docker-compose configuration +file will start an instance of PostgreSQL and an instance of the Avatica server, each in their own container, +exposing an Avatica server configured against a “real” PostgreSQL database.

    + +

    All of the Dockerfile and docker-compose.yml files are conveniently provided in an archive for +each release, starting with 1.10.0.

    + +

    +avatica-docker-1.10.0-SNAPSHOT/ +avatica-docker-1.10.0-SNAPSHOT/hypersql/ +avatica-docker-1.10.0-SNAPSHOT/mysql/ +avatica-docker-1.10.0-SNAPSHOT/postgresql/ +avatica-docker-1.10.0-SNAPSHOT/Dockerfile +avatica-docker-1.10.0-SNAPSHOT/hypersql/build.sh +avatica-docker-1.10.0-SNAPSHOT/hypersql/Dockerfile +avatica-docker-1.10.0-SNAPSHOT/mysql/build.sh +avatica-docker-1.10.0-SNAPSHOT/mysql/docker-compose.yml +avatica-docker-1.10.0-SNAPSHOT/mysql/Dockerfile +avatica-docker-1.10.0-SNAPSHOT/postgresql/build.sh +avatica-docker-1.10.0-SNAPSHOT/postgresql/docker-compose.yml +avatica-docker-1.10.0-SNAPSHOT/postgresql/Dockerfile +

    + +

    Running

    + +

    Each of the provided database-specific Docker images set an ENTRYPOINT which +encapsulate most of the Java command. The following options are available to specify:

    + +

    +Usage: <main class> [options] + Options: + -h, -help, --help + Print the help message + Default: false + -p, --port + Port the server should bind + Default: 0 + -s, --serialization + Serialization method to use + Default: PROTOBUF + Possible Values: [JSON, PROTOBUF] + * -u, --url + JDBC driver url for the server +

    + +

    For example, to connect to a MySQL server, the following could be used:

    + +

    +$ ./avatica-docker-*/mysql/build.sh +$ docker run --rm -it avatica-mysql-server \ + -u jdbc:mysql://<fqdn>:3306/my_database +

    + +

    To debug these docker images, the ENTRYPOINT can be overriden to launch a shell

    + +

    +$ docker run --rm --entrypoint='' -it avatica-mysql-server /bin/sh +

    + +

    Running Docker containers for custom databases

    + +

    The provided avatica-server Docker image is designed to be generally reusable +for developers that want to expose a database of their choosing. A custom Dockerfile +can be created by copying what the avatica-mysql-server or avatica-postgresql-server +do, but this is also achievable via the Docker volumes.

    + +

    For example, consider we have a JAR with a JDBC driver for our database on our local +machine /home/user/my-database-jars/my-database-jdbc-1.0.jar. We can run the following command to +launch a custom Avatica server against our database with this JDBC driver.

    + +

    +$ docker run --rm -p 8765:8765 \ + -v /home/user/my-database-jars/:/my-database-jars --entrypoint="" -it avatica-server \ + /usr/bin/java -cp "/home/avatica/classpath/*:/my-database-jars/*" \ + org.apache.calcite.avatica.standalone.StandaloneServer -p 8765 \ + -u "jdbc:my_jdbc_url" +

    + +

    This command does the following:

    + +
      +
    • Exposes the internal port 8765 on the local machine as 8765
    • +
    • Maps the local directory “home/user/my-database-jars” to the Docker container at “/my-database-jars” using the Docker volumes feature
    • +
    • Adds that mapped directory to the Java classpath
    • +
    • Sets the correct JDBC URL for the database
    • +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + +
    +
    + + + + + +
    +
    +
    + + +
    +
    + +
    + +
    + + +
    + +
    +
    + + + + + + + + + Modified: calcite/site/avatica/docs/history.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/history.html?rev=1790434&r1=1790433&r2=1790434&view=diff ============================================================================== --- calcite/site/avatica/docs/history.html (original) +++ calcite/site/avatica/docs/history.html Thu Apr 6 17:54:55 2017 @@ -114,6 +114,8 @@ + + @@ -142,6 +144,8 @@ + + @@ -177,6 +181,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -205,6 +241,8 @@ + + @@ -233,6 +271,8 @@ + + @@ -261,6 +301,8 @@ + + @@ -289,6 +331,8 @@ + + @@ -317,6 +361,8 @@ + + @@ -345,6 +391,8 @@ + + @@ -380,6 +428,8 @@ + + @@ -408,6 +458,8 @@ + + @@ -436,6 +488,8 @@ + + @@ -789,12 +843,15 @@ for information about previous Avatica r + + +
    @@ -917,6 +974,16 @@ for information about previous Avatica r
  • Custom Client Artifacts
  • + + + + + + + +
  • Docker Images
  • + + Modified: calcite/site/avatica/docs/howto.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/howto.html?rev=1790434&r1=1790433&r2=1790434&view=diff ============================================================================== --- calcite/site/avatica/docs/howto.html (original) +++ calcite/site/avatica/docs/howto.html Thu Apr 6 17:54:55 2017 @@ -114,6 +114,8 @@ + + @@ -142,6 +144,8 @@ + + @@ -177,6 +181,8 @@ + + @@ -205,6 +211,8 @@ + + @@ -233,6 +241,8 @@ + + @@ -261,6 +271,8 @@ + + @@ -289,6 +301,8 @@ + + @@ -317,6 +331,8 @@ + + @@ -345,6 +361,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,6 +428,8 @@ + + @@ -408,6 +458,8 @@ + + @@ -436,6 +488,8 @@ + + @@ -1111,6 +1165,16 @@ as a template. Be sure to include a brie
  • Custom Client Artifacts
  • + + + + + + + +
  • Docker Images
  • + + Modified: calcite/site/avatica/docs/index.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/index.html?rev=1790434&r1=1790433&r2=1790434&view=diff ============================================================================== --- calcite/site/avatica/docs/index.html (original) +++ calcite/site/avatica/docs/index.html Thu Apr 6 17:54:55 2017 @@ -114,6 +114,8 @@ + + @@ -142,6 +144,8 @@ + + @@ -177,6 +181,8 @@ + + @@ -205,6 +211,8 @@ + + @@ -233,6 +241,8 @@ + + @@ -261,6 +271,8 @@ + + @@ -289,6 +301,8 @@ + + @@ -317,6 +331,8 @@ + + @@ -345,6 +361,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,6 +428,8 @@ + + @@ -408,6 +458,8 @@ + + @@ -436,6 +488,8 @@ + + @@ -761,6 +815,16 @@ highly welcomed!

  • Custom Client Artifacts
  • + + + + + + + +
  • Docker Images
  • + + Modified: calcite/site/avatica/docs/json_reference.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/json_reference.html?rev=1790434&r1=1790433&r2=1790434&view=diff ============================================================================== --- calcite/site/avatica/docs/json_reference.html (original) +++ calcite/site/avatica/docs/json_reference.html Thu Apr 6 17:54:55 2017 @@ -114,6 +114,8 @@ + + @@ -142,6 +144,8 @@ + + @@ -177,6 +181,8 @@ + + @@ -205,6 +211,8 @@ + + @@ -233,6 +241,8 @@ + + @@ -261,6 +271,8 @@ + + @@ -289,6 +301,8 @@ + + @@ -317,6 +331,8 @@ + + @@ -345,6 +361,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,6 +428,8 @@ + + @@ -408,6 +458,8 @@ + + @@ -436,6 +488,8 @@ + + @@ -1754,6 +1808,16 @@ for more information on valid attributes
  • Custom Client Artifacts
  • + + + + + + + +
  • Docker Images
  • + + Modified: calcite/site/avatica/docs/protobuf_reference.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/protobuf_reference.html?rev=1790434&r1=1790433&r2=1790434&view=diff ============================================================================== --- calcite/site/avatica/docs/protobuf_reference.html (original) +++ calcite/site/avatica/docs/protobuf_reference.html Thu Apr 6 17:54:55 2017 @@ -114,6 +114,8 @@ + + @@ -142,6 +144,8 @@ + + @@ -177,6 +181,8 @@ + + @@ -205,6 +211,8 @@ + + @@ -233,6 +241,8 @@ + + @@ -261,6 +271,8 @@ + + @@ -289,6 +301,8 @@ + + @@ -317,6 +331,8 @@ + + @@ -345,6 +361,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,6 +428,8 @@ + + @@ -408,6 +458,8 @@ + + @@ -436,6 +488,8 @@ + + @@ -1834,6 +1888,16 @@ to the attributes in this message:

  • Custom Client Artifacts
  • + + + + + + + +
  • Docker Images
  • + + Modified: calcite/site/avatica/docs/roadmap.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/roadmap.html?rev=1790434&r1=1790433&r2=1790434&view=diff ============================================================================== --- calcite/site/avatica/docs/roadmap.html (original) +++ calcite/site/avatica/docs/roadmap.html Thu Apr 6 17:54:55 2017 @@ -114,6 +114,8 @@ + + @@ -142,6 +144,8 @@ + + @@ -177,6 +181,8 @@ + + @@ -205,6 +211,8 @@ + + @@ -233,6 +241,8 @@ + + @@ -261,6 +271,8 @@ + + @@ -289,6 +301,8 @@ + + @@ -317,6 +331,8 @@ + + @@ -345,6 +361,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,6 +428,8 @@ + + @@ -408,6 +458,8 @@ + + @@ -436,6 +488,8 @@ + + @@ -629,6 +683,16 @@
  • Custom Client Artifacts
  • + + + + + + + +
  • Docker Images
  • + + Modified: calcite/site/avatica/docs/security.html URL: http://svn.apache.org/viewvc/calcite/site/avatica/docs/security.html?rev=1790434&r1=1790433&r2=1790434&view=diff ============================================================================== --- calcite/site/avatica/docs/security.html (original) +++ calcite/site/avatica/docs/security.html Thu Apr 6 17:54:55 2017 @@ -114,6 +114,8 @@ + + @@ -142,6 +144,8 @@ + + @@ -177,6 +181,8 @@ + + @@ -205,6 +211,8 @@ + + @@ -233,6 +241,8 @@ + + @@ -261,6 +271,8 @@ + + @@ -289,6 +301,8 @@ + + @@ -317,6 +331,8 @@ + + @@ -345,6 +361,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -380,6 +428,8 @@ + + @@ -408,6 +458,8 @@ + + @@ -436,6 +488,8 @@ + + @@ -812,6 +866,16 @@ superfluous.

  • Custom Client Artifacts
  • + + + + + + + +
  • Docker Images
  • + +