Skip to content

Commit

Permalink
Add missing PA configuration files to TAR/Docker
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
peterzhuamazon committed Jan 9, 2023
1 parent f8badd4 commit 2c6e200
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ function setupSecurityPlugin {
function setupPerformanceAnalyzerPlugin {
PERFORMANCE_ANALYZER_PLUGIN="opensearch-performance-analyzer"
if [ -d "$OPENSEARCH_HOME/plugins/$PERFORMANCE_ANALYZER_PLUGIN" ]; then

echo 'true' > $OPENSEARCH_HOME/data/rca_enabled.conf
echo 'true' > $OPENSEARCH_PATH_CONF/performance_analyzer_enabled.conf
echo 'true' > $OPENSEARCH_PATH_CONF/rca_enabled.conf

if [ "$DISABLE_PERFORMANCE_ANALYZER_AGENT_CLI" = "true" ]; then
echo "Disabling execution of $OPENSEARCH_HOME/bin/$PERFORMANCE_ANALYZER_PLUGIN/performance-analyzer-agent-cli for OpenSearch Performance Analyzer Plugin"
else
Expand Down
11 changes: 11 additions & 0 deletions scripts/startup/tar/linux/opensearch-tar-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ OPENSEARCH_MAIN_CLASS="org.opensearch.performanceanalyzer.PerformanceAnalyzerApp
OPENSEARCH_ADDITIONAL_CLASSPATH_DIRECTORIES=plugins/opensearch-performance-analyzer \
OPENSEARCH_JAVA_OPTS=$PA_AGENT_JAVA_OPTS

# Create data directory by default
# Do nothing if the directory already exists
if [ -d "$OPENSEARCH_HOME/data" ]; then
mkdir -p $OPENSEARCH_HOME/data
fi

# Performance Analyzer Configs
echo 'true' > $OPENSEARCH_HOME/data/rca_enabled.conf
echo 'true' > $OPENSEARCH_PATH_CONF/performance_analyzer_enabled.conf
echo 'true' > $OPENSEARCH_PATH_CONF/rca_enabled.conf

if ! grep -q '## OpenSearch Performance Analyzer' $OPENSEARCH_PATH_CONF/jvm.options; then
CLK_TCK=`/usr/bin/getconf CLK_TCK`
echo >> $OPENSEARCH_PATH_CONF/jvm.options
Expand Down

0 comments on commit 2c6e200

Please sign in to comment.