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

METRON-1345: Update EC2 README for custom Ansible tags #859

Closed
wants to merge 4 commits into from

Conversation

mmiklavc
Copy link
Contributor

@mmiklavc mmiklavc commented Dec 6, 2017

https://issues.apache.org/jira/browse/METRON-1345

Simple improvement/correction to the EC2 README. This runs the command with the appropriate environment info and skip-tags enabled via the run.sh script instead of through ansible-playbook directly, which misses some things.

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)?

  • 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 Thanks!

@mmiklavc
Copy link
Contributor Author

mmiklavc commented Dec 8, 2017

I just found another item when going through an AWS install. We don't setup users for the REST API. From what I can tell, we do this via blueprint when we install full-dev from a setting in single_node_vm.yml

  - metron-rest-env:
      metron_spring_profiles_active: "dev"

I'm wondering if we can/should configure this same setting in small_cluster.yml, which is used by the Amazon EC2 deployment. Any thoughts on this? At the very least I think this PR should include a doc change to indicate that we aren't setting up users unless you explicitly set a profile via Ambari or create them manually as a separate task.

@nickwallen
Copy link
Contributor

Good catch @mmiklavc. Would be nice to get that added to the blueprint so it just happens.

@mmiklavc
Copy link
Contributor Author

Just a heads up, I've added the spring profile to the ec2 blueprint.

@mmiklavc
Copy link
Contributor Author

Testing
Run the EC2 deployment

cd metron-deployment/amazon-ec2
./run.sh

The dev profile should now be set for the REST API. This is the same way we spin up full dev.

@nickwallen
Copy link
Contributor

Nice. I'm glad you uncovered the issue with the REST API. Reaffirming +1

@@ -87,6 +87,8 @@ configurations:
topology.classpath: '{{ topology_classpath }}'
- kafka-broker:
log.dirs: '{{ kafka_log_dirs | default("/kafka-log") }}'
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the EC2 Readme include documentation about the dev env and what it means? Should it link to or document how to .... change from dev to 'other', or do other from the start?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just pushed a change. How's that @ottobackwards?

Copy link
Contributor

Choose a reason for hiding this comment

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

perfect, thank you @mmiklavc

@@ -126,6 +126,10 @@ To provision only subsets of the entire Metron deployment, Ansible tags can be s
./run.sh --tags="ec2,sensors"
```

### Setting REST API Profile

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we say something for people like me.. along the lines of
"Spring profiles are used for x,y,z. By default the dev profile is selected. Change the values of.... For more information on setting the profiles and their use please see ....

Copy link
Contributor

Choose a reason for hiding this comment

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

Spring profiles are documented in the REST README: https://github.com/apache/metron/tree/master/metron-interface/metron-rest#spring-profiles.

Is there something we can do to make the REST README more accessible? I feel like a lot of questions people ask are already answered there but no one ever reads it. What can we do to make it more useful? Table of contents maybe? I would be happy to take that on in a follow-up PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's what I linked to in that README change @merrimanr and @ottobackwards. I didn't want to duplicate the REST docs, but agree with Otto about having a reference there.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just linking to the other doc, without the user knowing even a little of why they need to look at it is not much better. I think my blurb is appropriate.

Copy link
Contributor

Choose a reason for hiding this comment

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

Reading that back, it seems a little stronger than I intended. Sorry. I don't think everyone following these deployment steps is necessarily going to know why they need to start tripping through readme land without some context. We have a lot of people trying deployment and having problems who are not as expert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ottobackwards I've made another round of improvements after discussing what the profiles do with @merrimanr. Hopefully this addresses your concerns reasonably in the short term. I added this item to the PR in the desire to gain some functional parity with full dev in the short term. But I think we might want to revisit how we setup the REST API, profiles, and user creation in another follow-on PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just caught your comment above @ottobackwards. No apology necessary, it was/is a perfectly reasonable request. At first I couldn't provide the doc for it because, as I thought it through, I couldn't give a concise answer. I honestly didn't have a clear picture in my mind of what all happens when setting those values. It was definitely worthwhile to cross-check the docs against the source and understand a bit more fully what those profiles are doing.

@ottobackwards
Copy link
Contributor

+1

@nickwallen
Copy link
Contributor

+1 remains here. Solid work.

@asfgit asfgit closed this in c4cee6a Dec 14, 2017
iraghumitra pushed a commit to iraghumitra/incubator-metron that referenced this pull request Feb 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants