Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request opensearch-project#411 from opensearch-project/ext…
Browse files Browse the repository at this point in the history
…ract_comparator_jupiter_from_typescript

Remove references to comparator and jupyter from cdk tests
  • Loading branch information
sumobrian authored Nov 13, 2023
2 parents d52f47c + c33f1f9 commit bce4aed
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ export interface TrafficReplayerProps extends StackPropsExt {
readonly addOnMigrationId?: string,
readonly customTargetEndpoint?: string,
readonly customKafkaGroupId?: string,
readonly extraArgs?: string,
readonly enableComparatorLink?: boolean

readonly extraArgs?: string
}

export class TrafficReplayerStack extends MigrationServiceCore {
Expand Down Expand Up @@ -101,7 +99,6 @@ export class TrafficReplayerStack extends MigrationServiceCore {
replayerCommand = replayerCommand.concat(` --auth-header-user-and-secret ${osUserAndSecret}`)
}
replayerCommand = props.extraArgs ? replayerCommand.concat(` ${props.extraArgs}`) : replayerCommand
replayerCommand = props.enableComparatorLink ? replayerCommand.concat(" | nc traffic-comparator 9220") : replayerCommand
this.createService({
serviceName: `traffic-replayer-${deployId}`,
dockerFilePath: join(__dirname, "../../../../../", "TrafficCapture/dockerSolution/build/docker/trafficReplayer"),
Expand Down
2 changes: 0 additions & 2 deletions deployment/cdk/opensearch-service-migration/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ These tables list all CDK context configuration values a user can specify for th
| captureProxyESServiceEnabled | boolean | true | Enable deploying the given service, via a new CloudFormation stack |
| migrationConsoleServiceEnabled | boolean | true | Enable deploying the given service, via a new CloudFormation stack |
| trafficReplayerServiceEnabled | boolean | true | Enable deploying the given service, via a new CloudFormation stack |
| trafficComparatorServiceEnabled | boolean | true | Enable deploying the given service, via a new CloudFormation stack **Comparator services are in development mode and should be used with caution** |
| trafficComparatorJupyterServiceEnabled | boolean | true | Enable deploying the given service, via a new CloudFormation stack **Comparator services are in development mode and should be used with caution** |
| captureProxyServiceEnabled | boolean | true | Enable deploying the given service, via a new CloudFormation stack |
| elasticsearchServiceEnabled | boolean | true | Enable deploying the given service, via a new CloudFormation stack |
| kafkaBrokerServiceEnabled | boolean | false | Enable deploying the given service, via a new CloudFormation stack. **This stack is experimental and should only be used for development** |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import {CaptureProxyESStack} from "../lib/service-stacks/capture-proxy-es-stack"
import {CaptureProxyStack} from "../lib/service-stacks/capture-proxy-stack";
import {ElasticsearchStack} from "../lib/service-stacks/elasticsearch-stack";
import {TrafficReplayerStack} from "../lib/service-stacks/traffic-replayer-stack";
import {TrafficComparatorStack} from "../lib/service-stacks/traffic-comparator-stack";
import {TrafficComparatorJupyterStack} from "../lib/service-stacks/traffic-comparator-jupyter-stack";
import {MigrationConsoleStack} from "../lib/service-stacks/migration-console-stack";
import {KafkaBrokerStack} from "../lib/service-stacks/kafka-broker-stack";
import {KafkaZookeeperStack} from "../lib/service-stacks/kafka-zookeeper-stack";
Expand All @@ -32,16 +30,14 @@ test('Test all migration services get created when enabled', () => {
"trafficReplayerServiceEnabled": true,
"captureProxyServiceEnabled": true,
"elasticsearchServiceEnabled": true,
"trafficComparatorServiceEnabled": true,
"trafficComparatorJupyterServiceEnabled": true,
"kafkaBrokerServiceEnabled": true,
"kafkaZookeeperServiceEnabled": true
}

const stacks = createStackComposer(contextOptions)

const services = [CaptureProxyESStack, CaptureProxyStack, ElasticsearchStack, MigrationConsoleStack,
TrafficReplayerStack, TrafficComparatorStack, TrafficComparatorJupyterStack, KafkaBrokerStack, KafkaZookeeperStack]
TrafficReplayerStack, KafkaBrokerStack, KafkaZookeeperStack]
services.forEach( (stackClass) => {
const stack = stacks.stacks.filter((s) => s instanceof stackClass)[0]
const template = Template.fromStack(stack)
Expand All @@ -66,42 +62,17 @@ test('Test no migration services get deployed when disabled', () => {
"trafficReplayerServiceEnabled": false,
"captureProxyServiceEnabled": false,
"elasticsearchServiceEnabled": false,
"trafficComparatorServiceEnabled": false,
"trafficComparatorJupyterServiceEnabled": false,
"kafkaBrokerServiceEnabled": false,
"kafkaZookeeperServiceEnabled": false
}

const stacks = createStackComposer(contextOptions)

const services = [CaptureProxyESStack, CaptureProxyStack, ElasticsearchStack, MigrationConsoleStack,
TrafficReplayerStack, TrafficComparatorStack, TrafficComparatorJupyterStack, KafkaBrokerStack, KafkaZookeeperStack]
TrafficReplayerStack, KafkaBrokerStack, KafkaZookeeperStack]
services.forEach( (stackClass) => {
const stack = stacks.stacks.filter((s) => s instanceof stackClass)[0]
expect(stack).toBeUndefined()
})

})

test('Test jupyter service does not get deployed if traffic comparator is not enabled', () => {

const contextOptions = {
"stage": "test",
"engineVersion": "OS_2.9",
"domainName": "unit-test-opensearch-cluster",
"dataNodeCount": 2,
"availabilityZoneCount": 2,
"openAccessPolicyEnabled": true,
"domainRemovalPolicy": "DESTROY",
"vpcEnabled": true,
"migrationAssistanceEnabled": true,
"trafficComparatorServiceEnabled": false,
"trafficComparatorJupyterServiceEnabled": true
}

const stacks = createStackComposer(contextOptions)

const stack = stacks.stacks.filter((s) => s instanceof TrafficComparatorJupyterStack)[0]
expect(stack).toBeUndefined()

})

0 comments on commit bce4aed

Please sign in to comment.