-
Notifications
You must be signed in to change notification settings - Fork 58
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
Updated Developer Guide #16
Merged
saratvemulapalli
merged 6 commits into
opensearch-project:main
from
joshpalis:dev-guide
Jun 16, 2022
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
723e9f3
updated developer guide
joshpalis 32d3404
added more larification on how to run both the SDK and OpenSearch tog…
joshpalis c93ba19
resolved PR comments
joshpalis 3e8d9d6
renaming extensions to OpenSearch SDK
joshpalis e38d470
added additional step to run gradle check
joshpalis b95ef4c
added additional comments o running opensearch on a seperate terminal…
joshpalis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,10 @@ | |
# OpenSearch SDK Developer Guide | ||
- [Introduction](#introduction) | ||
- [Getting Started](#getting-started) | ||
- [Git Clone IndependentPlugin Repo](#git-clone-independentplugin-repo) | ||
- [Run Independent Plugin](#run-independent-plugin) | ||
- [Git Clone OpenSearch-SDK Repo](#git-clone-OpenSearch-SDK-repo) | ||
- [Git Clone OpenSearch Repo](#git-clone-opensearch-repo) | ||
- [Publish OpenSearch Feature/Extensions branch to Maven local](#publish-opensearch-feature/extensions-branch-to-maven-local) | ||
- [Run OpenSearch-SDK](#run-opensearch-sdk) | ||
- [Run Tests](#run-tests) | ||
- [Send Message using Telnet](#send-message-using-telnet) | ||
|
||
|
@@ -14,12 +16,24 @@ Read more about extensibility [here](https://github.com/opensearch-project/OpenS | |
|
||
## Getting Started | ||
|
||
### Git Clone IndependentPlugin Repo | ||
Fork [IndependentPlugin](https://github.com/owaiskazi19/IndependentPlugin) and clone locally, e.g. `git clone https://github.com/[your username]/IndependentPlugin.git`. | ||
### Git Clone OpenSearch SDK Repo | ||
Fork [OpenSearch SDK](https://github.com/opensearch-project/opensearch-sdk) and clone locally, e.g. `git clone https://github.com/[your username]/opensearch-sdk.git`. | ||
|
||
### Run Independent Plugin | ||
### Git Clone OpenSearch Repo | ||
Fork [OpenSearch](https://github.com/opensearch-project/OpenSearch) and clone locally, e.g. `git clone https://github.com/[your username]/OpenSearch.git`. | ||
|
||
Run main script using `gradlew run`. | ||
## Publish OpenSearch feature/extensions Branch to Maven local | ||
The work done to support the extensions framework is located on the `feature/extensions` branch of the OpenSearch project. It is necessary to publish the dependencies of this branch to your local maven repository prior to running the OpenSearch SDK on a seperate process. | ||
|
||
- First navigate to the directory that OpenSearch has been cloned to | ||
- Checkout the correct branch, e.g. `git checkout feature/extensions`. | ||
- Run `./gradlew publishToMavenLocal`. | ||
|
||
It is necessary to publish dependencies to a local maven repository until this branch is merged to `main`, at which point all dependencies will be published to Maven central. | ||
|
||
### Run OpenSearch SDK | ||
|
||
Navigate to the directory that OpenSearch-SDK has been cloned to and run main script using `./gradlew run`. | ||
|
||
``` | ||
./gradlew run | ||
|
@@ -37,6 +51,9 @@ Bound addresses will then be logged to the terminal : | |
[main] INFO transportservice.TransportService - profile [test]: publish_address {127.0.0.1:5555}, bound_addresses {[::1]:5555}, {127.0.0.1:5555} | ||
``` | ||
|
||
Once the bound addresses are logged to the terminal, navigate to the directory that OpenSearch has been cloned to and start OpenSearch feature/extensions branch using `./gradlew run`. | ||
It is important that the OpenSearch SDK is already up and running prior to starting OpenSearch, since extension discovery occurs only if the OpenSearch SDK is already listening on a pre-defined port. Once discovery is complete and the data transfer connection between both nodes has been established, OpenSearch and the OpenSearch SDK will now be able to comminicate. | ||
|
||
### Run Tests | ||
|
||
Run tests : | ||
|
@@ -46,7 +63,7 @@ Run tests : | |
|
||
### Send Message using Telnet | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of telnet should we mention about running OpenSearch in another terminal as this was written before the connection was established? |
||
|
||
To send a message, first run the IndependentPlugin : | ||
To send a message, first run the OpenSearch-SDK : | ||
|
||
``` | ||
./gradlew run | ||
|
@@ -61,7 +78,7 @@ Trying 127.0.0.1... | |
Connected to localhost. | ||
Escape character is '^]'. | ||
``` | ||
The original terminal used to run the independent plugin will log the connection request : | ||
The original terminal used to run the OpenSearch-SDK will log the connection request : | ||
``` | ||
[opensearch[NettySizeHeaderFrameDecoderTests][transport_worker][T#5]] TRACE transportservice.TcpTransport - Tcp transport channel accepted: Netty4TcpChannel{localAddress=/127.0.0.1:5555, remoteAddress=/127.0.0.1:57302} | ||
[opensearch[NettySizeHeaderFrameDecoderTests][transport_worker][T#5]] TRACE transportservice.netty4.OpenSearchLoggingHandler - [id: 0x8c1cc239, L:/127.0.0.1:5555 - R:/127.0.0.1:57302] REGISTERED | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The next step should be run
./gradlew check
to make sure the build is successful