mirror of https://github.com/apache/nifi.git
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 <jeremydyer@apache.org>
This commit is contained in:
parent
dc67bd2fdd
commit
e74c67f779
|
@ -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
|
||||
|
|
|
@ -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 |
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue