-
Notifications
You must be signed in to change notification settings - Fork 281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates demo script to execute with bundled jdk #3777
Updates demo script to execute with bundled jdk #3777
Conversation
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
… classes and configuration Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
e6e3b89
to
2cc8ba4
Compare
…luster Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
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.
These tests look pretty brittle since they are handling output written to the console and files, I'd recommend breaking up how the parts of the tool work so you can have easier to maintain test cases.
Something to consider if the tool gets a new option, say <10 lines of code. In the tests you would only really need two new test cases (pass/fail) and no unrelated tests would break.
src/main/java/org/opensearch/security/tools/democonfig/Installer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/tools/democonfig/Installer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/tools/democonfig/Installer.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/security/tools/democonfig/CertificateGeneratorTests.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/security/tools/democonfig/InstallerTests.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
fb9768d
to
50c67bb
Compare
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
src/main/java/org/opensearch/security/tools/democonfig/Installer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/tools/democonfig/Installer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/tools/democonfig/Installer.java
Outdated
Show resolved
Hide resolved
src/test/java/org/opensearch/security/tools/democonfig/InstallerTests.java
Outdated
Show resolved
Hide resolved
Looking into windows failures now. |
…s not set Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
…demo install script Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
…demo install script Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
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.
Took another pass. Nice work getting SnakeYaml to write to opensearch.yml!
src/main/java/org/opensearch/security/tools/democonfig/Installer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/tools/democonfig/SecuritySettingsConfigurer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/tools/democonfig/SecuritySettingsConfigurer.java
Show resolved
Hide resolved
src/main/java/org/opensearch/security/tools/democonfig/SecuritySettingsConfigurer.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
Code Coverage will be enhanced in #3807 |
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
src/main/java/org/opensearch/security/tools/democonfig/Certificates.java
Show resolved
Hide resolved
src/main/java/org/opensearch/security/tools/democonfig/Installer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/security/tools/democonfig/Installer.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
36c5d8a
to
5fbfdad
Compare
Ship it 🚢 |
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
src/main/java/org/opensearch/security/tools/democonfig/SecuritySettingsConfigurer.java
Outdated
Show resolved
Hide resolved
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.
This PR LGTM.
One additional comment: Should the SecuritySettingsConfigurer get the values it needs in its constructor instead of the entire installer
object?
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
I started out with that but thought it might be better to pass just one reference |
src/main/java/org/opensearch/security/tools/democonfig/SecuritySettingsConfigurer.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
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.
Looks good to me! Thanks DC
06d8c29
into
opensearch-project:main
…t for Bundled JDK for this tool and updates DEVELOPER_GUIDE.md (#3845) ### Description Backports following commits related to demo configuration tool from main to 2.x: - [x] [17748b9](17748b9) from #3669 - [x] [4496440](4496440) from #3734 - [x] [06d8c29](06d8c29) from #3777 - [x] [e698315](e698315) from #3807 - [x] [9d11524](9d11524) from #3843 - [x] [62aed21](62aed21) from #3850 - [x] [ceabe13](ceabe13) from #3844 ### Issues Resolved - Related to #3827 ### Testing - automated tests ### Check List - [x] New functionality includes testing - [x] New functionality has been documented - [x] Commits are signed per the DCO using --signoff By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Darshit Chanpura <dchanp@amazon.com> Signed-off-by: Darshit Chanpura <35282393+DarshitChanpura@users.noreply.github.com>
Description
This PR adds changes to the tool to allow execution with bundled jdk. It also refactors usage of static variables.
It also addresses a small bug in
isStringAlreadyPresentFile
to modify from regex match to "startsWith".Tests are added as fast-follow in #3807
Check List
- [ ] New functionality includes testing<- fast-follow via #3807- [ ] New functionality has been documentedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.