From 374dd9b09e133e6ba661cdeed4e1a2a1af21c137 Mon Sep 17 00:00:00 2001 From: sruti1312 Date: Mon, 18 Apr 2022 15:15:13 -0700 Subject: [PATCH] Update PA directories from plugins to root Signed-off-by: sruti1312 --- INSTALL.md | 2 +- README.md | 2 +- docker/Dockerfile | 4 +--- .../performanceanalyzer/config/PluginSettings.java | 9 ++++++++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 7eef3d170..b666b838f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -39,7 +39,7 @@ This document walks you through the process of building and deploying the RCA fr This will not currently enforce client authentication. This feature, including full support for TLS is planned for an upcoming release. - a. Open config/performance-analyzer.properties + a. Open $OPENSEARCH-HOME/config/opensearch-performance-analyzer/performance-analyzer.properties b. Modify the certificate-file-path, private-key-file-path, and https-enabled entries diff --git a/README.md b/README.md index e51d3e4a4..c377febde 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ __Metrics__: Metrics are typically served as continuous datastreams to downstrea ### Components -__Framework__: The RCA runtime operates on an `AnalysisGraph`. You can extend this class and override the `construct` method to build your own RCAs. You should specify the path to the class in the `analysis-graph-implementor` section of `config/rca.conf`. The `addLeaf` and `addAllUpstreams` helper methods are useful when you define the dependencies between nodes of the graph. +__Framework__: The RCA runtime operates on an `AnalysisGraph`. You can extend this class and override the `construct` method to build your own RCAs. You should specify the path to the class in the `analysis-graph-implementor` section of `config/opensearch-performance-analyzer/rca.conf`. The `addLeaf` and `addAllUpstreams` helper methods are useful when you define the dependencies between nodes of the graph. __Scheduler__: The scheduler invokes the `operate` method on each graph node in topological order as defined in the `AnalysisGraph`. Nodes with no dependencies can be executed in parallel. Use flow-units to share data between RCA nodes instead of shared objects to avoid data races and performance bottlenecks. diff --git a/docker/Dockerfile b/docker/Dockerfile index 350cda3b3..13296e076 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -53,8 +53,6 @@ RUN chown -R opensearch:0 . && \ RUN unzip config/performance-analyzer-rca-2.0.0.0-rc1-SNAPSHOT.zip -RUN cp -r performance-analyzer-rca/* plugins/opensearch-performance-analyzer/ -RUN chmod 755 /usr/share/opensearch/plugins/opensearch-performance-analyzer/bin/performance-analyzer-agent RUN chmod -R 755 /dev/shm ################################################################################ # Build stage 1 (the actual OpenSearch image): @@ -118,7 +116,7 @@ RUN chgrp 0 /usr/local/bin/docker-entrypoint.sh && \ chmod 0775 /usr/local/bin/docker-entrypoint.sh # Bind to all interfaces so that the docker container is accessible from the host machine -RUN sed -i "s|#webservice-bind-host =|webservice-bind-host = 0.0.0.0|g" /usr/share/opensearch/plugins/opensearch-performance-analyzer/config/performance-analyzer.properties +RUN sed -i "s|#webservice-bind-host =|webservice-bind-host = 0.0.0.0|g" /usr/share/opensearch/config/opensearch-performance-analyzer/performance-analyzer.properties EXPOSE 9200 9300 9600 9650 diff --git a/src/main/java/org/opensearch/performanceanalyzer/config/PluginSettings.java b/src/main/java/org/opensearch/performanceanalyzer/config/PluginSettings.java index 8447311ec..43dba0fdc 100644 --- a/src/main/java/org/opensearch/performanceanalyzer/config/PluginSettings.java +++ b/src/main/java/org/opensearch/performanceanalyzer/config/PluginSettings.java @@ -5,6 +5,7 @@ package org.opensearch.performanceanalyzer.config; +import static org.opensearch.performanceanalyzer.core.Util.OPENSEARCH_HOME; import com.google.common.annotations.VisibleForTesting; import java.io.File; @@ -23,7 +24,13 @@ public class PluginSettings { private static PluginSettings instance; public static final String CONFIG_FILES_PATH = "config/"; private static final String DEFAULT_CONFIG_FILE_PATH = - Util.PLUGIN_LOCATION + "config/performance-analyzer.properties"; + OPENSEARCH_HOME + + File.separator + + "config" + + File.separator + + "opensearch-performance-analyzer" + + File.separator + + "performance-analyzer.properties"; private static final String METRICS_LOCATION_KEY = "metrics-location"; private static final String METRICS_LOCATION_DEFAULT = "/dev/shm/performanceanalyzer/"; private static final String DELETION_INTERVAL_KEY = "metrics-deletion-interval";