Skip to content

Commit

Permalink
make repository-s3 plugin installation default (#79)
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Singh <[email protected]>
(cherry picked from commit b9665a6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Jul 22, 2024
1 parent 1ad73d4 commit 2a4192d
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions lib/infra/infra-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,24 +465,28 @@ export class InfraStack extends Stack {
cwd: '/home/ec2-user',
ignoreErrors: false,
}));
cfnInitConfig.push(InitCommand.shellCommand('set -ex;cd opensearch;sudo -u ec2-user bin/opensearch-plugin install repository-s3 --batch', {
cwd: '/home/ec2-user',
ignoreErrors: false,
}));
} else {
cfnInitConfig.push(InitCommand.shellCommand('set -ex;cd opensearch; echo "y"|sudo -u ec2-user bin/opensearch-plugin install '
+ `https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${props.opensearchVersion}/latest/linux/${props.cpuArch}`
+ `/tar/builds/opensearch/core-plugins/discovery-ec2-${props.opensearchVersion}.zip --batch`, {
cwd: '/home/ec2-user',
ignoreErrors: false,
}));
cfnInitConfig.push(InitCommand.shellCommand('set -ex;cd opensearch;sudo -u ec2-user bin/opensearch-plugin install '
}
}

if (props.distributionUrl.includes('artifacts.opensearch.org') && !props.minDistribution) {
cfnInitConfig.push(InitCommand.shellCommand('set -ex;cd opensearch;sudo -u ec2-user bin/opensearch-plugin install repository-s3 --batch', {
cwd: '/home/ec2-user',
ignoreErrors: false,
}));
} else {
cfnInitConfig.push(InitCommand.shellCommand('set -ex;cd opensearch;sudo -u ec2-user bin/opensearch-plugin install '
+ `https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${props.opensearchVersion}/latest/linux/${props.cpuArch}`
+ `/tar/builds/opensearch/core-plugins/repository-s3-${props.opensearchVersion}.zip --batch`, {
cwd: '/home/ec2-user',
ignoreErrors: false,
}));
}
cwd: '/home/ec2-user',
ignoreErrors: false,
}));
}

// add config to disable security if required
Expand Down

0 comments on commit 2a4192d

Please sign in to comment.