Skip to content

Add a Docker quickstart script for demo / test - #25

Merged
msfroh merged 3 commits into
opensearch-project:mainfrom
msfroh:quickstart-script
Nov 23, 2022
Merged

Add a Docker quickstart script for demo / test#25
msfroh merged 3 commits into
opensearch-project:mainfrom
msfroh:quickstart-script

Conversation

@msfroh

@msfroh msfroh commented Nov 11, 2022

Copy link
Copy Markdown
Collaborator

Adding a Bash script to simplify setting up and launching local Docker containers with OpenSearch (with this plugin installed) and OpenSearch Dashboards, with the plugin configured to connect to Kendra ranking service.

Signed-off-by: Michael Froh froh@amazon.com

Description

Bash script does the following:

  1. Create a Dockerfile that uses the OpenSearch 2.4.0 base image and installs this plugin.
  2. If AWS credentials are found in the specified AWS profile, the current environment, or the default profile, then they get "pushed" into the OpenSearch keystore in the Docker image.
  3. If requested, create a Kendra Intelligent Ranking rescore execution plan and wait for it to become active.
  4. Build the Docker image from Dockerfile and tag it (as opensearch-with-ranking-plugin).
  5. Create a docker-compose.yml that launches two nodes:
    1. OpenSearch based on the image we just built, with config settings pointing to a Kendra Ranking rescore execution plan.
    2. OpenSearch-Dashboards 2.4.0
  6. Run docker-compose up to bring up both nodes.

NOTE: I have tested this on a couple of hosts (running Linux and Mac OS) with temporary and long-lived AWS credentials. I still need to test it on an EC2 instance using instance profile credentials.

Issues Resolved

N/A

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed as 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.

Comment thread helpers/search_processing_kendra_quickstart.sh Outdated
Comment thread helpers/search_processing_kendra_quickstart.sh Outdated
Comment thread helpers/search_processing_kendra_quickstart.sh Outdated
@msfroh
msfroh force-pushed the quickstart-script branch 6 times, most recently from 038a3ef to b82691d Compare November 15, 2022 05:06
Comment thread helpers/search_processing_kendra_quickstart.sh Outdated
Comment thread helpers/search_processing_kendra_quickstart.sh Outdated
@rstrahan

rstrahan commented Nov 17, 2022 via email

Copy link
Copy Markdown

@msfroh
msfroh force-pushed the quickstart-script branch 3 times, most recently from 01d2a4f to da51964 Compare November 17, 2022 09:50
Comment thread helpers/search_processing_kendra_quickstart.sh Outdated
Comment thread helpers/search_processing_kendra_quickstart.sh
@msfroh
msfroh marked this pull request as ready for review November 18, 2022 01:36
@msfroh
msfroh requested a review from a team November 18, 2022 01:36
@msfroh
msfroh marked this pull request as draft November 18, 2022 01:37
@msfroh

msfroh commented Nov 18, 2022

Copy link
Copy Markdown
Collaborator Author

Oops -- I marked this as "ready for review", but I want to hold off until we have a released plugin zip. The default plugin zip location is still a 404.

@msfroh
msfroh force-pushed the quickstart-script branch 3 times, most recently from 22ccbb1 to 59b0a21 Compare November 22, 2022 01:44
@codecov-commenter

codecov-commenter commented Nov 22, 2022

Copy link
Copy Markdown

Codecov Report

Merging #25 (6875000) into main (4b352d0) will increase coverage by 19.85%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##               main      #25       +/-   ##
=============================================
+ Coverage     40.58%   60.43%   +19.85%     
- Complexity       92      155       +63     
=============================================
  Files            27       29        +2     
  Lines           722      867      +145     
  Branches         98      119       +21     
=============================================
+ Hits            293      524      +231     
+ Misses          404      304      -100     
- Partials         25       39       +14     
Impacted Files Coverage Δ
...tranking/preprocess/SlidingWindowTextSplitter.java
...nking/model/KendraIntelligentRankingException.java 0.00% <0.00%> (ø)
...ntelligentranking/preprocess/SentenceSplitter.java 100.00% <0.00%> (ø)
...ntelligentranking/preprocess/PassageGenerator.java 96.00% <0.00%> (ø)
...raintelligentranking/preprocess/TextTokenizer.java 93.18% <0.00%> (+5.68%) ⬆️
...uration/KendraIntelligentRankingConfiguration.java 34.34% <0.00%> (+9.05%) ⬆️
...rch/relevance/actionfilter/SearchActionFilter.java 81.03% <0.00%> (+9.88%) ⬆️
...r/kendraintelligentranking/model/dto/Document.java 36.36% <0.00%> (+36.36%) ⬆️
...raintelligentranking/model/dto/RescoreRequest.java 50.00% <0.00%> (+50.00%) ⬆️
...draintelligentranking/model/dto/RescoreResult.java 57.14% <0.00%> (+57.14%) ⬆️
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Adding a Bash script to simplify setting up and launching local Docker
containers with OpenSearch (with this plugin installed) and OpenSearch
Dashboards, with the plugin configured to connect to Kendra ranking
service.

Signed-off-by: Michael Froh <froh@amazon.com>
Previously, between runs of the script, any indexed data would be lost.
With this change, users can (optionally) mount a persistent volume to
hold the search index, so it can be reused by future containers.

Signed-off-by: Michael Froh <froh@amazon.com>
Signed-off-by: Michael Froh <froh@amazon.com>
@msfroh
msfroh marked this pull request as ready for review November 23, 2022 21:25

@macohen macohen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should plan to deprecate this after the 2.5 release is out and replace it with instructions for plugin installation.

@msfroh
msfroh merged commit b069fc9 into opensearch-project:main Nov 23, 2022
@noCharger noCharger added the backport 2.x Backport to 2.x branch label Dec 21, 2022
opensearch-trigger-bot Bot pushed a commit that referenced this pull request Dec 21, 2022
@mingshl mingshl added the feature introduce a net new unit of functionality of a software system that satisfies a requirement label Jan 24, 2023
@noCharger noCharger mentioned this pull request Jan 26, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x Backport to 2.x branch feature introduce a net new unit of functionality of a software system that satisfies a requirement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants