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

METRON-1137: Build RPM for Metron MaaS as a part of rpm-docker packaging #719

Closed
wants to merge 1 commit into from

Conversation

anandsubbu
Copy link
Contributor

Contributor Comments

Fixed metron.spec and the pom.xml to now copy and generate metron-maas-service RPM.

Testing Steps

  1. Go to folder metron-deployment/packaging/docker/rpm-docker
  2. Run mvn clean package -Pbuild-rpms
  3. Once the command completes, go to metron-deployment/packaging/docker/rpm-docker/RPMS/noarch and the metron-maas-service RPM should be present.

Testing Done

  • Verified testing steps above are working fine.
  • Copied metron-maas-service RPM on an openstack cluster and validated that install is going through fine.
  • Validated installed RPM contents as follows:
[root@metron-12 ~]# rpm -ql metron-maas-0.4.1-201708290906
/usr/metron
/usr/metron/0.4.1
/usr/metron/0.4.1/bin
/usr/metron/0.4.1/bin/maas_deploy.sh
/usr/metron/0.4.1/bin/maas_service.sh
/usr/metron/0.4.1/lib/metron-maas-service-0.4.1-uber.jar

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 to reproduce the behavior or problem that is being changed or addressed?

  • 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 
    
  • [NA] Have you written or updated unit tests and or integration 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?

  • 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.

@nickwallen
Copy link
Contributor

+1

I launched Full Dev, built the RPMs and then installed the MaaS RPM on Full Dev. The contents of the RPM matched what @anandsubbu documented. I then started MaaS to make sure everything worked.

It took me a good bit of trial-and-error just to get MaaS running. This isn't reflective of this PR, just the state of our docs. Apparently, MaaS wants a directory /user/metron/MaaS/ in HDFS. I don't see that documented in the README. But after a bit, I seemingly got the service running.

[metron@node1 0.4.1]$ ./bin/maas_service.sh -zq node1:2181
17/08/30 19:35:57 INFO impl.TimelineClientImpl: Timeline service address: http://node1:8188/ws/v1/timeline/
17/08/30 19:35:57 INFO service.Client: Initializing Client
17/08/30 19:35:57 INFO service.Client: Running Client
17/08/30 19:35:57 INFO client.RMProxy: Connecting to ResourceManager at node1/127.0.0.1:8050
17/08/30 19:35:57 INFO client.AHSProxy: Connecting to Application History server at node1/127.0.0.1:10200
17/08/30 19:35:58 INFO service.Client: Got Cluster metric info from ASM, numNodeManagers=1
17/08/30 19:35:58 INFO service.Client: Got Cluster node info from ASM
17/08/30 19:35:58 INFO service.Client: Got node report from ASM for, nodeId=node1:45454, nodeAddressnode1:8042, nodeRackName/default-rack, nodeNumContainers0
17/08/30 19:35:58 INFO service.Client: Queue info, queueName=default, queueCurrentCapacity=0.0, queueMaxCapacity=1.0, queueApplicationCount=0, queueChildQueueCount=0
17/08/30 19:35:58 INFO service.Client: User ACL Info for Queue, queueName=root, userAcl=SUBMIT_APPLICATIONS
17/08/30 19:35:58 INFO service.Client: User ACL Info for Queue, queueName=root, userAcl=ADMINISTER_QUEUE
17/08/30 19:35:58 INFO service.Client: User ACL Info for Queue, queueName=default, userAcl=SUBMIT_APPLICATIONS
17/08/30 19:35:58 INFO service.Client: User ACL Info for Queue, queueName=default, userAcl=ADMINISTER_QUEUE
17/08/30 19:35:58 INFO service.Client: Max mem capabililty of resources in this cluster 4096
17/08/30 19:35:58 INFO service.Client: Max virtual cores capabililty of resources in this cluster 8
17/08/30 19:35:58 INFO service.Client: Copy App Master jar from local filesystem and add to local environment
17/08/30 19:35:58 INFO service.Client: Set the environment for the application master
17/08/30 19:35:58 INFO service.Client: Setting up app master command
17/08/30 19:35:58 INFO service.Client: Completed setting up app master command {{JAVA_HOME}}/bin/java -Xmx10m org.apache.metron.maas.service.ApplicationMaster -zq node1:2181 -zr /metron/maas/config -aj hdfs://node1:8020/user/metron/MaaS/application_1504120714845_0005/AppMaster.jar 1><LOG_DIR>/AppMaster.stdout 2><LOG_DIR>/AppMaster.stderr
17/08/30 19:35:58 INFO service.Client: Submitting application to ASM
17/08/30 19:35:59 INFO impl.YarnClientImpl: Submitted application application_1504120714845_0005
17/08/30 19:36:00 INFO service.Client: Got application report from ASM for, appId=5, clientToAMToken=null, appDiagnostics=AM container is launched, waiting for AM container to Register with RM, appMasterHost=N/A, appQueue=default, appMasterRpcPort=-1, appStartTime=1504121758836, yarnAppState=ACCEPTED, distributedFinalState=UNDEFINED, appTrackingUrl=http://node1:8088/proxy/application_1504120714845_0005/, appUser=metron
17/08/30 19:36:01 INFO service.Client: Got application report from ASM for, appId=5, clientToAMToken=null, appDiagnostics=AM container is launched, waiting for AM container to Register with RM, appMasterHost=N/A, appQueue=default, appMasterRpcPort=-1, appStartTime=1504121758836, yarnAppState=ACCEPTED, distributedFinalState=UNDEFINED, appTrackingUrl=http://node1:8088/proxy/application_1504120714845_0005/, appUser=metron
17/08/30 19:36:02 INFO service.Client: Got application report from ASM for, appId=5, clientToAMToken=null, appDiagnostics=AM container is launched, waiting for AM container to Register with RM, appMasterHost=N/A, appQueue=default, appMasterRpcPort=-1, appStartTime=1504121758836, yarnAppState=ACCEPTED, distributedFinalState=UNDEFINED, appTrackingUrl=http://node1:8088/proxy/application_1504120714845_0005/, appUser=metron
17/08/30 19:36:03 INFO service.Client: Got application report from ASM for, appId=5, clientToAMToken=null, appDiagnostics=, appMasterHost=node1/127.0.0.1, appQueue=default, appMasterRpcPort=-1, appStartTime=1504121758836, yarnAppState=RUNNING, distributedFinalState=UNDEFINED, appTrackingUrl=http://node1:8088/proxy/application_1504120714845_0005/, appUser=metron
17/08/30 19:36:03 INFO service.Client: Application is running...
17/08/30 19:36:03 INFO service.Client: Application completed successfully

@asfgit asfgit closed this in cd14cbe Aug 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants