You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by je...@apache.org on 2018/01/31 20:52:08 UTC

nifi git commit: Corrected Docker tag back to standard format Modified Docker startup scripts to accept Environment variables if available, or use the usual defaults if not. Updated readme to reflect changes in allowing environment variables. Updated rea

Repository: nifi
Updated Branches:
  refs/heads/master dc67bd2fd -> e74c67f77


Corrected Docker tag back to standard format
Modified Docker startup scripts to accept Environment variables if available, or use the usual defaults if not.
Updated readme to reflect changes in allowing environment variables.
Updated readme to correctly reflect the default ports that NiFi will run on.

This closes #2439

Signed-off-by: Jeremy Dyer <je...@apache.org>


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

Branch: refs/heads/master
Commit: e74c67f77965b8c0cd1bea4d1f1924b2dcebfa07
Parents: dc67bd2
Author: dchaffey <dc...@hortonworks.com>
Authored: Sun Jan 28 18:23:58 2018 +0000
Committer: Jeremy Dyer <je...@apache.org>
Committed: Wed Jan 31 15:50:42 2018 -0500

----------------------------------------------------------------------
 nifi-docker/dockerhub/DockerImage.txt |  2 +-
 nifi-docker/dockerhub/README.md       | 23 +++++++++++++++++------
 nifi-docker/dockerhub/sh/secure.sh    |  4 ++--
 nifi-docker/dockerhub/sh/start.sh     |  8 ++++----
 4 files changed, 24 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/e74c67f7/nifi-docker/dockerhub/DockerImage.txt
----------------------------------------------------------------------
diff --git a/nifi-docker/dockerhub/DockerImage.txt b/nifi-docker/dockerhub/DockerImage.txt
index 01bc5e6..ea34860 100644
--- a/nifi-docker/dockerhub/DockerImage.txt
+++ b/nifi-docker/dockerhub/DockerImage.txt
@@ -13,4 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apachenifi:1.6.0
+apache/nifi:1.6.0

http://git-wip-us.apache.org/repos/asf/nifi/blob/e74c67f7/nifi-docker/dockerhub/README.md
----------------------------------------------------------------------
diff --git a/nifi-docker/dockerhub/README.md b/nifi-docker/dockerhub/README.md
index d87765e..4d9a559 100644
--- a/nifi-docker/dockerhub/README.md
+++ b/nifi-docker/dockerhub/README.md
@@ -46,12 +46,22 @@ The configuration scripts are suitable for at least 1.4.0+.
 The minimum to run a NiFi instance is as follows:
 
     docker run --name nifi \
-      -p 18080:8080 \
+      -p 8080:8080 \
       -d \
       apache/nifi:latest
       
-This will provide a running instance, exposing the instance UI to the host system on at port 18080,
-viewable at `http://localhost:18080/nifi`.
+This will provide a running instance, exposing the instance UI to the host system on at port 8080,
+viewable at `http://localhost:8080/nifi`.
+
+You can also pass in environment variables to change the NiFi communication ports and hostname using the Docker '-e' switch as follows:
+
+    docker run --name nifi \
+      -p 9090:9090 \
+      -d \
+      -e NIFI_WEB_HTTP_PORT='9090'
+      apache/nifi:latest
+      
+For a list of the environment variables recognised in this build, look into the .sh/secure.sh and .sh/start.sh scripts
         
 ### Standalone Instance, Two-Way SSL
 In this configuration, the user will need to provide certificates and the associated configuration information.
@@ -62,7 +72,7 @@ Finally, this command makes use of a volume to provide certificates on the host
 
     docker run --name nifi \
       -v /User/dreynolds/certs/localhost:/opt/certs \
-      -p 18443:8443 \
+      -p 8443:8443 \
       -e AUTH=tls \
       -e KEYSTORE_PATH=/opt/certs/keystore.jks \
       -e KEYSTORE_TYPE=JKS \
@@ -86,7 +96,7 @@ volume to provide certificates on the host system to the container instance.
 
     docker run --name nifi \
       -v /User/dreynolds/certs/localhost:/opt/certs \
-      -p 18443:8443 \
+      -p 8443:8443 \
       -e AUTH=tls \
       -e KEYSTORE_PATH=/opt/certs/keystore.jks \
       -e KEYSTORE_TYPE=JKS \
@@ -115,7 +125,7 @@ volume to provide certificates on the host system to the container instance.
     -e LDAP_TLS_TRUSTSTORE_TYPE: ''
 
 ## Configuration Information
-The following ports are specified by the Docker container for NiFi operation within the container and 
+The following ports are specified by default in Docker for NiFi operation within the container and 
 can be published to the host.
 
 | Function                 | Property                      | Port  |
@@ -123,3 +133,4 @@ can be published to the host.
 | HTTP Port                | nifi.web.http.port            | 8080  |
 | HTTPS Port               | nifi.web.https.port           | 8443  |
 | Remote Input Socket Port | nifi.remote.input.socket.port | 10000 |
+

http://git-wip-us.apache.org/repos/asf/nifi/blob/e74c67f7/nifi-docker/dockerhub/sh/secure.sh
----------------------------------------------------------------------
diff --git a/nifi-docker/dockerhub/sh/secure.sh b/nifi-docker/dockerhub/sh/secure.sh
index 4609005..919e118 100644
--- a/nifi-docker/dockerhub/sh/secure.sh
+++ b/nifi-docker/dockerhub/sh/secure.sh
@@ -48,8 +48,8 @@ prop_replace 'nifi.security.truststorePasswd'   "${TRUSTSTORE_PASSWORD}"
 # Disable HTTP and enable HTTPS
 prop_replace 'nifi.web.http.port'   ''
 prop_replace 'nifi.web.http.host'   ''
-prop_replace 'nifi.web.https.port'  '8443'
-prop_replace 'nifi.web.https.host'  "${hostname}"
+prop_replace 'nifi.web.https.port'  "${NIFI_WEB_HTTPS_PORT:-8443}"
+prop_replace 'nifi.web.https.host'  "${NIFI_WEB_HTTPS_HOST:-$HOSTNAME}"
 prop_replace 'nifi.remote.input.secure' 'true'
 
 # Establish initial user and an associated admin identity

http://git-wip-us.apache.org/repos/asf/nifi/blob/e74c67f7/nifi-docker/dockerhub/sh/start.sh
----------------------------------------------------------------------
diff --git a/nifi-docker/dockerhub/sh/start.sh b/nifi-docker/dockerhub/sh/start.sh
index df79ad6..7e340a6 100755
--- a/nifi-docker/dockerhub/sh/start.sh
+++ b/nifi-docker/dockerhub/sh/start.sh
@@ -20,10 +20,10 @@ scripts_dir='/opt/nifi/scripts'
 [ -f "${scripts_dir}/common.sh" ] && . "${scripts_dir}/common.sh"
 
 # Establish baseline properties
-prop_replace 'nifi.web.http.port'               '8080'
-prop_replace 'nifi.web.http.host'               "${hostname}"
-prop_replace 'nifi.remote.input.host'           "${hostname}"
-prop_replace 'nifi.remote.input.socket.port'    '10000'
+prop_replace 'nifi.web.http.port'               "${NIFI_WEB_HTTP_PORT:-8080}"
+prop_replace 'nifi.web.http.host'               "${NIFI_WEB_HTTP_HOST:-$HOSTNAME}"
+prop_replace 'nifi.remote.input.host'           "${NIFI_REMOTE_INPUT_HOST:-$HOSTNAME}"
+prop_replace 'nifi.remote.input.socket.port'    "${NIFI_REMOTE_INPUT_SOCKET_PORT:-10000}"
 prop_replace 'nifi.remote.input.secure'         'false'
 
 # Check if we are secured or unsecured