Skip to content
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 RFS Docker Compose to handle AWS Creds; fix S3Repo bug #597

Merged
merged 2 commits into from
Apr 23, 2024

Conversation

chelma
Copy link
Member

@chelma chelma commented Apr 22, 2024

Description

  • Updated the DockerCompose file for RFS to accept AWS Creds for the containers
  • Updated RFS README to explain how to leverage the new behavior
  • Fixed a bug in the S3Repo class' handling of S3 URI's (it was failing to handle passing in the bucket root path as an acceptable repo location)
  • Unit tested the S3Repo class

Issues Resolved

Done while working on https://opensearch.atlassian.net/browse/MIGRATIONS-1600

Testing

  • Ran the new unit tests (./gradlew tests)
  • Ran the RFS process from snapshot through reindexing using the docker compose setup

Check List

  • New functionality includes testing
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented
  • 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.

Signed-off-by: Chris Helma <chelma+github@amazon.com>
Signed-off-by: Chris Helma <chelma+github@amazon.com>
@@ -8,6 +8,9 @@ services:
environment:
- discovery.type=single-node
- path.repo=/snapshots
- AWS_ACCESS_KEY_ID=${access_key}
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there a reason you're not using the typical env var naming conventions locally? (e.g. not - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} and the corresponding change in the documentation). Not a big deal, but I'm not sure I understand the reason.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's so that you can use a different set of credentials on the host machine if you want to. I was having trouble with my host machine (mac laptop) picking up and using the creds intended for the RFS Containers, which was pretty annoying because that meant that when I ran the AWS CLI to get renewed creds for the Containers using STS, the CLI would use the expired credential set I was trying to renew! 🙃

@chelma chelma merged commit 2172aee into opensearch-project:main Apr 23, 2024
5 checks passed
@chelma chelma deleted the MIGRATIONS-1600 branch April 23, 2024 10:42
AndreKurait pushed a commit to AndreKurait/opensearch-migrations that referenced this pull request Apr 23, 2024
…earch-project#597)

* Updated RFS README for using AWS Creds in Docker Compose

Signed-off-by: Chris Helma <chelma+github@amazon.com>

* Fixed bug in S3Repo handling; added unit tests

Signed-off-by: Chris Helma <chelma+github@amazon.com>

---------

Signed-off-by: Chris Helma <chelma+github@amazon.com>
Signed-off-by: Andre Kurait <akurait@amazon.com>
mikaylathompson pushed a commit to mikaylathompson/opensearch-migrations that referenced this pull request Apr 23, 2024
…earch-project#597)

* Updated RFS README for using AWS Creds in Docker Compose

Signed-off-by: Chris Helma <chelma+github@amazon.com>

* Fixed bug in S3Repo handling; added unit tests

Signed-off-by: Chris Helma <chelma+github@amazon.com>

---------

Signed-off-by: Chris Helma <chelma+github@amazon.com>
mikaylathompson pushed a commit to mikaylathompson/opensearch-migrations that referenced this pull request Apr 23, 2024
…earch-project#597)

* Updated RFS README for using AWS Creds in Docker Compose

Signed-off-by: Chris Helma <chelma+github@amazon.com>

* Fixed bug in S3Repo handling; added unit tests

Signed-off-by: Chris Helma <chelma+github@amazon.com>

---------

Signed-off-by: Chris Helma <chelma+github@amazon.com>
Signed-off-by: Mikayla Thompson <thomika@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants