-
Notifications
You must be signed in to change notification settings - Fork 30
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
Make RFS runnable as Container #550
Conversation
…o RFS app Signed-off-by: Tanner Lewis <[email protected]>
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.
Can you please add a section to the README explaining how to use the new Docker functionality, hit the source/target clusters, and launch RFS?
@Parameter(names = {"--index-template-whitelist"}, description = "List of index template names to migrate (e.g. 'posts_index_template1, posts_index_template2')", required = false) | ||
public List<String> indexTemplateWhitelist; | ||
|
||
@Parameter(names = {"--component-template-whitelist"}, description = "List of component template names to migrate (e.g. 'posts_template1, posts_template2')", required = false) | ||
public List<String> componentTemplateWhitelist; |
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.
Hmmm, this is actually more potentially confusing than I thought originally. Per our convo, before ES 7.8, there was only templates
, so if you use the script to migrate a 6.8 cluster you wouldn't see an appropriate option.
Would you mind changing --index-template-whitelist
to --templates-whitelist
and updating the description to indicate it refers to legacy templates for ES 6.8 and index templates for 7.10? Not a perfect fix long term, but probably enough for the moment.
TBH, this argument list is getting pretty long an gnarly. Not sure what to do about it right now, but we should think about ways to make it easier to navigate the many different use-cases it's trying to address.
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.
Ugh, we'll also want a check so that --component-templates
aren't supplied to a ES 6.8 migration.
I'm wondering if we want different wrapper scripts for different source versions, or something...
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.
Created a follow-up JIRA for this: https://opensearch.atlassian.net/browse/MIGRATIONS-1646
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.
Updated as per comment for now. Need to think about this more but having a pattern for handling different arguments for different versions could be nice
Signed-off-by: Tanner Lewis <[email protected]>
Signed-off-by: Tanner Lewis <[email protected]>
Have added, will be revisiting the docker compose part of this in my other task so it will be more solid after I do some proper testing there |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #550 +/- ##
============================================
- Coverage 76.64% 76.54% -0.10%
+ Complexity 1414 1410 -4
============================================
Files 155 155
Lines 6033 6033
Branches 543 543
============================================
- Hits 4624 4618 -6
- Misses 1044 1049 +5
- Partials 365 366 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Got it, makes sense. I'm hoping we'll be able to combine the special sauce I made for testing S3 snapshots into the docker compose setup, otherwise it probably won't be too useful 😛 |
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.
LGTM, but we'll need to combine our Docker stuff soon.
### Table of Contents (Generated) | ||
- [reindex-from-snapshot](#reindex-from-snapshot) | ||
- [How to run](#how-to-run) | ||
- [Using a local snapshot directory](#using-a-local-snapshot-directory) | ||
- [Using an existing S3 snapshot](#using-an-existing-s3-snapshot) | ||
- [Using a source cluster](#using-a-source-cluster) | ||
- [Using Docker](#using-docker) | ||
- [Handling auth](#handling-auth) | ||
- [How to set up an ES 6.8 Source Cluster w/ an attached debugger](#how-to-set-up-an-es-68-source-cluster-w-an-attached-debugger) | ||
- [How to set up an ES 7.10 Source Cluster running in Docker](#how-to-set-up-an-es-710-source-cluster-running-in-docker) | ||
- [Providing AWS permissions for S3 snapshot creation](#providing-aws-permissions-for-s3-snapshot-creation) | ||
- [Setting up the Cluster w/ some sample docs](#setting-up-the-cluster-w-some-sample-docs) | ||
- [How to set up an OS 2.11 Target Cluster](#how-to-set-up-an-os-211-target-cluster) | ||
|
||
|
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.
Thank you!
Description
This changes introduces a Dockerfile for RFS that is linked to the gradle build process such that a user can make changes to RFS code or dependencies and simply execute
./gradlew buildDockerImages
from the RFS directory and create a Docker image with the latest changes. A user could alternatively execute./gradlew composeUp
and create a docker environment with source/target/RFS containers using latest changes. Note: The gradle link is in place for docker compose but more work is needed here to limit manual steps a user needs to take to test RFS in this environment.Along with this a few command line arguments were incorporated into RFS
Issues Resolved
https://opensearch.atlassian.net/browse/MIGRATIONS-1601
Testing
Local docker testing
Check List
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.