You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Daniel Chaffelson <ch...@gmail.com> on 2018/07/19 10:13:14 UTC

Re: Change memory limits w/ Docker image

The Dockerhub image already supports passing in environment variables to
replace nifi.properties at startup, but it's a short set list.
The current list is in $projRoot/nifi/nifi-docker/dockerhub/sh/start.sh
It includes:
# Establish baseline properties
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'

This could be extended to cover other properties in nifi.properties, or
other startup files, with a small PR.

On Wed, Apr 4, 2018 at 9:49 PM Ryan H <ry...@gmail.com>
wrote:

> Hi Mike,
>
> We ran into the same thing with configuring the NiFi Docker image
> (nifi.properties, bootstrap, etc). What we did was create a wrapper startup
> script (pretty straightforward) that gives us the ability to pretty much
> fully configure the NiFi Docker image at runtime via ENV vars. You can use
> the NiFi official image as a base image and then layer in your special
> stuff to get the image to what works for you. We have had very good results
> so far with it. We now have a fully configurable image that can be run
> standalone, cluster, secure, insecure, etc; essentially how ever you
> choose. Not sure if this is helpful or not, but just wanted to share what
> we have done to work with what is available.
>
> Cheers,
>
> Ryan H
>
> On Wed, Apr 4, 2018 at 4:07 PM, Mike Thomsen <mi...@gmail.com>
> wrote:
>
>> Aamir,
>>
>> I was looking for a way to do that w/ the Docker image without injecting
>> a new bootstrap.conf. Doesn't appear to be the case yet.
>>
>> Thanks,
>>
>> Mike
>>
>> On Wed, Apr 4, 2018 at 3:38 PM, Ali, Aamir (GE Digital, consultant) <
>> aamir.ali1@ge.com> wrote:
>>
>>> You can add parameters in bootstrap.conf like this :
>>>
>>>
>>>
>>> # JVM memory settings
>>>
>>> java.arg.2=-Xms512m
>>>
>>> java.arg.3=-Xmx2048m
>>>
>>>
>>>
>>> Above I am running my local Nifi starting at 512MB and upto 2GB of
>>> memory. You need to take some care to increment the number when adding
>>> these java.arg variables in bootstraf.conf.
>>>
>>>
>>>
>>> *From:* Mike Thomsen [mailto:mikerthomsen@gmail.com]
>>> *Sent:* Wednesday, April 4, 2018 3:34 PM
>>> *To:* users@nifi.apache.org
>>> *Subject:* EXT: Change memory limits w/ Docker image
>>>
>>>
>>>
>>> Am I missing something or is there no way to update the settings in
>>> bootstrap.conf for things like Xmx and Xms?
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>> Mike
>>>
>>
>>
>