You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by MikeThomsen <gi...@git.apache.org> on 2018/06/30 00:50:46 UTC

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

GitHub user MikeThomsen opened a pull request:

    https://github.com/apache/nifi/pull/2828

    NIFI-5195 Added clustering to the docker image

    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


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

    $ git pull https://github.com/MikeThomsen/nifi NIFI-5195

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

    https://github.com/apache/nifi/pull/2828.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 #2828
    
----
commit ab5a7ea050ad603714616f56501bc6d12d14a6df
Author: Mike Thomsen <mi...@...>
Date:   2018-06-30T00:48:08Z

    NIFI-5195 Added clustering to the docker image

----


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi/pull/2828


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199488577
  
    --- Diff: nifi-docker/dockermaven/sh/start.sh ---
    @@ -26,6 +26,18 @@ prop_replace 'nifi.remote.input.host'           "${NIFI_REMOTE_INPUT_HOST:-$HOST
     prop_replace 'nifi.remote.input.socket.port'    "${NIFI_REMOTE_INPUT_SOCKET_PORT:-10000}"
     prop_replace 'nifi.remote.input.secure'         'false'
     
    +prop_replace 'nifi.cluster.is.node'                         "${NIFI_CLUSTER_IS_NODE:-false}"
    +prop_replace 'nifi.cluster.node.address'                    "${NIFI_CLUSTER_ADDRESS:-$HOSTNAME}"
    +prop_replace 'nifi.cluster.node.protocol.port'              "${NIFI_CLUSTER_NODE_PROTOCOL_PORT:-}"
    +prop_replace 'nifi.cluster.node.protocol.threads'           "${NIFI_CLUSTER_NODE_PROTOCOL_THREADS:-10}"
    +prop_replace 'nifi.cluster.node.protocol.max.threads'       "${NIFI_CLUSTER_NODE_PROTOCOL_MAX_THREADS:-50}"
    +prop_replace 'nifi.zookeeper.connect.string'                "${NIFI_ZK_CONNECT_STRING:-}"
    +prop_replace 'nifi.zookeeper.root.node'                     "${NIFI_ZK_ROOT_NODE:-/nifi}"
    +prop_replace 'nifi.cluster.flow.election.max.wait.time'     "${NIFI_ELECTION_MAX_WAIT:-5 mins}"
    +prop_replace 'nifi.cluster.flow.election.max.candidates'    "${NIFI_ELECTION_MAX_CANDIDATES:-}"
    +
    +. "${scripts_dir}/update_cluster_state_management.sh"
    --- End diff --
    
    this change is needed


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199489246
  
    --- Diff: nifi-docker/dockermaven/sh/update_cluster_state_management.sh ---
    @@ -0,0 +1,31 @@
    +#!/bin/sh -e
    +
    +#    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.
    +
    +login_providers_file=${NIFI_HOME}/conf/state-management.xml
    --- End diff --
    
    should update variable


---

[GitHub] nifi issue #2828: NIFI-5195 Added clustering to the docker image

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on the issue:

    https://github.com/apache/nifi/pull/2828
  
    @apiri can you review?


---

[GitHub] nifi issue #2828: NIFI-5195 Added clustering to the docker image

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on the issue:

    https://github.com/apache/nifi/pull/2828
  
    @pvillard31 done.


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199498859
  
    --- Diff: nifi-docker/dockerhub/sh/update_cluster_state_management.sh ---
    @@ -0,0 +1,31 @@
    +#!/bin/sh -e
    +
    +#    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.
    +
    +login_providers_file=${NIFI_HOME}/conf/state-management.xml
    --- End diff --
    
    ok, I'll fix that. RE the compose file, got one already. You want me to check it into our repo or post it in Confluence?


---

[GitHub] nifi issue #2828: NIFI-5195 Added clustering to the docker image

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on the issue:

    https://github.com/apache/nifi/pull/2828
  
    @dkhwangbo we can set up a new ticket for adding that.


---

[GitHub] nifi issue #2828: NIFI-5195 Added clustering to the docker image

Posted by pvillard31 <gi...@git.apache.org>.
Github user pvillard31 commented on the issue:

    https://github.com/apache/nifi/pull/2828
  
    Thanks @MikeThomsen - will wait for a final review from @apiri.
    Out of curiosity, any reason why to use ``bitnami/zookeeper``?


---

[GitHub] nifi issue #2828: NIFI-5195 Added clustering to the docker image

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on the issue:

    https://github.com/apache/nifi/pull/2828
  
    @pvillard31 
    
    > Out of curiosity, any reason why to use bitnami/zookeeper?
    
    Probably copy pasta from a previous docker compose file.


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199534123
  
    --- Diff: nifi-docker/dockerhub/sh/update_cluster_state_management.sh ---
    @@ -0,0 +1,31 @@
    +#!/bin/sh -e
    +
    +#    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.
    +
    +login_providers_file=${NIFI_HOME}/conf/state-management.xml
    --- End diff --
    
    @ottobackwards Only at a high level:  https://issues.apache.org/jira/browse/NIFI-4771
    
    The issue is we have a lot of duplication and slight one offs for utility type functions that are pervasive throughout.  Would be good to get a more uniform handling of such resources across all convenience images we offer as a community.


---

[GitHub] nifi issue #2828: NIFI-5195 Added clustering to the docker image

Posted by pvillard31 <gi...@git.apache.org>.
Github user pvillard31 commented on the issue:

    https://github.com/apache/nifi/pull/2828
  
    @MikeThomsen - could you rebase against master? thanks!


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199503255
  
    --- Diff: nifi-docker/dockerhub/sh/update_cluster_state_management.sh ---
    @@ -0,0 +1,31 @@
    +#!/bin/sh -e
    +
    +#    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.
    +
    +login_providers_file=${NIFI_HOME}/conf/state-management.xml
    --- End diff --
    
    I like the idea of it being in the repo so when we add new features we can have it evolve to support those as well.  Maybe we can create another folder in nifi-docker for now and place it in there?  At some point, I hope to start migrating such efforts across the ecosystem to https://github.com/apache/nifi-container but haven't had the opportunity to do so.


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199445234
  
    --- Diff: nifi-docker/dockermaven/sh/start.sh ---
    @@ -26,6 +26,18 @@ prop_replace 'nifi.remote.input.host'           "${NIFI_REMOTE_INPUT_HOST:-$HOST
     prop_replace 'nifi.remote.input.socket.port'    "${NIFI_REMOTE_INPUT_SOCKET_PORT:-10000}"
     prop_replace 'nifi.remote.input.secure'         'false'
     
    +prop_replace 'nifi.cluster.is.node'                         "${NIFI_CLUSTER_IS_NODE:-false}"
    +prop_replace 'nifi.cluster.node.address'                    "${NIFI_CLUSTER_ADDRESS:-$HOSTNAME}"
    +prop_replace 'nifi.cluster.node.protocol.port'              "${NIFI_CLUSTER_NODE_PROTOCOL_PORT:-}"
    +prop_replace 'nifi.cluster.node.protocol.threads'           "${NIFI_CLUSTER_NODE_PROTOCOL_THREADS:-10}"
    +prop_replace 'nifi.cluster.node.protocol.max.threads'       "${NIFI_CLUSTER_NODE_PROTOCOL_MAX_THREADS:-50}"
    +prop_replace 'nifi.zookeeper.connect.string'                "${NIFI_ZK_CONNECT_STRING:-}"
    +prop_replace 'nifi.zookeeper.root.node'                     "${NIFI_ZK_ROOT_NODE:-/nifi}"
    +prop_replace 'nifi.cluster.flow.election.max.wait.time'     "${NIFI_ELECTION_MAX_WAIT:-5 mins}"
    +prop_replace 'nifi.cluster.flow.election.max.candidates'    "${NIFI_ELECTION_MAX_CANDIDATES:-}"
    +
    +. "${scripts_dir}/update_cluster_state_management.sh"
    --- End diff --
    
    @ijokarumawak you built a dockerized cluster a while back. What do you think?


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by MikeThomsen <gi...@git.apache.org>.
Github user MikeThomsen commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199445555
  
    --- Diff: nifi-docker/dockermaven/sh/start.sh ---
    @@ -26,6 +26,18 @@ prop_replace 'nifi.remote.input.host'           "${NIFI_REMOTE_INPUT_HOST:-$HOST
     prop_replace 'nifi.remote.input.socket.port'    "${NIFI_REMOTE_INPUT_SOCKET_PORT:-10000}"
     prop_replace 'nifi.remote.input.secure'         'false'
     
    +prop_replace 'nifi.cluster.is.node'                         "${NIFI_CLUSTER_IS_NODE:-false}"
    +prop_replace 'nifi.cluster.node.address'                    "${NIFI_CLUSTER_ADDRESS:-$HOSTNAME}"
    +prop_replace 'nifi.cluster.node.protocol.port'              "${NIFI_CLUSTER_NODE_PROTOCOL_PORT:-}"
    +prop_replace 'nifi.cluster.node.protocol.threads'           "${NIFI_CLUSTER_NODE_PROTOCOL_THREADS:-10}"
    +prop_replace 'nifi.cluster.node.protocol.max.threads'       "${NIFI_CLUSTER_NODE_PROTOCOL_MAX_THREADS:-50}"
    +prop_replace 'nifi.zookeeper.connect.string'                "${NIFI_ZK_CONNECT_STRING:-}"
    +prop_replace 'nifi.zookeeper.root.node'                     "${NIFI_ZK_ROOT_NODE:-/nifi}"
    +prop_replace 'nifi.cluster.flow.election.max.wait.time'     "${NIFI_ELECTION_MAX_WAIT:-5 mins}"
    +prop_replace 'nifi.cluster.flow.election.max.candidates'    "${NIFI_ELECTION_MAX_CANDIDATES:-}"
    +
    +. "${scripts_dir}/update_cluster_state_management.sh"
    --- End diff --
    
    @hemantha-kumara the way I read the documentation, you have to set up the cluster state provider as well.


---

[GitHub] nifi issue #2828: NIFI-5195 Added clustering to the docker image

Posted by dkhwangbo <gi...@git.apache.org>.
Github user dkhwangbo commented on the issue:

    https://github.com/apache/nifi/pull/2828
  
    @MikeThomsen Hi. Any change is in this PR to make secured-cluster?


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199488715
  
    --- Diff: nifi-docker/dockerhub/sh/update_cluster_state_management.sh ---
    @@ -0,0 +1,31 @@
    +#!/bin/sh -e
    +
    +#    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.
    +
    +login_providers_file=${NIFI_HOME}/conf/state-management.xml
    --- End diff --
    
    should update this variable


---

[GitHub] nifi issue #2828: NIFI-5195 Added clustering to the docker image

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on the issue:

    https://github.com/apache/nifi/pull/2828
  
    hey @MikeThomsen.  thanks for tackling this.  I think I will have some time later tonight or tomorrow to scope it out.


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by hemantha-kumara <gi...@git.apache.org>.
Github user hemantha-kumara commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199443131
  
    --- Diff: nifi-docker/dockermaven/sh/start.sh ---
    @@ -26,6 +26,18 @@ prop_replace 'nifi.remote.input.host'           "${NIFI_REMOTE_INPUT_HOST:-$HOST
     prop_replace 'nifi.remote.input.socket.port'    "${NIFI_REMOTE_INPUT_SOCKET_PORT:-10000}"
     prop_replace 'nifi.remote.input.secure'         'false'
     
    +prop_replace 'nifi.cluster.is.node'                         "${NIFI_CLUSTER_IS_NODE:-false}"
    +prop_replace 'nifi.cluster.node.address'                    "${NIFI_CLUSTER_ADDRESS:-$HOSTNAME}"
    +prop_replace 'nifi.cluster.node.protocol.port'              "${NIFI_CLUSTER_NODE_PROTOCOL_PORT:-}"
    +prop_replace 'nifi.cluster.node.protocol.threads'           "${NIFI_CLUSTER_NODE_PROTOCOL_THREADS:-10}"
    +prop_replace 'nifi.cluster.node.protocol.max.threads'       "${NIFI_CLUSTER_NODE_PROTOCOL_MAX_THREADS:-50}"
    +prop_replace 'nifi.zookeeper.connect.string'                "${NIFI_ZK_CONNECT_STRING:-}"
    +prop_replace 'nifi.zookeeper.root.node'                     "${NIFI_ZK_ROOT_NODE:-/nifi}"
    +prop_replace 'nifi.cluster.flow.election.max.wait.time'     "${NIFI_ELECTION_MAX_WAIT:-5 mins}"
    +prop_replace 'nifi.cluster.flow.election.max.candidates'    "${NIFI_ELECTION_MAX_CANDIDATES:-}"
    +
    +. "${scripts_dir}/update_cluster_state_management.sh"
    --- End diff --
    
    is this really required? updating zookeeper and root node in nifi.properties is enough ! isn't it?


---

[GitHub] nifi issue #2828: NIFI-5195 Added clustering to the docker image

Posted by apiri <gi...@git.apache.org>.
Github user apiri commented on the issue:

    https://github.com/apache/nifi/pull/2828
  
    @MikeThomsen this looks good to me and will provide a nice start for folks to spin up a cluster as well as a basis for further extension.  thanks for your time and I'll merge this in.


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by ottobackwards <gi...@git.apache.org>.
Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199526577
  
    --- Diff: nifi-docker/dockerhub/sh/update_cluster_state_management.sh ---
    @@ -0,0 +1,31 @@
    +#!/bin/sh -e
    +
    +#    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.
    +
    +login_providers_file=${NIFI_HOME}/conf/state-management.xml
    --- End diff --
    
    @apiri are there any jiras entered for nifi-container?


---

[GitHub] nifi pull request #2828: NIFI-5195 Added clustering to the docker image

Posted by ottobackwards <gi...@git.apache.org>.
Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2828#discussion_r199534888
  
    --- Diff: nifi-docker/dockerhub/sh/update_cluster_state_management.sh ---
    @@ -0,0 +1,31 @@
    +#!/bin/sh -e
    +
    +#    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.
    +
    +login_providers_file=${NIFI_HOME}/conf/state-management.xml
    --- End diff --
    
    If there where jiras around what needed to be done or worked out I'm sure some people would want to work on them


---