Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PA directories from plugins to root #189

Merged
merged 1 commit into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ serverurl=/usr/share/supervisord.sock
files = /etc/supervisor/conf.d/*.conf

[program:performance_analyzer]
command=/usr/share/opensearch/plugins/opensearch-performance-analyzer/bin/performance-analyzer-agent /usr/share/opensearch
command=/usr/share/opensearch/bin/opensearch-performance-analyzer/performance-analyzer-agent /usr/share/opensearch
user=1000

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3b7af77bf18cd2e6d27ae094175304573662bbe1
8 changes: 2 additions & 6 deletions packaging/deb/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ fi

# Prepare the RCA reader process for execution
mv "$OPENSEARCH_HOME"/plugins/opensearch-performance-analyzer/performance-analyzer-rca $OPENSEARCH_HOME
if [ -f "$OPENSEARCH_HOME"/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli ]; then
mv "$OPENSEARCH_HOME"/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli "$OPENSEARCH_HOME"/bin
rm -rf "$OPENSEARCH_HOME"/bin/opensearch-performance-analyzer
fi
mkdir -p "$OPENSEARCH_HOME"/data
mkdir -p "/var/lib/opensearch"
touch "$OPENSEARCH_HOME"/data/rca_enabled.conf
Expand All @@ -29,7 +25,7 @@ if ! grep -q '## OpenSearch Performance Analyzer' /etc/opensearch/jvm.options; t
echo '## OpenSearch Performance Analyzer' >> /etc/opensearch/jvm.options
echo "-Dclk.tck=$CLK_TCK" >> /etc/opensearch/jvm.options
echo "-Djdk.attach.allowAttachSelf=true" >> /etc/opensearch/jvm.options
echo "-Djava.security.policy=file:///usr/share/opensearch/plugins/opensearch-performance-analyzer/config/opensearch_security.policy" >> /etc/opensearch/jvm.options
echo "-Djava.security.policy=file:///usr/share/opensearch/config/opensearch-performance-analyzer/opensearch_security.policy" >> /etc/opensearch/jvm.options
fi

IS_UPGRADE=false
Expand All @@ -53,7 +49,7 @@ if [ "x$IS_UPGRADE" != "xtrue" ]; then

elif command -v chkconfig >/dev/null; then
echo "### Non systemd distro. Please start and stop performance analyzer manually using the command: "
echo "sh /usr/share/opensearch/plugins/opensearch-performance-analyzer/bin/performance-analyzer-agent /usr/share/opensearch -d"
echo "sh /usr/share/opensearch/bin/opensearch-performance-analyzer/performance-analyzer-agent /usr/share/opensearch -d"
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion packaging/opensearch-performance-analyzer.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Description=OpenSearch Performance Analyzer
PartOf=opensearch.service

[Service]
ExecStart=/usr/share/opensearch/bin/performance-analyzer-agent-cli
ExecStart=/usr/share/opensearch/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli
Restart=on-failure
User=opensearch
Group=opensearch
Expand Down
2 changes: 1 addition & 1 deletion packaging/performance-analyzer-agent-cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

PA_AGENT_JAVA_OPTS="-Dlog4j.configurationFile=$OPENSEARCH_HOME/plugins/opensearch-performance-analyzer/config/log4j2.xml \
PA_AGENT_JAVA_OPTS="-Dlog4j.configurationFile=$OPENSEARCH_HOME/config/opensearch-performance-analyzer/log4j2.xml \
-Xms64M -Xmx64M -XX:+UseSerialGC -XX:CICompilerCount=1 -XX:-TieredCompilation -XX:InitialCodeCacheSize=4096 \
-XX:MaxRAM=400m"

Expand Down
8 changes: 2 additions & 6 deletions packaging/rpm/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ fi

# Prepare the RCA reader process for execution
mv "$OPENSEARCH_HOME"/plugins/opensearch-performance-analyzer/performance-analyzer-rca $OPENSEARCH_HOME
if [ -f "$OPENSEARCH_HOME"/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli ]; then
mv "$OPENSEARCH_HOME"/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli "$OPENSEARCH_HOME"/bin
rm -rf "$OPENSEARCH_HOME"/bin/opensearch-performance-analyzer
fi
mkdir -p "$OPENSEARCH_HOME"/data
mkdir -p "/var/lib/opensearch"
touch "$OPENSEARCH_HOME"/data/rca_enabled.conf
Expand All @@ -35,7 +31,7 @@ if ! grep -q '## OpenSearch Performance Analyzer' /etc/opensearch/jvm.options; t
echo '## OpenSearch Performance Analyzer' >> /etc/opensearch/jvm.options
echo "-Dclk.tck=$CLK_TCK" >> /etc/opensearch/jvm.options
echo "-Djdk.attach.allowAttachSelf=true" >> /etc/opensearch/jvm.options
echo "-Djava.security.policy=file:///usr/share/opensearch/plugins/opensearch-performance-analyzer/config/opensearch_security.policy" >> /etc/opensearch/jvm.options
echo "-Djava.security.policy=file:///usr/share/opensearch/config/opensearch-performance-analyzer/opensearch_security.policy" >> /etc/opensearch/jvm.options
fi

IS_UPGRADE=false
Expand Down Expand Up @@ -63,6 +59,6 @@ if [ "x$IS_UPGRADE" != "xtrue" ]; then

elif command -v chkconfig >/dev/null; then
echo "### Non systemd distro. Please start and stop performance analyzer manually using the command: "
echo "sh /usr/share/opensearch/plugins/opensearch-performance-analyzer/bin/performance-analyzer-agent /usr/share/opensearch -d"
echo "sh /usr/share/opensearch/bin/opensearch-performance-analyzer/performance-analyzer-agent /usr/share/opensearch -d"
fi
fi