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

Add E2E AWS Integration Testing Script #462

Merged
merged 10 commits into from
Dec 14, 2023

Conversation

lewijacn
Copy link
Collaborator

@lewijacn lewijacn commented Dec 1, 2023

Description

This change adds a bash script for setting up a full E2E AWS setup including a source cluster running ES 7.10 on EC2 nodes as well as our migration solution and target cluster on OS 2.X. This will be useful for our integration tests to run and set up the needed environment for testing, but can also be utilized by developers to deploy this E2E setup in their own configured AWS account by simply running the script.

Issues Resolved

N/A

Testing

Manual deployment testing

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.

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (17d1555) 73.55% compared to head (7424f1f) 73.55%.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #462   +/-   ##
=========================================
  Coverage     73.55%   73.55%           
  Complexity     1182     1182           
=========================================
  Files           124      124           
  Lines          4886     4886           
  Branches        439      439           
=========================================
  Hits           3594     3594           
  Misses          998      998           
  Partials        294      294           
Flag Coverage Δ
unittests 73.55% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lewijacn lewijacn marked this pull request as ready for review December 6, 2023 15:35
Copy link
Contributor

@okhasawn okhasawn left a comment

Choose a reason for hiding this comment

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

Left a few comments but LGTM overall! Thanks for creating this!

}
EOM

git clone https://github.com/lewijacn/opensearch-cluster-cdk.git || echo "Repo already exists, skipping.."
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing we're going to eventually change the location of the cdk code here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure what our future plan will be around this, as I don't think it makes sense to have an official repo for it right now but would like to have it linked to the team somehow. For now I have gone ahead and given team members collaborator access to this repo to make changes as needed


cdk_context=$(echo "${cdk_context/<VPC_ID>/$vpc_id}")
cdk_context=$(echo "${cdk_context/<SOURCE_CLUSTER_ENDPOINT>/http://${source_endpoint}}")
cdk_context=$(echo $cdk_context | jq '@json')
Copy link
Contributor

Choose a reason for hiding this comment

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

Is jqguaranteed to be installed or should it be listed as a dependency?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This script takes on all the dependencies of our solution (and additionally jq). Have added a disclaimer to the top of the file mentioning this

test/awsE2ESolutionSetup.sh Show resolved Hide resolved
Comment on lines +5 to +6
git_http_url=$1
branch=$2
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you update the usage of these variables within this file to be double quoted please?

e.g on line 14: git remote add -f origin "$git_http_url"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Have updated now

@lewijacn lewijacn merged commit d83515d into opensearch-project:main Dec 14, 2023
7 checks passed
@lewijacn lewijacn deleted the aws-integ-test branch March 29, 2024 17:19
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