You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ie...@apache.org on 2017/08/22 11:49:05 UTC

[1/2] beam git commit: [BEAM-1534] Create a dockerized developer environment for Beam

Repository: beam
Updated Branches:
  refs/heads/master 62294e64c -> 9b175ccc2


[BEAM-1534] Create a dockerized developer environment for Beam


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/68091296
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/68091296
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/68091296

Branch: refs/heads/master
Commit: 68091296f12ad51523c816954ec593e720733c37
Parents: 62294e6
Author: Ismaël Mejía <ie...@gmail.com>
Authored: Tue Jul 25 11:57:09 2017 +0200
Committer: Ismaël Mejía <ie...@gmail.com>
Committed: Tue Aug 22 10:21:39 2017 +0200

----------------------------------------------------------------------
 .gitignore                                      |  3 ++
 .../resources/docker/file/openjdk7/Dockerfile   | 49 ++++++++++++++++++
 .../docker/file/openjdk7/docker-entrypoint.sh   | 24 +++++++++
 .../resources/docker/file/openjdk8/Dockerfile   | 49 ++++++++++++++++++
 .../docker/file/openjdk8/docker-entrypoint.sh   | 24 +++++++++
 .../resources/docker/git/openjdk8/Dockerfile    | 53 ++++++++++++++++++++
 .../docker/git/openjdk8/docker-entrypoint.sh    | 22 ++++++++
 .../resources/docker/release/python2/Dockerfile | 21 ++++++++
 8 files changed, 245 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/68091296/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 36c5cc8..f996dfd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,6 +42,9 @@ sdks/python/apache_beam/portability/api/*pb2*.*
 .apt_generated/
 .settings/
 
+# Ignore Visual Studio Code files.
+.vscode/
+
 # The build process generates the dependency-reduced POM, but it shouldn't be
 # committed.
 dependency-reduced-pom.xml

http://git-wip-us.apache.org/repos/asf/beam/blob/68091296/sdks/java/build-tools/src/main/resources/docker/file/openjdk7/Dockerfile
----------------------------------------------------------------------
diff --git a/sdks/java/build-tools/src/main/resources/docker/file/openjdk7/Dockerfile b/sdks/java/build-tools/src/main/resources/docker/file/openjdk7/Dockerfile
new file mode 100644
index 0000000..35d164a
--- /dev/null
+++ b/sdks/java/build-tools/src/main/resources/docker/file/openjdk7/Dockerfile
@@ -0,0 +1,49 @@
+###############################################################################
+#  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 maven:3-jdk-7
+
+# Download OS dependencies
+RUN apt-get update && \
+    apt-get install -y \
+      libsnappy1 \
+      python-pip \
+      python-virtualenv \
+      python-dev \
+      rsync \
+  && rm -rf /var/lib/apt/lists/*
+
+# Add the entrypoint script that downloads the beam sources on run
+COPY docker-entrypoint.sh /usr/local/bin/
+RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat
+ENTRYPOINT ["docker-entrypoint.sh"]
+
+# Create beam user to validate the build on user space
+ENV USER=user \
+    UID=9999 \
+    HOME=/home/user
+RUN groupadd --system --gid=$UID $USER; \
+    useradd --system --uid=$UID --gid $USER $USER;
+RUN mkdir -p $HOME; \
+    chown -R $USER:$USER $HOME;
+USER $USER
+WORKDIR $HOME
+
+ENV URL=https://github.com/apache/beam/archive/master.zip
+ENV SRC_FILE=master.zip
+ENV SRC_DIR=beam-master

http://git-wip-us.apache.org/repos/asf/beam/blob/68091296/sdks/java/build-tools/src/main/resources/docker/file/openjdk7/docker-entrypoint.sh
----------------------------------------------------------------------
diff --git a/sdks/java/build-tools/src/main/resources/docker/file/openjdk7/docker-entrypoint.sh b/sdks/java/build-tools/src/main/resources/docker/file/openjdk7/docker-entrypoint.sh
new file mode 100755
index 0000000..589e6ba
--- /dev/null
+++ b/sdks/java/build-tools/src/main/resources/docker/file/openjdk7/docker-entrypoint.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+#    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.
+#
+
+wget --no-verbose -O $SRC_FILE $URL
+unzip -q $SRC_FILE
+rm $SRC_FILE
+ln -s $HOME/$SRC_DIR $HOME/beam
+cd $HOME/beam
+exec "$@"

http://git-wip-us.apache.org/repos/asf/beam/blob/68091296/sdks/java/build-tools/src/main/resources/docker/file/openjdk8/Dockerfile
----------------------------------------------------------------------
diff --git a/sdks/java/build-tools/src/main/resources/docker/file/openjdk8/Dockerfile b/sdks/java/build-tools/src/main/resources/docker/file/openjdk8/Dockerfile
new file mode 100644
index 0000000..23032fa
--- /dev/null
+++ b/sdks/java/build-tools/src/main/resources/docker/file/openjdk8/Dockerfile
@@ -0,0 +1,49 @@
+###############################################################################
+#  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 maven:3-jdk-8
+
+# Download OS dependencies
+RUN apt-get update && \
+    apt-get install -y \
+      libsnappy1v5 \
+      python-pip \
+      python-virtualenv \
+      python-dev \
+      rsync \
+  && rm -rf /var/lib/apt/lists/*
+
+# Add the entrypoint script that downloads the beam sources on run
+COPY docker-entrypoint.sh /usr/local/bin/
+RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat
+ENTRYPOINT ["docker-entrypoint.sh"]
+
+# Create beam user to validate the build on user space
+ENV USER=user \
+    UID=9999 \
+    HOME=/home/user
+RUN groupadd --system --gid=$UID $USER; \
+    useradd --system --uid=$UID --gid $USER $USER;
+RUN mkdir -p $HOME; \
+    chown -R $USER:$USER $HOME;
+USER $USER
+WORKDIR $HOME
+
+ENV URL=https://github.com/apache/beam/archive/master.zip
+ENV SRC_FILE=master.zip
+ENV SRC_DIR=beam-master

http://git-wip-us.apache.org/repos/asf/beam/blob/68091296/sdks/java/build-tools/src/main/resources/docker/file/openjdk8/docker-entrypoint.sh
----------------------------------------------------------------------
diff --git a/sdks/java/build-tools/src/main/resources/docker/file/openjdk8/docker-entrypoint.sh b/sdks/java/build-tools/src/main/resources/docker/file/openjdk8/docker-entrypoint.sh
new file mode 100755
index 0000000..589e6ba
--- /dev/null
+++ b/sdks/java/build-tools/src/main/resources/docker/file/openjdk8/docker-entrypoint.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+#    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.
+#
+
+wget --no-verbose -O $SRC_FILE $URL
+unzip -q $SRC_FILE
+rm $SRC_FILE
+ln -s $HOME/$SRC_DIR $HOME/beam
+cd $HOME/beam
+exec "$@"

http://git-wip-us.apache.org/repos/asf/beam/blob/68091296/sdks/java/build-tools/src/main/resources/docker/git/openjdk8/Dockerfile
----------------------------------------------------------------------
diff --git a/sdks/java/build-tools/src/main/resources/docker/git/openjdk8/Dockerfile b/sdks/java/build-tools/src/main/resources/docker/git/openjdk8/Dockerfile
new file mode 100644
index 0000000..26b5955
--- /dev/null
+++ b/sdks/java/build-tools/src/main/resources/docker/git/openjdk8/Dockerfile
@@ -0,0 +1,53 @@
+###############################################################################
+#  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 maven:3-jdk-8
+
+# Download OS dependencies
+RUN apt-get update && \
+    apt-get install -y \
+      libsnappy1v5 \
+      python-pip \
+      python-virtualenv \
+      python-dev \
+      rsync \
+  && rm -rf /var/lib/apt/lists/*
+
+# Add the entrypoint script that downloads the beam sources on run
+COPY docker-entrypoint.sh /usr/local/bin/
+RUN ln -s usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat
+ENTRYPOINT ["docker-entrypoint.sh"]
+
+# Create beam user to validate the build on user space
+ENV USER=user \
+    UID=9999 \
+    HOME=/home/user
+RUN groupadd --system --gid=$UID $USER; \
+    useradd --system --uid=$UID --gid $USER $USER;
+RUN mkdir -p $HOME; \
+    chown -R $USER:$USER $HOME;
+USER $USER
+WORKDIR $HOME
+
+ARG URL=https://github.com/apache/beam
+ENV BRANCH=master
+
+RUN git clone $URL beam; \
+  cd beam; \
+  git config --local --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*'; \
+  git fetch --quiet --all;

http://git-wip-us.apache.org/repos/asf/beam/blob/68091296/sdks/java/build-tools/src/main/resources/docker/git/openjdk8/docker-entrypoint.sh
----------------------------------------------------------------------
diff --git a/sdks/java/build-tools/src/main/resources/docker/git/openjdk8/docker-entrypoint.sh b/sdks/java/build-tools/src/main/resources/docker/git/openjdk8/docker-entrypoint.sh
new file mode 100755
index 0000000..c25842d
--- /dev/null
+++ b/sdks/java/build-tools/src/main/resources/docker/git/openjdk8/docker-entrypoint.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+#    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.
+#
+
+cd $HOME/beam
+git fetch --quiet --all
+git checkout $BRANCH
+exec "$@"

http://git-wip-us.apache.org/repos/asf/beam/blob/68091296/sdks/java/build-tools/src/main/resources/docker/release/python2/Dockerfile
----------------------------------------------------------------------
diff --git a/sdks/java/build-tools/src/main/resources/docker/release/python2/Dockerfile b/sdks/java/build-tools/src/main/resources/docker/release/python2/Dockerfile
new file mode 100644
index 0000000..551fe9a
--- /dev/null
+++ b/sdks/java/build-tools/src/main/resources/docker/release/python2/Dockerfile
@@ -0,0 +1,21 @@
+###############################################################################
+#  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 python:2
+
+RUN pip install --user apache-beam[gcp]

[2/2] beam git commit: This closes #3651

Posted by ie...@apache.org.
This closes #3651


Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/9b175ccc
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/9b175ccc
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/9b175ccc

Branch: refs/heads/master
Commit: 9b175ccc2f88d805ead3131c56129c24bdf1045e
Parents: 62294e6 6809129
Author: Ismaël Mejía <ie...@gmail.com>
Authored: Tue Aug 22 13:48:42 2017 +0200
Committer: Ismaël Mejía <ie...@gmail.com>
Committed: Tue Aug 22 13:48:42 2017 +0200

----------------------------------------------------------------------
 .gitignore                                      |  3 ++
 .../resources/docker/file/openjdk7/Dockerfile   | 49 ++++++++++++++++++
 .../docker/file/openjdk7/docker-entrypoint.sh   | 24 +++++++++
 .../resources/docker/file/openjdk8/Dockerfile   | 49 ++++++++++++++++++
 .../docker/file/openjdk8/docker-entrypoint.sh   | 24 +++++++++
 .../resources/docker/git/openjdk8/Dockerfile    | 53 ++++++++++++++++++++
 .../docker/git/openjdk8/docker-entrypoint.sh    | 22 ++++++++
 .../resources/docker/release/python2/Dockerfile | 21 ++++++++
 8 files changed, 245 insertions(+)
----------------------------------------------------------------------