[GitHub] nifi issue #2477: NIFI-4839 Adding CLI to nifi-toolkit

2018-02-28 Thread pvillard31
Github user pvillard31 commented on the issue:

https://github.com/apache/nifi/pull/2477
  
+1. Just a remark: the version of commons-io does not need to be specified 
in the toolkit-cli pom file as it's already defined in the root pom. Will take 
care of it while merging. Thanks for the amazing job.


---


[GitHub] nifi issue #2477: NIFI-4839 Adding CLI to nifi-toolkit

2018-02-28 Thread pvillard31
Github user pvillard31 commented on the issue:

https://github.com/apache/nifi/pull/2477
  
Will have a final review today.


---


[GitHub] nifi issue #2477: NIFI-4839 Adding CLI to nifi-toolkit

2018-02-26 Thread bbende
Github user bbende commented on the issue:

https://github.com/apache/nifi/pull/2477
  
@pvillard31 since you tested this out a bit, would you be able to give a 
final review & merge? 


---


[GitHub] nifi issue #2477: NIFI-4839 Adding CLI to nifi-toolkit

2018-02-26 Thread bbende
Github user bbende commented on the issue:

https://github.com/apache/nifi/pull/2477
  
Fixed the issue with returning the appropriate exit code in standalone 
mode. An example of testing this would be running a script like the following:
```
#!/bin/sh

CMD_OUT=`./bin/cli.sh registry xyz`
STATUS_CODE=$?

if [ $STATUS_CODE -eq 0 ]; then
  echo "SUCCESS"
else
  echo "FAILURE"
fi
```
This should print FAILURE since xyz is not a valid command, editing the 
script to replace xyz with list-buckets should print SUCCESS.

Also added a security section to the README.


---


[GitHub] nifi issue #2477: NIFI-4839 Adding CLI to nifi-toolkit

2018-02-21 Thread pvillard31
Github user pvillard31 commented on the issue:

https://github.com/apache/nifi/pull/2477
  
@bbende agree with your points: we can keep things as-is for now and have a 
larger effort for documentation with follow-up JIRAs.

@aperepel  I *really* believe that online documentation provides a much 
better exposure. A lot of people I discuss with completely ignore the existence 
of the toolkit binaries. And we've a lot of interesting stuff in it.

I think that providing a mechanism with annotations in the code and 
automatic generation of the documentation can answer both the online 
documentation and the information in the command's output. That would be the 
best approach IMO.


---


[GitHub] nifi issue #2477: NIFI-4839 Adding CLI to nifi-toolkit

2018-02-21 Thread aperepel
Github user aperepel commented on the issue:

https://github.com/apache/nifi/pull/2477
  
@pvillard31 we were discussing a modular design for commands with dynamic 
discovery/loading (e.g. via Java's ServiceLoader mechanism). This is to support 
the idea that we should try to incorporate as much reference documentation as 
possible into command's output, and only add doc pages focusing on the 
workflow, typical use cases and best practices instead. My $.02


---


[GitHub] nifi issue #2477: NIFI-4839 Adding CLI to nifi-toolkit

2018-02-21 Thread bbende
Github user bbende commented on the issue:

https://github.com/apache/nifi/pull/2477
  
@pvillard31 thanks for the feedback! Regarding the docs...

Long-term I do agree that our admin guide has become quite lengthy and hard 
to find information, and we should probably spin-off a "Toolkit Guide", but I 
think this would be a bigger effort that could follow on later.

Even if we do that though, I want to avoid having a manually maintained 
list of commands and there usage. It would likely always be out of date as 
people add new commands and have no idea there is a doc somewhere else, kind of 
like if you added a processor to NiFi and had to remember to manually update 
docs somewhere else. The interactive shell should give all the help via "help", 
"help -v", and "command help". So whatever docs we write should focus more on 
scenarios/tasks that can be accomplished.

For now I would say either..
A) Leave the README and maybe add a little bit more information
B) Move the README contents to a section in the admin guide 

Then later we can figure out the Toolkit Guide idea, and could consider 
fancy things like auto-generating docs for the CLI using annotations like 
processors have :)  

Thoughts?



---


[GitHub] nifi issue #2477: NIFI-4839 Adding CLI to nifi-toolkit

2018-02-21 Thread pvillard31
Github user pvillard31 commented on the issue:

https://github.com/apache/nifi/pull/2477
  
Played a bit with the cli and it's really cool. Amazing job @bbende & 
@aperepel!

Can we consider adding an online documentation for it (in addition to the 
README)? I think @andrewmlim is working on a registry doc and it could be added 
there but it could also be a dedicated page in our docs 
(https://nifi.apache.org/docs/nifi-docs/). I think it'd make sense to have a 
"Toolkit" part with a page for each element of the toolkit package. The 
documentation for this cli would contain the exhaustive list of the commands we 
can execute and maybe some common scenarios one will certainly execute (kind of 
cheatsheet). Thoughts?


---


[GitHub] nifi issue #2477: NIFI-4839 Adding CLI to nifi-toolkit

2018-02-19 Thread fcntl
Github user fcntl commented on the issue:

https://github.com/apache/nifi/pull/2477
  
+1 this is a very useful module to automate things like Nifi integration 
with the Registry.


---