[GitHub] flink pull request #2340: [FLINK-3155] Update docker flink container to the ...

2016-08-17 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/2340


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #2340: [FLINK-3155] Update docker flink container to the ...

2016-08-17 Thread mxm
Github user mxm commented on a diff in the pull request:

https://github.com/apache/flink/pull/2340#discussion_r75123833
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,25 +22,31 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ARG FLINK_VERSION=1.0.3
+ARG FLINK_VERSION=1.1.1
 ARG HADOOP_VERSION=27
 ARG SCALA_VERSION=2.11
 
+# Flink environment variables
+ARG FLINK_INSTALL_PATH=/opt
+ENV FLINK_HOME $FLINK_INSTALL_PATH/flink
+ENV PATH $PATH:$FLINK_HOME/bin
+
 # Install build dependencies and flink
 RUN set -x && \
+  mkdir -p $FLINK_INSTALL_PATH && \
   apk --update add --virtual build-dependencies curl && \
-  curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?as_json\=1 | \
-  awk '/preferred/ {gsub(/"/,""); print 
$2}')flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
 | \
-  tar xvz -C /usr/local/ && \
-  ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \
-  sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g" 
/usr/local/flink/bin/flink-daemon.sh && \
+  curl -s $(curl -s 
https://www.apache.org/dyn/closer.cgi\?preferred\=true)flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
 | \
--- End diff --

Much better! Thanks :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #2340: [FLINK-3155] Update docker flink container to the ...

2016-08-11 Thread mxm
Github user mxm commented on a diff in the pull request:

https://github.com/apache/flink/pull/2340#discussion_r74445659
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,25 +22,30 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ARG FLINK_VERSION=1.0.3
+ARG FLINK_VERSION=1.1.0
 ARG HADOOP_VERSION=27
 ARG SCALA_VERSION=2.11
 
+# Flink environment variables
+ENV FLINK_HOME /opt/flink
+ENV PATH $PATH:$FLINK_HOME/bin
+
 # Install build dependencies and flink
 RUN set -x && \
+  mkdir -p /opt && \
   apk --update add --virtual build-dependencies curl && \
-  curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?as_json\=1 | \
-  awk '/preferred/ {gsub(/"/,""); print 
$2}')flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
 | \
-  tar xvz -C /usr/local/ && \
-  ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \
-  sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g" 
/usr/local/flink/bin/flink-daemon.sh && \
+  curl -s 
https://archive.apache.org/dist/flink/flink-$FLINK_VERSION/flink-$FLINK_VERSION-bin-hadoop$HADOOP_VERSION-scala_$SCALA_VERSION.tgz
 | \
--- End diff --

Still would like to keep it because it is strongly encouraged to not use 
the load balanced servers instead of the archive server.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #2340: [FLINK-3155] Update docker flink container to the ...

2016-08-11 Thread mxm
Github user mxm commented on a diff in the pull request:

https://github.com/apache/flink/pull/2340#discussion_r74445485
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,25 +22,30 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ARG FLINK_VERSION=1.0.3
+ARG FLINK_VERSION=1.1.0
 ARG HADOOP_VERSION=27
 ARG SCALA_VERSION=2.11
 
+# Flink environment variables
+ENV FLINK_HOME /opt/flink
+ENV PATH $PATH:$FLINK_HOME/bin
+
 # Install build dependencies and flink
 RUN set -x && \
+  mkdir -p /opt && \
   apk --update add --virtual build-dependencies curl && \
-  curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?as_json\=1 | \
-  awk '/preferred/ {gsub(/"/,""); print 
$2}')flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
 | \
-  tar xvz -C /usr/local/ && \
-  ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \
-  sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g" 
/usr/local/flink/bin/flink-daemon.sh && \
+  curl -s 
https://archive.apache.org/dist/flink/flink-$FLINK_VERSION/flink-$FLINK_VERSION-bin-hadoop$HADOOP_VERSION-scala_$SCALA_VERSION.tgz
 | \
--- End diff --

I see your point concerning fragility. You're probably right. Btw, you can 
always validate the download using the MD5/SHA256 files from the archive server 
:)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #2340: [FLINK-3155] Update docker flink container to the ...

2016-08-10 Thread iemejia
Github user iemejia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2340#discussion_r74261518
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,25 +22,30 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ARG FLINK_VERSION=1.0.3
+ARG FLINK_VERSION=1.1.0
 ARG HADOOP_VERSION=27
 ARG SCALA_VERSION=2.11
 
+# Flink environment variables
+ENV FLINK_HOME /opt/flink
+ENV PATH $PATH:$FLINK_HOME/bin
+
 # Install build dependencies and flink
 RUN set -x && \
+  mkdir -p /opt && \
   apk --update add --virtual build-dependencies curl && \
-  curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?as_json\=1 | \
-  awk '/preferred/ {gsub(/"/,""); print 
$2}')flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
 | \
-  tar xvz -C /usr/local/ && \
-  ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \
-  sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g" 
/usr/local/flink/bin/flink-daemon.sh && \
+  curl -s 
https://archive.apache.org/dist/flink/flink-$FLINK_VERSION/flink-$FLINK_VERSION-bin-hadoop$HADOOP_VERSION-scala_$SCALA_VERSION.tgz
 | \
--- End diff --

Notice that I have another argument against the mirrors and it is the 
security issue, imagine that a malign mirror puts a wrong version of flink, I 
wonder what is the recomended approach to validate this case (of course notice 
that I asume that hacking apache would be harder).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #2340: [FLINK-3155] Update docker flink container to the ...

2016-08-10 Thread iemejia
Github user iemejia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2340#discussion_r74259291
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,25 +22,30 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ARG FLINK_VERSION=1.0.3
+ARG FLINK_VERSION=1.1.0
 ARG HADOOP_VERSION=27
 ARG SCALA_VERSION=2.11
 
+# Flink environment variables
+ENV FLINK_HOME /opt/flink
+ENV PATH $PATH:$FLINK_HOME/bin
+
 # Install build dependencies and flink
 RUN set -x && \
+  mkdir -p /opt && \
   apk --update add --virtual build-dependencies curl && \
-  curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?as_json\=1 | \
-  awk '/preferred/ {gsub(/"/,""); print 
$2}')flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
 | \
-  tar xvz -C /usr/local/ && \
-  ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \
-  sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g" 
/usr/local/flink/bin/flink-daemon.sh && \
+  curl -s 
https://archive.apache.org/dist/flink/flink-$FLINK_VERSION/flink-$FLINK_VERSION-bin-hadoop$HADOOP_VERSION-scala_$SCALA_VERSION.tgz
 | \
+  tar xvz -C /opt/ && \
--- End diff --

Ok.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #2340: [FLINK-3155] Update docker flink container to the ...

2016-08-10 Thread iemejia
Github user iemejia commented on a diff in the pull request:

https://github.com/apache/flink/pull/2340#discussion_r74243197
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,25 +22,30 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ARG FLINK_VERSION=1.0.3
+ARG FLINK_VERSION=1.1.0
 ARG HADOOP_VERSION=27
 ARG SCALA_VERSION=2.11
 
+# Flink environment variables
+ENV FLINK_HOME /opt/flink
+ENV PATH $PATH:$FLINK_HOME/bin
+
 # Install build dependencies and flink
 RUN set -x && \
+  mkdir -p /opt && \
   apk --update add --virtual build-dependencies curl && \
-  curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?as_json\=1 | \
-  awk '/preferred/ {gsub(/"/,""); print 
$2}')flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
 | \
-  tar xvz -C /usr/local/ && \
-  ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \
-  sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g" 
/usr/local/flink/bin/flink-daemon.sh && \
+  curl -s 
https://archive.apache.org/dist/flink/flink-$FLINK_VERSION/flink-$FLINK_VERSION-bin-hadoop$HADOOP_VERSION-scala_$SCALA_VERSION.tgz
 | \
--- End diff --

I agree, I just changed it because I find the older code so ugly (and 
fragile) for what it does, also my other argument to do this was the fact that 
people will probably won't build the image as much as they will pull it from 
the official hub.docker image (once we publish this image as the official one). 
I can let it like it was if this is better for you.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #2340: [FLINK-3155] Update docker flink container to the ...

2016-08-10 Thread mxm
Github user mxm commented on a diff in the pull request:

https://github.com/apache/flink/pull/2340#discussion_r74229989
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,25 +22,30 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ARG FLINK_VERSION=1.0.3
+ARG FLINK_VERSION=1.1.0
 ARG HADOOP_VERSION=27
 ARG SCALA_VERSION=2.11
 
+# Flink environment variables
+ENV FLINK_HOME /opt/flink
+ENV PATH $PATH:$FLINK_HOME/bin
+
 # Install build dependencies and flink
 RUN set -x && \
+  mkdir -p /opt && \
   apk --update add --virtual build-dependencies curl && \
-  curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?as_json\=1 | \
-  awk '/preferred/ {gsub(/"/,""); print 
$2}')flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
 | \
-  tar xvz -C /usr/local/ && \
-  ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \
-  sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g" 
/usr/local/flink/bin/flink-daemon.sh && \
+  curl -s 
https://archive.apache.org/dist/flink/flink-$FLINK_VERSION/flink-$FLINK_VERSION-bin-hadoop$HADOOP_VERSION-scala_$SCALA_VERSION.tgz
 | \
+  tar xvz -C /opt/ && \
--- End diff --

Could we make the install path configurable?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #2340: [FLINK-3155] Update docker flink container to the ...

2016-08-10 Thread mxm
Github user mxm commented on a diff in the pull request:

https://github.com/apache/flink/pull/2340#discussion_r74229920
  
--- Diff: flink-contrib/docker-flink/Dockerfile ---
@@ -22,25 +22,30 @@ FROM java:8-jre-alpine
 RUN apk add --no-cache bash snappy
 
 # Configure Flink version
-ARG FLINK_VERSION=1.0.3
+ARG FLINK_VERSION=1.1.0
 ARG HADOOP_VERSION=27
 ARG SCALA_VERSION=2.11
 
+# Flink environment variables
+ENV FLINK_HOME /opt/flink
+ENV PATH $PATH:$FLINK_HOME/bin
+
 # Install build dependencies and flink
 RUN set -x && \
+  mkdir -p /opt && \
   apk --update add --virtual build-dependencies curl && \
-  curl -s $(curl -s https://www.apache.org/dyn/closer.cgi\?as_json\=1 | \
-  awk '/preferred/ {gsub(/"/,""); print 
$2}')flink/flink-${FLINK_VERSION}/flink-${FLINK_VERSION}-bin-hadoop${HADOOP_VERSION}-scala_${SCALA_VERSION}.tgz
 | \
-  tar xvz -C /usr/local/ && \
-  ln -s /usr/local/flink-$FLINK_VERSION /usr/local/flink && \
-  sed -i -e "s/echo \$mypid >> \$pid/echo \$mypid >> \$pid \&\& wait/g" 
/usr/local/flink/bin/flink-daemon.sh && \
+  curl -s 
https://archive.apache.org/dist/flink/flink-$FLINK_VERSION/flink-$FLINK_VERSION-bin-hadoop$HADOOP_VERSION-scala_$SCALA_VERSION.tgz
 | \
--- End diff --

The use of the archive mirror is discouraged. It's better to use the load 
balancing script which you removed above.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #2340: [FLINK-3155] Update docker flink container to the ...

2016-08-07 Thread iemejia
GitHub user iemejia opened a pull request:

https://github.com/apache/flink/pull/2340

[FLINK-3155] Update docker flink container to the latest release

Thanks for contributing to Apache Flink. Before you open your pull request, 
please take the following check list into consideration.
If your changes take all of the items into account, feel free to open your 
pull request. For more information and/or questions please refer to the [How To 
Contribute guide](http://flink.apache.org/how-to-contribute.html).
In addition to going through the list, please provide a meaningful 
description of your changes.

- [x] General
  - The pull request references the related JIRA issue ("[FLINK-XXX] Jira 
title text")
  - The pull request addresses only one issue
  - Each commit in the PR has a meaningful commit message (including the 
JIRA id)

- [ ] Documentation
  - Documentation has been added for new functionality
  - Old documentation affected by the pull request has been updated
  - JavaDoc for public methods has been added

- [ ] Tests & Build
  - Functionality added by the pull request is covered by tests
  - `mvn clean verify` has been executed successfully locally or a Travis 
build has passed



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/iemejia/flink new

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/2340.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2340


commit 299a7536db6cb51dd9920989caaaf527a4cb4feb
Author: Ismaël Mejía 
Date:   2016-08-07T10:57:48Z

[FLINK-3155] Update docker flink container to the latest release
I also simplified some stuff from the basic script




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---