METRON-1091 Package STELLAR shell as stand alone #690
Conversation
New archive area under packaging for things packaged as archives New stellar script that doesn't rely on having bigtop installed
077157d
to
81c0bad
Compare
+1, visual inspection + a bit of playing around (see below). Probably worth a README update to mention this exists?
Opened METRON-1107 for the DAY_OF_{YEAR,MONTH} issue, otherwise looks good to me. |
@JonZeolla Thanks for the review! Any ideas? |
Some ideas:
|
Are we packaging up the RPMs correctly to ship the stellar shell after this work has been done? Have we tried this in full-dev? |
Casey, this adds a new packaging subfolder -> archive, and generates a new artifact ( the tar.gz ). I put it in deployment / packaging as default for 2 reasons:
Both of those things are up for discussion. an RPM of the shell for RPM deployment to NON metron nodes could be a follow on. Comments from Reviewable |
I just want to make sure that we didn't break backwards compatibility and have the shell not deployed as part of the mpack, I guess ;) |
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<commons.config.version>1.10</commons.config.version> | ||
<metron_dir>${project.parent.relativePath}/..</metron_dir> | ||
</properties> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I'm not a build-and-deployment expert, but shouldn't this pom have a dependency on stellar-common? Perhaps, with or without the exclusions:
<dependency>
<groupId>org.apache.metron</groupId>
<artifactId>stellar-common</artifactId>
<classifier>uber</classifier>
<version>${project.parent.version}</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
The copy-resources could, if desired, then be replaced by usage in the assembly.xml of a dependencySet reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an expert either. I copied what that docker-rpm pom does, because it does similar resource things.
bump - any comments on this? Any ideas for deployment? can we leave for later? |
@JonZeolla I don't want to document it in the stellar-common module. At least that is what I'm thinking. So this is a metron custom deployment of the shell. I could change it to the default stand alone deployment of the shell for stellar, but I didn't think that was the right way to start out, at the time at least. We could do it as the default archive of stellar common, and then do another archive of metron stellar jars. So the usage would be: unpack shell package |
I'm going to close this and refactor |
Right, I think the disconnect is that I would envision a stellar shell with metron stellar functions added as libs, as you suggested. That's why I was thinking we would doc in stellar-common, I missed that this includes management/profiler functions. |
I have refactored this to be stellar centric. The questions about NOTICE, LIC, README for deployment still apply. |
Can you deconflict? I'd like to retest and review your questions again, but at a quick glance I think my prior suggestions stand, and for your NOTICE question, I'm not sure. |
Sorry , it has been a while, I'll try to get it set |
Hopefully it is all set @JonZeolla |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 pending a sufficient response to the NOTICE/LICENSE question and my comments
operating system. | ||
|
||
```bash | ||
metron-stellar/stellar-common/target/stellar-common-0.4.1-stand-alone.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/0\.4\.1/0.4.2/
├── bin | ||
│ └── stellar | ||
└── lib | ||
└── stellar-common-0.4.1-uber.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/0\.4\.1/0.4.2/
|
||
By default the shell will have the base Stellar Language commands available. Any jars in the lib directory | ||
that contain Stellar functions will also be loaded, and their commands will be available to shell, as long | ||
as their dependencies are satisfied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can be a little bit more explicit that, by default, not all stellar functions will work in the standalone shell. For instance, clarifying that only functions available listed in response to %functions will be included may be enough? I quickly noted that BIN, HLLP_*, STATS_*, OUTLIER_MAD_*, etc. weren't in there as profiler/management commands aren't included. Maybe we say that as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this could be more clear, but I don't think this is the PR for it. I think in general we need to either document or provide some more information through the functions on what should be included.
IE: Move the documentation so that the stellar/README only has things in stellar-common -or-
decorate which lib needs to be included with each function in the doc etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about if you just change it from:
have the base Stellar Language commands
to
have only the base Stellar Language commands
?
I'm not looking to explicitly mention what functions would not exist here, and why, but simply make it more obvious that things will be missing here by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think moving the functions OUT of stellar common, now that it is broken out is the right thing™ to do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think that it should be a little bit more explicit that some Stellar functions won't be available by default (without needing to explicitly outline which). Something like:
By default the shell is limited to only the base Stellar common language commands.
This looks reasonable to me @ottobackwards. I'm +1 pending any further work per @JonZeolla's comments. Thanks for the contribution! |
custom notice, removing things outside of stellar
@JonZeolla this should be set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 as-is, but I made some optional documentation suggestions.
|
||
By default the shell will have the base Stellar Language commands available. Any jars in the lib directory | ||
that contain Stellar functions will also be loaded, and their commands will be available to shell, as long | ||
as their dependencies are satisfied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think that it should be a little bit more explicit that some Stellar functions won't be available by default (without needing to explicitly outline which). Something like:
By default the shell is limited to only the base Stellar common language commands.
├── bin | ||
│ └── stellar | ||
└── lib | ||
└── stellar-common-0.4.2-uber.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: Update to 0.4.3
. Only mentioning because I saw you updated this in the past from 0.4.1
to 0.4.2
.
operating system. | ||
|
||
```bash | ||
metron-stellar/stellar-common/target/stellar-common-0.4.2-stand-alone.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional: Update to 0.4.3
. Only mentioning because I saw you updated this in the past from 0.4.1
to 0.4.2
.
Done, let me know if the changes are sufficient @JonZeolla |
Perfect, ty. |
This PR adds metron-deployment/packaging/archive, and the metron-stellar-shell module.This PR adds a second archive product ( ${}-stand-alone.tar.gz ) to stellar-common.
This module packages a stellar shell environment that allows running stellar on a workstation that is not a dev/build machine, nor is a cluster node.
The idea is that a metron 'admin' may want to run stellar commands on his local machine.
Remote management ( config_get etc ) and profile would be useful, but have not been included. I do not believe it is realistic for the expected user to open firewall ports or have the 'confs' setup to have these functions work as they would on a metron cluster node.
This use case would seem to require REST support of some kind. Maybe a /metron-interface/metron-rest-stellar module. Or maybe when extensions come to stellar we can just do it as an extension.
Also a problem, is that there are management functions that bring in hadoop dependencies mixed in with other functions like SHELL_EDIT() that may be useful on their own.
Testing
- take /metron-deployment/packaging/archive/metron-stellar-shell/target/metron-stellar-shell-0.4.1-archive.tar.gz and unpack it in some directorytake metron-stellar/stellar-common/target/stellar-common-0.4.1-stand-alone.tar.gz and unpack it in some directory
Questions for reviewers
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:
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:
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
: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.