[GitHub] metron pull request #934: METRON-1423: Ambari work to handle Solr configurat...

2018-03-01 Thread merrimanr
Github user merrimanr closed the pull request at:

https://github.com/apache/metron/pull/934


---


[GitHub] metron pull request #934: METRON-1423: Ambari work to handle Solr configurat...

2018-02-23 Thread merrimanr
Github user merrimanr commented on a diff in the pull request:

https://github.com/apache/metron/pull/934#discussion_r170365518
  
--- Diff: metron-platform/metron-solr/src/main/scripts/create_collection.sh 
---
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# 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.
+#
+METRON_VERSION=${project.version}
+METRON_HOME=/usr/metron/$METRON_VERSION
+SOLR_VERSION=6.6.2
--- End diff --

Latest commit should address this.


---


[GitHub] metron pull request #934: METRON-1423: Ambari work to handle Solr configurat...

2018-02-23 Thread merrimanr
Github user merrimanr commented on a diff in the pull request:

https://github.com/apache/metron/pull/934#discussion_r170272344
  
--- Diff: metron-platform/metron-solr/src/main/scripts/create_collection.sh 
---
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# 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.
+#
+METRON_VERSION=${project.version}
+METRON_HOME=/usr/metron/$METRON_VERSION
+SOLR_VERSION=6.6.2
--- End diff --

Good catch and I agree they should match.  I think the mistake is actually 
the maven version.  We initially explored using HDP Search (which is version 
6.6.2) but it's not quite ready yet so we went ahead with a manual approach in 
the meantime.  The thinking was this would make it easy to switch to HDP Search 
in the future.


---


[GitHub] metron pull request #934: METRON-1423: Ambari work to handle Solr configurat...

2018-02-23 Thread cestella
Github user cestella commented on a diff in the pull request:

https://github.com/apache/metron/pull/934#discussion_r170269639
  
--- Diff: metron-platform/metron-solr/src/main/scripts/create_collection.sh 
---
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# 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.
+#
+METRON_VERSION=${project.version}
+METRON_HOME=/usr/metron/$METRON_VERSION
+SOLR_VERSION=6.6.2
--- End diff --

I notice that we're depending on maven artifacts of 6.6.0 and we set the 
solr version to 6.6.2 here, is there a reason for that?  If we can align them, 
then we could replace this line with SOLR_VERSION=`${global_solr_version}`

This question applies for the rest of the shell scripts too


---


[GitHub] metron pull request #934: METRON-1423: Ambari work to handle Solr configurat...

2018-02-09 Thread merrimanr
GitHub user merrimanr opened a pull request:

https://github.com/apache/metron/pull/934

METRON-1423: Ambari work to handle Solr configuration

## Contributor Comments
This PR allows support for Metron-related Solr configuration and management 
through Ambari.  That does NOT include managing the actual Solr service.  For 
now this is done outside of Ambari.

High level changes include:

- Solr is now installed automatically in full dev, although not in a 
running state.  This implementation was inspired by the `install_solr.sh` 
script.
- Additional scripts for managing the Solr installation provided in full 
dev and installed with `install_solr.sh`.
- Exposes a single Zookeeper Solr configuration (for now) parameter through 
Ambari.
- Replaced the random access index writer class Ambari parameter with a 
random access search engine parameter that is a drop down of "Elasticsearch" 
and "Solr".  
- Replaced "Elasticsearch" with "Random Access" in all the Ambari parameter 
descriptions.
- Added the Solr schema creation to Ambari on Indexing start.  This matches 
the ES template loading implementation with the exception of exposing it 
through Service actions.

Testing instructions are as follows:
1. Spin up full dev
2. Shutdown ES and Kibana
3. Start Solr from the command line with $METRON_HOME/bin/start_solr.sh
4. Navigate to the Indexing tab in Ambari > Metron > Configs and change the 
"Random Access Search Engine" setting from "Elasticsearch" to "Solr"
5. Now you can start ingesting data into Solr in 2 ways.  After you make 
the change in Ambari it will prompt you to restart affected services.  A 
restart does not automatically create collections so you will need to do this 
outside of Ambari for bro, snort and error with 
$METRON_HOME/bin/create_collection.sh (first argument is sensor name) before 
you restart.
6. Or you can simply stop Metron Indexing and then start it.  This will 
trigger Ambari to automatically load the collections.
7. Navigate to http://node1:8983/solr/#/snort/query or 
http://node1:8983/solr/#/bro/query and hit the "Execute Search" button.  You 
should see data.

There is a lot to digest here and still more questions to answer but this 
should get us started.  Outstanding items include:

- What Solr parameters do we expose in Ambari?  All of them?
- Do we want to add Solr collection functions to Service actions?  I don't 
see a way to make this conditional on the selected search engine so both 
options would always be shown
- Need to review and add documentation
- Support for REST configuration (probably a separate PR)

## Pull Request Checklist

Thank you for submitting a contribution to Apache Metron.  
Please refer to our [Development 
Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235)
 for the complete guide to follow for contributions.  
Please refer also to our [Build Verification 
Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview)
 for complete smoke testing guides.  


In order to streamline the review of the contribution we ask you follow 
these guidelines and ask you to double check the following:

### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? If not one needs to 
be created at [Metron 
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
- [ ] Does your PR title start with METRON- where  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)?


### For code changes:
- [x] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
- [x] Have you included steps or a guide to how the change may be verified 
and tested manually?
- [x] Have you ensured that the full suite of tests and checks have been 
executed in the root metron folder via:
  ```
  mvn -q clean integration-test install && 
dev-utilities/build-utils/verify_licenses.sh 
  ```

- [ ] Have you written or updated unit tests and or integration tests to 
verify your changes?
- [x] 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)?
- [x] Have you verified the basic functionality of the build by building 
and running locally with Vagrant full-dev environment or the equivalent?

### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered by building and verifying the site-book? If not then run 
the following commands a