-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #284 from lewijacn/add-endpoint-to-console
Align Capture Proxy naming and Improve Migration Console UX (cherry picked from commit f31a65c)
- Loading branch information
Showing
8 changed files
with
111 additions
and
26 deletions.
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
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
73 changes: 73 additions & 0 deletions
73
TrafficCapture/dockerSolution/src/main/docker/migrationConsole/catIndices.sh
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/bin/bash | ||
|
||
# Default values | ||
source_endpoint="https://capture-proxy-es:9200" | ||
source_auth_user_and_pass="admin:admin" | ||
source_no_auth=false | ||
target_no_auth=false | ||
|
||
# Check for the presence of COPILOT_SERVICE_NAME environment variable | ||
if [ -n "$COPILOT_SERVICE_NAME" ]; then | ||
target_endpoint="https://${MIGRATION_DOMAIN_ENDPOINT}:443" | ||
target_auth_user_and_pass="admin:Admin123!" | ||
else | ||
target_endpoint="https://opensearchtarget:9200" | ||
target_auth_user_and_pass="admin:admin" | ||
fi | ||
|
||
# Override default values with optional command-line arguments | ||
while [[ $# -gt 0 ]]; do | ||
key="$1" | ||
case $key in | ||
--target_endpoint) | ||
target_endpoint="$2" | ||
shift | ||
shift | ||
;; | ||
--target_auth_user_and_pass) | ||
target_auth_user_and_pass="$2" | ||
shift | ||
shift | ||
;; | ||
--target_no_auth) | ||
target_no_auth=true | ||
shift | ||
;; | ||
--source_endpoint) | ||
source_endpoint="$2" | ||
shift | ||
shift | ||
;; | ||
--source_auth_user_and_pass) | ||
source_auth_user_and_pass="$2" | ||
shift | ||
shift | ||
;; | ||
--source_no_auth) | ||
source_no_auth=true | ||
shift | ||
;; | ||
*) | ||
shift | ||
;; | ||
esac | ||
done | ||
|
||
source_auth_string="-u $source_auth_user_and_pass" | ||
target_auth_string="-u $target_auth_user_and_pass" | ||
|
||
if [ "$source_no_auth" = true ]; then | ||
source_auth_string="" | ||
fi | ||
if [ "$target_no_auth" = true ]; then | ||
target_auth_string="" | ||
fi | ||
|
||
echo "SOURCE CLUSTER" | ||
echo "curl $source_endpoint/_cat/indices?v" | ||
curl $source_endpoint/_cat/indices?v --insecure $source_auth_string | ||
echo "" | ||
echo "TARGET CLUSTER" | ||
echo "curl $target_endpoint/_cat/indices?v" | ||
curl $target_endpoint/_cat/indices?v --insecure $target_auth_string | ||
echo "" |
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
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
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
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
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