From 921d2e739ed3cb141a4fd18ae58260861d4d6ba6 Mon Sep 17 00:00:00 2001 From: Tanner Lewis Date: Thu, 29 Feb 2024 20:58:17 -0500 Subject: [PATCH 1/3] Minor edits for jenkins Signed-off-by: Tanner Lewis --- test/awsRunIntegTests.sh | 2 +- test/tests.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/awsRunIntegTests.sh b/test/awsRunIntegTests.sh index 09f305866..8c73e2f99 100755 --- a/test/awsRunIntegTests.sh +++ b/test/awsRunIntegTests.sh @@ -76,7 +76,7 @@ echo "Clearing non-system target indices" unbuffer aws ecs execute-command --cluster "migration-${STAGE}-ecs-cluster" --task "${task_arn}" --container "migration-console" --interactive --command "curl -XDELETE ${target_endpoint}/*,-.*" echo "Print initial source and target indices after clearing indices: " -unbuffer aws ecs execute-command --cluster "migration-${STAGE}-ecs-cluster" --task "${task_arn}" --container "migration-console" --interactive --command "./catIndices.sh --source_endpoint ${source_endpoint} --source_no_auth --target_no_auth" +unbuffer aws ecs execute-command --cluster "migration-${STAGE}-ecs-cluster" --task "${task_arn}" --container "migration-console" --interactive --command "./catIndices.sh --source-endpoint ${source_endpoint} --source-no-auth --target-no-auth" # Spin up Replayer container and wait for service to be stable aws ecs update-service --cluster "migration-${STAGE}-ecs-cluster" --service "migration-${STAGE}-traffic-replayer-default" --desired-count 1 > /dev/null 2>&1 diff --git a/test/tests.py b/test/tests.py index 8cd685c3f..b75c16229 100644 --- a/test/tests.py +++ b/test/tests.py @@ -264,7 +264,7 @@ def test_0005_invalidIncorrectUri(self): def test_0006_OSB(self): if self.deployment_type == "cloud": - cmd_exec = f"/root/runTestBenchmarks.sh --unique-id {self.unique_id} --endpoint {self.proxy_endpoint}" + cmd_exec = f"/root/runTestBenchmarks.sh --endpoint {self.proxy_endpoint}" if self.source_auth_type == "none": cmd_exec = cmd_exec + " --no-auth" elif self.source_auth_type == "basic": From 1c0f12e571cdeeec1c2a10ef29fde6be1a3ca71f Mon Sep 17 00:00:00 2001 From: Tanner Lewis Date: Thu, 29 Feb 2024 21:10:10 -0500 Subject: [PATCH 2/3] Remove unnecessary ssl flag for benchmarks Signed-off-by: Tanner Lewis --- test/tests.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/tests.py b/test/tests.py index b75c16229..303cba5e7 100644 --- a/test/tests.py +++ b/test/tests.py @@ -269,8 +269,6 @@ def test_0006_OSB(self): cmd_exec = cmd_exec + " --no-auth" elif self.source_auth_type == "basic": cmd_exec = cmd_exec + f" --auth-user {self.source_username} --auth-pass {self.source_password}" - if not self.source_verify_ssl: - cmd_exec = cmd_exec + " --no-ssl" logger.warning(f"Running local command: {cmd_exec}") subprocess.run(cmd_exec, shell=True) # TODO: Enhance our waiting logic for determining when all OSB records have been processed by Replayer From 1db7f29c7ee420ad44f4bea18250713d3271c2f2 Mon Sep 17 00:00:00 2001 From: Tanner Lewis Date: Fri, 1 Mar 2024 12:11:44 -0500 Subject: [PATCH 3/3] Domain dependency test Signed-off-by: Tanner Lewis --- .../lib/opensearch-domain-stack.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deployment/cdk/opensearch-service-migration/lib/opensearch-domain-stack.ts b/deployment/cdk/opensearch-service-migration/lib/opensearch-domain-stack.ts index bc65ebd0b..7b3ad26c9 100644 --- a/deployment/cdk/opensearch-service-migration/lib/opensearch-domain-stack.ts +++ b/deployment/cdk/opensearch-service-migration/lib/opensearch-domain-stack.ts @@ -96,21 +96,23 @@ export class OpenSearchDomainStack extends Stack { createSSMParameters(domain: Domain, endpointParameterName: string|undefined, adminUserName: string|undefined, adminUserSecret: ISecret|undefined, stage: string, deployId: string) { const endpointParameter = endpointParameterName ?? "osClusterEndpoint" - new StringParameter(this, 'SSMParameterOpenSearchEndpoint', { + const endpointSSM = new StringParameter(this, 'SSMParameterOpenSearchEndpoint', { description: 'OpenSearch migration parameter for OpenSearch endpoint', parameterName: `/migration/${stage}/${deployId}/${endpointParameter}`, stringValue: `https://${domain.domainEndpoint}:443` }); + endpointSSM.node.addDependency(domain) if (domain.masterUserPassword && !adminUserSecret) { console.log(`An OpenSearch domain fine-grained access control user was configured without an existing Secrets Manager secret, will not create SSM Parameter: /migration/${stage}/${deployId}/osUserAndSecret`) } else if (domain.masterUserPassword && adminUserSecret) { - new StringParameter(this, 'SSMParameterOpenSearchFGACUserAndSecretArn', { + const secretSSM = new StringParameter(this, 'SSMParameterOpenSearchFGACUserAndSecretArn', { description: 'OpenSearch migration parameter for OpenSearch configured fine-grained access control user and associated Secrets Manager secret ARN ', parameterName: `/migration/${stage}/${deployId}/osUserAndSecretArn`, stringValue: `${adminUserName} ${adminUserSecret.secretArn}` }); + secretSSM.node.addDependency(adminUserSecret) } } @@ -215,7 +217,6 @@ export class OpenSearchDomainStack extends Stack { zoneAwareness: zoneAwarenessConfig, removalPolicy: props.domainRemovalPolicy }); - this.createSSMParameters(domain, props.endpointParameterName, adminUserName, adminUserSecret, props.stage, deployId) }