Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

METRON-1309: Change metron-deployment to pull the plugin from apache/metron-bro-plugin-kafka #837

Closed
wants to merge 2 commits into from

Conversation

JonZeolla
Copy link
Member

@JonZeolla JonZeolla commented Nov 8, 2017

Contributor Comments

Based on the conversation on the mailing list, this removes the bro kafka plugin from this repo and pulls it from our new apache/metron-bro-plugin-kafka repo.

Testing

  1. Create a working directory and pull in this PR
    mkdir ~/metron-1309
    git clone https://github.com/apache/metron ~/metron-1309/metron
    cd ~/metron-1309/metron
    git remote add jonzeolla https://github.com/jonzeolla/metron
    git pull jonzeolla METRON-1309
    
  2. Modify this to remove sensors, (to spin up the real sensors).
    sed -i '' "s/ansibleSkipTags=.*/ansibleSkipTags=\'quick_dev\'/" metron-deployment/vagrant/full-dev-platform/Vagrantfile
    
  3. Spin up full-dev
    cd metron-deployment/vagrant/full-dev-platform/
    vagrant up
    
  4. Set up the environment in full-dev.
    vagrant ssh
    sudo su -
    export PATH=$PATH:/usr/local/bro/bin
    service monit stop && service sensor-stubs stop bro && broctl stop
    
  5. Monitor the bro kafka topic
    # Open a new terminal
    cd ~/metron-1309/metron/metron-deployment/vagrant/full-dev-platform
    vagrant ssh
    sudo su -
    export PATH=$PATH:/usr/local/bro/bin:/usr/hdp/current/kafka-broker/bin
    kafka-console-consumer.sh --zookeeper localhost:2181 --topic bro
    
  6. In the first terminal, run bro against some public pcaps.
    mkdir -p ~/brotmp/nitroba ~/brotmp/example-traffic
    wget https://www.bro.org/static/traces/exercise-traffic.pcap -O ~/brotmp/example-traffic/exercise-traffic.pcap
    wget http://downloads.digitalcorpora.org/corpora/network-packet-dumps/2008-nitroba/nitroba.pcap -O ~/brotmp/nitroba/nitroba.pcap
    cd ~/brotmp/example-traffic
    bro -r exercise-traffic.pcap /usr/local/bro/share/bro/site/local.bro -C
    cd ~/brotmp/nitroba
    bro -r nitroba.pcap /usr/local/bro/share/bro/site/local.bro -C
    
  7. Verify that logs are properly getting to the bro kafka topic, via the second terminal.
    • Note, that if you look in the Kibana UI for the non sensor-stub logs, you will need to change your view to be ~now-10y.

Pull Request Checklist

Thank you for submitting a contribution to Apache Metron.
Please refer to our Development Guidelines for the complete guide to follow for contributions.
Please refer also to our Build Verification Guidelines 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.
  • Does your PR title start with METRON-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)?

For code changes:

  • Have you included steps or a guide to how the change may be verified and tested manually?

  • 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 && build_utils/verify_licenses.sh 
    
  • 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 and the verify changes via site-book/target/site/index.html:

    cd site-book
    mvn site
    

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.
It is also recommended that travis-ci is set up for your personal repository such that your branches are built there before submitting a pull request.

@JonZeolla
Copy link
Member Author

This is ready for review.

# cp -r /root/metron/metron-sensors/bro-plugin-kafka /tmp
# cd /tmp/bro-plugin-kafka
# git clone https://github.com/apache/metron-bro-plugin-kafka /tmp/metron-bro-plugin-kafka
# cd /tmp/metron-bro-plugin-kafka
# rm -rf build/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no make clean?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a bad idea - I was just migrating the instructions to use the new location without changing anything else.

@ottobackwards
Copy link
Contributor

+1 Followed instructions, everything worked as expected. One question, but mostly out of curiosity

@ottobackwards
Copy link
Contributor

Great job @JonZeolla

@nickwallen
Copy link
Contributor

+1 LGTM. Thanks!

@asfgit asfgit closed this in c4c930f Nov 12, 2017
iraghumitra pushed a commit to iraghumitra/incubator-metron that referenced this pull request Nov 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants