Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Modify the TAR and Docker script in regard to the new path name of PA #649

Merged
merged 6 commits into from
Feb 20, 2021
1 change: 0 additions & 1 deletion .github/workflows/staging-test-tar-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
repository_dispatch:
types: [staging-test-tar-arm64]


jobs:
plugin-availability:
name: Check Plugin Availability
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ if [[ -d "/usr/share/elasticsearch/plugins/opendistro_security" && "$DISABLE_INS
/usr/share/elasticsearch/plugins/opendistro_security/tools/install_demo_configuration.sh -y -i -s
fi

if [[ -d "/usr/share/elasticsearch/plugins/opendistro_performance_analyzer" ]]; then
if [[ -d "/usr/share/elasticsearch/plugins/opendistro-performance-analyzer" ]]; then
CLK_TCK=`/usr/bin/getconf CLK_TCK`
ES_JAVA_OPTS="-Dclk.tck=$CLK_TCK -Djdk.attach.allowAttachSelf=true $ES_JAVA_OPTS"
if [[ -d "/usr/share/elasticsearch/performance-analyzer-rca" ]]; then
ES_JAVA_OPTS="-Djava.security.policy=file:///usr/share/elasticsearch/performance-analyzer-rca/pa_config/es_security.policy $ES_JAVA_OPTS"
/usr/bin/supervisord -c /usr/share/elasticsearch/performance-analyzer-rca/pa_config/supervisord.conf
else
ES_JAVA_OPTS="-Djava.security.policy=file:///usr/share/elasticsearch/plugins/opendistro_performance_analyzer/pa_config/es_security.policy $ES_JAVA_OPTS"
/usr/bin/supervisord -c /usr/share/elasticsearch/plugins/opendistro_performance_analyzer/pa_config/supervisord.conf
ES_JAVA_OPTS="-Djava.security.policy=file:///usr/share/elasticsearch/plugins/opendistro-performance-analyzer/pa_config/es_security.policy $ES_JAVA_OPTS"
/usr/bin/supervisord -c /usr/share/elasticsearch/plugins/opendistro-performance-analyzer/pa_config/supervisord.conf
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion elasticsearch/linux_distributions/opendistro-tar-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ chmod -R 755 $WORK_DIR/$rca_dir
# Move agent script directly into ES_HOME/bin
perf_analyzer=`ls -p $WORK_DIR/bin/ | grep performance`
mv $WORK_DIR/bin/$perf_analyzer/performance-analyzer-agent-cli $WORK_DIR/bin
rm -rf $WORK_DIR/bin/opendistro_performance_analyzer
rm -rf $WORK_DIR/bin/opendistro-performance-analyzer

# Make sure the data folder exists and is writable
mkdir -p $WORK_DIR/data
Expand Down
8 changes: 4 additions & 4 deletions elasticsearch/linux_distributions/opendistro-tar-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ ES_KNN_LIB_DIR=$ES_HOME/plugins/opendistro-knn/knn-lib
bash $ES_HOME/plugins/opendistro_security/tools/install_demo_configuration.sh -y -i -s

##Perf Plugin
chmod 755 $ES_HOME/plugins/opendistro_performance_analyzer/pa_bin/performance-analyzer-agent
chmod 755 $ES_HOME/plugins/opendistro-performance-analyzer/pa_bin/performance-analyzer-agent
chmod -R 755 /dev/shm
chmod 755 $ES_HOME/bin/performance-analyzer-agent-cli
echo "done security"
PA_AGENT_JAVA_OPTS="-Dlog4j.configurationFile=$ES_HOME/plugins/opendistro_performance_analyzer/pa_config/log4j2.xml \
PA_AGENT_JAVA_OPTS="-Dlog4j.configurationFile=$ES_HOME/plugins/opendistro-performance-analyzer/pa_config/log4j2.xml \
-Xms64M -Xmx64M -XX:+UseSerialGC -XX:CICompilerCount=1 -XX:-TieredCompilation -XX:InitialCodeCacheSize=4096 \
-XX:InitialBootClassLoaderMetaspaceSize=30720 -XX:MaxRAM=400m"

ES_MAIN_CLASS="com.amazon.opendistro.elasticsearch.performanceanalyzer.PerformanceAnalyzerApp" \
ES_ADDITIONAL_CLASSPATH_DIRECTORIES=plugins/opendistro_performance_analyzer \
ES_ADDITIONAL_CLASSPATH_DIRECTORIES=plugins/opendistro-performance-analyzer \
ES_JAVA_OPTS=$PA_AGENT_JAVA_OPTS

if ! grep -q '## OpenDistro Performance Analyzer' $ES_HOME/config/jvm.options; then
Expand All @@ -37,7 +37,7 @@ if ! grep -q '## OpenDistro Performance Analyzer' $ES_HOME/config/jvm.options; t
echo '## OpenDistro Performance Analyzer' >> $ES_HOME/config/jvm.options
echo "-Dclk.tck=$CLK_TCK" >> $ES_HOME/config/jvm.options
echo "-Djdk.attach.allowAttachSelf=true" >> $ES_HOME/config/jvm.options
echo "-Djava.security.policy=$ES_HOME/plugins/opendistro_performance_analyzer/pa_config/es_security.policy" >> $ES_HOME/config/jvm.options
echo "-Djava.security.policy=$ES_HOME/plugins/opendistro-performance-analyzer/pa_config/es_security.policy" >> $ES_HOME/config/jvm.options
fi
echo "done plugins"

Expand Down
2 changes: 1 addition & 1 deletion release-tools/scripts/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ urls:
prod: s3://artifacts.opendistroforelasticsearch.amazon.com/
#snapshots: s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/
releases: s3://staging.artifacts.opendistroforelasticsearch.amazon.com/releases/
releases_final_build: 573103324
releases_final_build: rc-build-573103324

# Warning:
# Please do not change the plugin orders as they have dependencies
Expand Down
30 changes: 22 additions & 8 deletions release-tools/scripts/setup_runners_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,14 @@ then
if [ "$SETUP_DISTRO" = "zip" ]
then
cd $ES_ROOT
nohup ./opendistro-tar-install.sh > /dev/null 2>&1 &
nohup ./opendistro-tar-install.sh > install.log 2>&1 &
sleep 60
cat install.log
kill -9 `ps -ef | grep [e]lasticsearch | awk '{print $2}'`
sed -i /^node.max_local_storage_nodes/d ./config/elasticsearch.yml
nohup ./opendistro-tar-install.sh > /dev/null 2>&1 &
nohup ./opendistro-tar-install.sh > install.log 2>&1 &
sleep 60
cat install.log
elif [ "$SETUP_DISTRO" = "docker" ]
then
docker restart $DOCKER_NAME
Expand Down Expand Up @@ -214,7 +217,9 @@ then
if [ "$SETUP_DISTRO" = "zip" ]
then
cd $ES_ROOT
nohup ./opendistro-tar-install.sh > /dev/null 2>&1 &
nohup ./opendistro-tar-install.sh > install.log 2>&1 &
sleep 60
cat install.log
elif [ "$SETUP_DISTRO" = "docker" ]
then
docker run -d -p 9200:9200 -d -p 9600:9600 -e "discovery.type=single-node" --name $DOCKER_NAME_NoSec odfe-http:no-security
Expand Down Expand Up @@ -260,14 +265,19 @@ then
if [ "$SETUP_DISTRO" = "zip" ]
then
cd $ES_ROOT
nohup ./opendistro-tar-install.sh > /dev/null 2>&1 &
nohup ./opendistro-tar-install.sh > install.log 2>&1 &
sleep 60
cat install.log
kill -9 `ps -ef | grep [e]lasticsearch | awk '{print $2}'`
sed -i /^node.max_local_storage_nodes/d ./config/elasticsearch.yml
echo "opendistro_security.unsupported.restapi.allow_securityconfig_modification: true" >> ./config/elasticsearch.yml
nohup ./opendistro-tar-install.sh > /dev/null 2>&1 &
nohup ./opendistro-tar-install.sh > install.log 2>&1 &
sleep 60
cat install.log
cd $KIBANA_ROOT
nohup ./bin/kibana > /dev/null 2>&1 &
nohup ./bin/kibana > kibana_install.log 2>&1 &
sleep 60
cat kibana_install.log
elif [ "$SETUP_DISTRO" = "docker" ]
then
docker restart $DOCKER_NAME
Expand Down Expand Up @@ -306,9 +316,13 @@ then
sed -i 's/https/http/' $KIBANA_ROOT/config/kibana.yml

cd $ES_ROOT
nohup ./opendistro-tar-install.sh > /dev/null 2>&1 &
nohup ./opendistro-tar-install.sh > install.log 2>&1 &
sleep 60
cat install.log
cd $KIBANA_ROOT
nohup ./bin/kibana > /dev/null 2>&1 &
nohup ./bin/kibana > kibana_install.log 2>&1 &
sleep 60
cat kibana_install.log
elif [ "$SETUP_DISTRO" = "docker" ]
then
echo "RUN /usr/share/kibana/bin/kibana-plugin remove opendistroSecurityKibana" >> Dockerfile.kibana
Expand Down