Skip to content

Commit

Permalink
Removing profile name.
Browse files Browse the repository at this point in the history
Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
  • Loading branch information
jzonthemtn committed Dec 19, 2024
1 parent bb2519c commit 8520503
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
9 changes: 5 additions & 4 deletions osi/create-plugin-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ FILE_NAME="search-quality-evaluation-plugin-0.0.1.zip"
wget -O ${FILE_NAME} https://github.com/o19s/opensearch-search-quality-evaluation/releases/download/0.0.1/${FILE_NAME}

aws s3 cp ${FILE_NAME} s3://ubi-queries-events-sink/${FILE_NAME} \
--profile mtnfog \
--profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE \
--region us-east-1

aws opensearch create-package \
--region us-east-1 \
--profile mtnfog \
--profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE \
--package-name search-eval-framework \
--package-type ZIP-PLUGIN \
--package-source S3BucketName=ubi-queries-events-sink,S3Key=search-quality-evaluation-plugin-0.0.1.zip \
--engine-version OpenSearch_2.17

# aws opensearch describe-packages \
# --region us-east-1 \
# --profile mtnfog \
# --profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE \
# --filters '[{"Name": "PackageType","Value": ["ZIP-PLUGIN"]}, {"Name": "PackageName","Value": ["search-eval-framework"]}]'

# when done, grab the package id and put into command:
Expand All @@ -31,10 +31,11 @@ aws opensearch create-package \
# aws opensearch associate-package \
# --region us-east-1 \
# --domain-name osi-ubi-domain \
# --profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE
# --package-id ${PACKAGE_ID}


# aws opensearch list-packages-for-domain
# --domain-name osi-ubi-domain \
# --region $REGION \
# --profile mtnfog
# --profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE
5 changes: 4 additions & 1 deletion osi/delete-indexes.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/bash -e

# pip install awscurl

# Get from the Terraform output or the AWS Console
OPENSEARCH_ENDPOINT="search-osi-ubi-domain-pjju5yl7neorgz4jcsqhq5o7fq.us-east-1.es.amazonaws.com"

awscurl \
"https://${OPENSEARCH_ENDPOINT}/ubi_events,ubi_queries" \
-X DELETE \
--region us-east-1 \
--service es \
--profile mtnfog
--profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE
7 changes: 5 additions & 2 deletions osi/get-indexed-events.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#!/bin/bash -e

# pip install awscurl

# Get from the Terraform output or the AWS Console
OPENSEARCH_ENDPOINT="search-osi-ubi-domain-pjju5yl7neorgz4jcsqhq5o7fq.us-east-1.es.amazonaws.com"

awscurl \
"https://${OPENSEARCH_ENDPOINT}/_cat/indices" \
-X GET \
--region us-east-1 \
--service es \
--profile mtnfog
--profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE

awscurl \
"https://${OPENSEARCH_ENDPOINT}/ubi_events/_search" \
-X GET \
--region us-east-1 \
--service es \
--profile mtnfog | jq
--profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE | jq
7 changes: 5 additions & 2 deletions osi/get-indexed-queries.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#!/bin/bash -e

# pip install awscurl

# Get from the Terraform output or the AWS Console
OPENSEARCH_ENDPOINT="search-osi-ubi-domain-pjju5yl7neorgz4jcsqhq5o7fq.us-east-1.es.amazonaws.com"

awscurl \
"https://${OPENSEARCH_ENDPOINT}/_cat/indices" \
-X GET \
--region us-east-1 \
--service es \
--profile mtnfog
--profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE

awscurl \
"https://${OPENSEARCH_ENDPOINT}/ubi_queries/_search" \
-X GET \
--region us-east-1 \
--service es \
--profile mtnfog | jq
--profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE | jq
2 changes: 1 addition & 1 deletion osi/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ terraform {

provider "aws" {
region = "us-east-1"
profile = "mtnfog"
profile = "TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE"
}

data "aws_region" "current" {}
Expand Down
3 changes: 2 additions & 1 deletion osi/send-event.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

# pip install awscurl

# Get from the Terraform output or the AWS Console
OSIS_PIPELINE_ENDPOINT_URL="ubi-pipeline-xjmot6taz7mmcv76a36mlscgg4.us-east-1.osis.amazonaws.com"

awscurl \
--service osis \
--region us-east-1 \
--profile mtnfog \
--profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE \
-X POST \
-H "Content-Type: application/json" \
-d '[{"type": "event", "action_name": "click", "query_id": "99999999-4455-6677-8899-aabbccddeeff", "event_attributes": {"position": {"ordinal": 1}, "object": {"object_id": "1234", "object_id_field": "ean", "user_id": "abc"}}}]' \
Expand Down
3 changes: 2 additions & 1 deletion osi/send-query.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

# pip install awscurl

# Get from the Terraform output or the AWS Console
OSIS_PIPELINE_ENDPOINT_URL="ubi-pipeline-xjmot6taz7mmcv76a36mlscgg4.us-east-1.osis.amazonaws.com"

awscurl \
--service osis \
--region us-east-1 \
--profile mtnfog \
--profile TODO_PUT_YOUR_AWS_PROFILE_NAME_HERE \
-X POST \
-H "Content-Type: application/json" \
-d '[{"type": "query", "user_query": "computer", "query_id": "00112233-4455-6677-8899-aabbccddeeff"}]' \
Expand Down

0 comments on commit 8520503

Please sign in to comment.