This is an automated email from the ASF dual-hosted git repository. mergebot-role pushed a commit to branch mergebot in repository https://gitbox.apache.org/repos/asf/beam-site.git
commit c43098e8e0a0d49fe99f70e2ad26ab97210ae28b Author: melissa <meliss...@google.com> AuthorDate: Mon Sep 25 10:51:39 2017 -0700 Manually add missing generated files --- content/contribute/docker-images/index.html | 383 ++++++++++++++++++++++++++++ content/images/logo_gearpump.png | Bin 0 -> 4691 bytes 2 files changed, 383 insertions(+) diff --git a/content/contribute/docker-images/index.html b/content/contribute/docker-images/index.html new file mode 100644 index 0000000..cd160aa --- /dev/null +++ b/content/contribute/docker-images/index.html @@ -0,0 +1,383 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>Beam Docker Images</title> + <meta name="description" content="Apache Beam is an open source, unified model and set of language-specific SDKs for defining and executing data processing workflows, and also data ingestion and integration flows, supporting Enterprise Integration Patterns (EIPs) and Domain Specific Languages (DSLs). Dataflow pipelines simplify the mechanics of large-scale batch and streaming data processing and can run on a number of runtimes like Apache Flink, Apache Spark, and Google Cloud Dataflow [...] +"> + <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400" rel="stylesheet"> + <link rel="stylesheet" href="/css/site.css"> + <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> + <script src="/js/bootstrap.min.js"></script> + <script src="/js/language-switch.js"></script> + <link rel="canonical" href="https://beam.apache.org/contribute/docker-images/" data-proofer-ignore> + <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico"> + <link rel="alternate" type="application/rss+xml" title="Apache Beam" href="https://beam.apache.org/feed.xml"> + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + ga('create', 'UA-73650088-1', 'auto'); + ga('send', 'pageview'); + </script> +</head> + + <body class="body "> + <nav class="header navbar navbar-fixed-top"> + <div class="navbar-header"> + <a href="/" class="navbar-brand" > + <img alt="Brand" style="height: 25px" src="/images/beam_logo_navbar.png"> + </a> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + </div> + <div id="navbar" class="navbar-collapse collapse"> + <ul class="nav navbar-nav"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Get Started <span class="caret"></span></a> + <ul class="dropdown-menu"> + <li><a href="/get-started/beam-overview/">Beam Overview</a></li> + <li><a href="/get-started/quickstart-java/">Quickstart - Java</a></li> + <li><a href="/get-started/quickstart-py/">Quickstart - Python</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Example Walkthroughs</li> + <li><a href="/get-started/wordcount-example/">WordCount</a></li> + <li><a href="/get-started/mobile-gaming-example/">Mobile Gaming</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Resources</li> + <li><a href="/get-started/downloads">Downloads</a></li> + <li><a href="/get-started/support">Support</a></li> + </ul> + </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Documentation <span class="caret"></span></a> + <ul class="dropdown-menu"> + <li><a href="/documentation">Using the Documentation</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Beam Concepts</li> + <li><a href="/documentation/programming-guide/">Programming Guide</a></li> + <li><a href="/documentation/resources/">Additional Resources</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Pipeline Fundamentals</li> + <li><a href="/documentation/pipelines/design-your-pipeline/">Design Your Pipeline</a></li> + <li><a href="/documentation/pipelines/create-your-pipeline/">Create Your Pipeline</a></li> + <li><a href="/documentation/pipelines/test-your-pipeline/">Test Your Pipeline</a></li> + <li><a href="/documentation/io/io-toc/">Pipeline I/O</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">SDKs</li> + <li><a href="/documentation/sdks/java/">Java SDK</a></li> + <li><a href="/documentation/sdks/javadoc/2.1.0/" target="_blank">Java SDK API Reference <img src="/images/external-link-icon.png" + width="14" height="14" + alt="External link."></a> + </li> + <li><a href="/documentation/sdks/python/">Python SDK</a></li> + <li><a href="/documentation/sdks/pydoc/2.1.0/" target="_blank">Python SDK API Reference <img src="/images/external-link-icon.png" + width="14" height="14" + alt="External link."></a> + </li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Runners</li> + <li><a href="/documentation/runners/capability-matrix/">Capability Matrix</a></li> + <li><a href="/documentation/runners/direct/">Direct Runner</a></li> + <li><a href="/documentation/runners/apex/">Apache Apex Runner</a></li> + <li><a href="/documentation/runners/flink/">Apache Flink Runner</a></li> + <li><a href="/documentation/runners/gearpump/">Apache Gearpump Runner</a></li> + <li><a href="/documentation/runners/spark/">Apache Spark Runner</a></li> + <li><a href="/documentation/runners/dataflow/">Cloud Dataflow Runner</a></li> + + <li role="separator" class="divider"></li> + <li class="dropdown-header">DSLs</li> + <li><a href="/documentation/dsls/sql/">SQL</a></li> + </ul> + </li> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Contribute <span class="caret"></span></a> + <ul class="dropdown-menu"> + <li><a href="/contribute">Get Started Contributing</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Guides</li> + <li><a href="/contribute/contribution-guide/">Contribution Guide</a></li> + <li><a href="/contribute/testing/">Testing Guide</a></li> + <li><a href="/contribute/release-guide/">Release Guide</a></li> + <li><a href="/contribute/ptransform-style-guide/">PTransform Style Guide</a></li> + <li><a href="/contribute/runner-guide/">Runner Authoring Guide</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Technical References</li> + <li><a href="/contribute/design-principles/">Design Principles</a></li> + <li><a href="/contribute/work-in-progress/">Ongoing Projects</a></li> + <li><a href="/contribute/source-repository/">Source Repository</a></li> + <li><a href="/contribute/docker-images/">Docker Images</a></li> + <li role="separator" class="divider"></li> + <li class="dropdown-header">Promotion</li> + <li><a href="/contribute/presentation-materials/">Presentation Materials</a></li> + <li><a href="/contribute/logos/">Logos and Design</a></li> + <li role="separator" class="divider"></li> + <li><a href="/contribute/maturity-model/">Maturity Model</a></li> + <li><a href="/contribute/team/">Team</a></li> + </ul> + </li> + + <li><a href="/blog">Blog</a></li> + </ul> + <ul class="nav navbar-nav navbar-right"> + <li class="dropdown"> + <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img src="https://www.apache.org/foundation/press/kit/feather_small.png" alt="Apache Logo" style="height:20px;"><span class="caret"></span></a> + <ul class="dropdown-menu dropdown-menu-right"> + <li><a href="http://www.apache.org/">ASF Homepage</a></li> + <li><a href="http://www.apache.org/licenses/">License</a></li> + <li><a href="http://www.apache.org/security/">Security</a></li> + <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li> + <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li> + <li><a href="https://www.apache.org/foundation/policies/conduct">Code of Conduct</a></li> + </ul> + </li> + </ul> + </div><!--/.nav-collapse --> +</nav> + + <div class="body__contained"> + <h1 id="docker-images">Docker Images</h1> + +<p>Docker images allow to create a reproducible environment to build and test +Beam. You can use the docker images by using the provided <a href="https://github.com/apache/beam/tree/master/sdks/java/build-tools/src/main/resources/docker">Docker scripts</a>.</p> + +<p>In this directory you will find scripts to build and run docker images for +different purposes:</p> + +<ul> + <li> + <p><a href="#file">file</a>: Create a Docker container from a Beam source code .zip file +in a given environment. It is useful to test a specific version of Beam, +for example to validate a release vote.</p> + </li> + <li> + <p><a href="#git">git</a>: Same as file but the Beam source code comes from the git repository, +you can choose a given branch/tag/pull-request. Useful to test in a specific +environment.</p> + </li> + <li> + <p><a href="#release">release</a>: It builds an end-user distribution of the latest version of Beam +and its dependencies. Useful for end-users who want to have a ready to use +container with Beam (Python only for the moment).</p> + </li> +</ul> + +<h2 id="a-namefileafile-based-image"><a name="file"></a>File based image</h2> + +<p>If you want to build a container with a ready JDK 8 environment to test Beam:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>cd file/openjdk8 +docker build -t beam:openjdk8 . +</code></pre> +</div> + +<p>If you want to build a container with JDK 7:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>cd file/openjdk7 +docker build -t beam:openjdk7 . +</code></pre> +</div> + +<p>When you run the image it downloads the specific version of Beam given the +environment variables. By default it downloads the source code of the latest +master. If you want to download the latest master and execute the tests:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>docker run -it beam:openjdk8 mvn clean verify -Prelease +</code></pre> +</div> + +<p>If you want to have an interactive session you can run a bash prompt:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>docker run -it beam:openjdk8 /bin/bash +</code></pre> +</div> + +<p>Inside the container you can test a specific module by running Maven. You +have to change MODULE_PATH for the given module path. For example to test +HBaseIO you should write its path <code class="highlighter-rouge">sdks/java/io/hbase</code> in the place of +MODULE_PATH:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>mvn --projects MODULE_PATH clean verify -Prelease +</code></pre> +</div> + +<h3 id="configuring-the-runtime-via-the-environment-variables">Configuring the runtime via the environment variables</h3> + +<p>You can run different versions of Beam by passing the specific environment +variables:</p> + +<p><code class="highlighter-rouge">URL</code>: The URL with the file containing the specific source code.<br /> +<code class="highlighter-rouge">SRC_FILE</code>: The downloaded file name.<br /> +<code class="highlighter-rouge">SRC_DIR</code>: The name of the directory inside of the zip file.</p> + +<p>For example to run a Docker container with the exact code of the release 2.0.0:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>docker run \ + -e URL="https://www.apache.org/dyn/closer.cgi?filename=beam/2.0.0/apache-beam-2.0.0-source-release.zip&action=download" \ + -e SRC_FILE="apache-beam-2.0.0-source-release.zip" \ + -e SRC_DIR="apache-beam-2.0.0" \ + -it beam:openjdk8 /bin/bash +</code></pre> +</div> + +<p>If you want to run a container with a specific version e.g. 2.1.0-RC1:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>docker run \ + -e URL="https://github.com/apache/beam/archive/v2.1.0-RC1.zip" \ + -e SRC_FILE="v2.1.0-RC1.zip" \ + -e SRC_DIR="beam-2.1.0-RC1" \ + -it beam:openjdk8 /bin/bash +</code></pre> +</div> + +<p><em>Notice that SRC_FILE is different from SRC_DIR because github replaces the āvā +character in the internal name of the zip</em>.</p> + +<p>To run a container with the source code during a vote:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>docker run \ + -e URL="https://dist.apache.org/repos/dist/dev/beam/2.1.0/apache-beam-2.1.0-source-release.zip" \ + -e SRC_FILE="apache-beam-2.1.0-source-release.zip" \ + -e SRC_DIR="apache-beam-2.1.0" \ + -it beam:openjdk8 /bin/bash +</code></pre> +</div> + +<h3 id="testing-in-an-specific-environment-with-your-own-source">Testing in an specific environment with your own source</h3> + +<p>You can also overwrite the volume containing the source code of Beam from a +directory in your host machine. This is useful to test your code with different +versions of Java.</p> + +<p>If you have the code in the ~/workspace/beam directory and you want to quickly +test it with Beam on Java 7 you can do:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>docker run -v ~/workspace/beam:/home/user/beam -it beam:openjdk7 /bin/bash +</code></pre> +</div> + +<h3 id="performance-improvements">Performance improvements</h3> + +<p>The docker image does <strong>not</strong> contain the Java dependencies and this could make +the execution of the commands in the image take more time than expected. One way +to speed this up is by mounting a directory with the dependencies as a Docker +volume. The following command shows how to mount the host machine directory +for Maven dependencies <code class="highlighter-rouge">~/.m2</code> in the container:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>docker run -v ~/.m2:/home/user/.m2 -it beam:openjdk8 /bin/bash +</code></pre> +</div> + +<p>You can also use an empty directory instead of <code class="highlighter-rouge">~/.m2</code> if you want to create a +different environment from the local one to share it between runs.</p> + +<p><strong>Maven Improvements:</strong></p> + +<p>You can also speed the execution by adding environment variables to Maven, for +example the MAVEN_OPTS environment variable may speed up compilation:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>docker run \ + -e MAVEN_OPTS='-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xverify:none' \ + -it beam:openjdk8 /bin/bash +</code></pre> +</div> + +<p>Maven does not execute on multiple cores by default; to do this you have to +enable the threading execution:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>mvn --threads 1C ... +</code></pre> +</div> + +<h2 id="a-namegitagit-based-image"><a name="git"></a>Git based image</h2> + +<p>It creates a docker container with a cloned version of the git repository, its +branches and all the pull-requests. When it is run, it updates and checks out +the specified branch/tag/pull-request.</p> + +<p>You can choose the branch to execute via the environment variable:</p> + +<p><code class="highlighter-rouge">BRANCH</code>: The name of the specific branch, tag or pr to check out.</p> + +<p>By default it checks out master from the github repo, but if you want to check +a specific pull request <code class="highlighter-rouge">ID</code> you can build the image like this (you must change +<code class="highlighter-rouge">ID</code> for the number):</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>cd git/openjdk8 +docker build -t beam:git . +docker run -e BRANCH=pr/ID -it beam:git /bin/bash +</code></pre> +</div> + +<h2 id="a-namereleasearelease-image"><a name="release"></a>Release image</h2> + +<p>The release image is a container with the needed requirements to run Beam out of +the box in a container, or to submit a pipeline to execute on Google Cloud +Dataflow. To build it run:</p> + +<div class="highlighter-rouge"><pre class="highlight"><code>cd release/python2 +docker build -t beam:python2 . +</code></pre> +</div> + + </div> + <footer class="footer"> + <div class="footer__contained"> + <div class="footer__cols"> + <div class="footer__cols__col"> + <div class="footer__cols__col__logo"> + <img src="/images/beam_logo_circle.svg" class="footer__logo" alt="Beam logo"> + </div> + <div class="footer__cols__col__logo"> + <img src="/images/apache_logo_circle.svg" class="footer__logo" alt="Apache logo"> + </div> + </div> + <div class="footer__cols__col footer__cols__col--md"> + <div class="footer__cols__col__title">Start</div> + <div class="footer__cols__col__link"><a href="/get-started/beam-overview/">Overview</a></div> + <div class="footer__cols__col__link"><a href="/get-started/quickstart-java/">Quickstart (Java)</a></div> + <div class="footer__cols__col__link"><a href="/get-started/quickstart-py/">Quickstart (Python)</a></div> + <div class="footer__cols__col__link"><a href="/get-started/downloads/">Downloads</a></div> + </div> + <div class="footer__cols__col footer__cols__col--md"> + <div class="footer__cols__col__title">Docs</div> + <div class="footer__cols__col__link"><a href="/documentation/programming-guide/">Concepts</a></div> + <div class="footer__cols__col__link"><a href="/documentation/pipelines/design-your-pipeline/">Pipelines</a></div> + <div class="footer__cols__col__link"><a href="/documentation/runners/capability-matrix/">Runners</a></div> + </div> + <div class="footer__cols__col footer__cols__col--md"> + <div class="footer__cols__col__title">Community</div> + <div class="footer__cols__col__link"><a href="/contribute/">Contribute</a></div> + <div class="footer__cols__col__link"><a href="/contribute/team/">Team</a></div> + <div class="footer__cols__col__link"><a href="/contribute/presentation-materials/">Media</a></div> + </div> + <div class="footer__cols__col footer__cols__col--md"> + <div class="footer__cols__col__title">Resources</div> + <div class="footer__cols__col__link"><a href="/blog/">Blog</a></div> + <div class="footer__cols__col__link"><a href="/get-started/support/">Support</a></div> + <div class="footer__cols__col__link"><a href="https://github.com/apache/beam">GitHub</a></div> + </div> + </div> + </div> + <div class="footer__bottom"> + © + <a href="http://www.apache.org">The Apache Software Foundation</a> + | <a href="/privacy_policy">Privacy Policy</a> + | <a href="/feed.xml">RSS Feed</a> + <br><br> + Apache Beam, Apache, Beam, the Beam logo, and the Apache feather logo are + either registered trademarks or trademarks of The Apache Software + Foundation. All other products or name brands are trademarks of their + respective holders, including The Apache Software Foundation. + </div> +</footer> + + </body> +</html> diff --git a/content/images/logo_gearpump.png b/content/images/logo_gearpump.png new file mode 100644 index 0000000..29a5b89 Binary files /dev/null and b/content/images/logo_gearpump.png differ -- To stop receiving notification emails like this one, please contact "commits@beam.apache.org" <commits@beam.apache.org>.