Skip to content

Commit

Permalink
Enable performance-analyzer build and bundle steps
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Handalian <[email protected]>
  • Loading branch information
mch2 committed Aug 20, 2021
1 parent aed7794 commit 08e3812
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,7 @@ fi
[ -z "$OUTPUT" ] && OUTPUT=artifacts

./gradlew build -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -x test

mkdir -p $OUTPUT/maven/org/opensearch
./gradlew publishToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
cp -r ~/.m2/repository/org/opensearch/performanceanalyzer-rca $OUTPUT/maven/org/opensearch
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ fi
[[ "$SNAPSHOT" == "true" ]] && VERSION=$VERSION-SNAPSHOT
[ -z "$OUTPUT" ] && OUTPUT=artifacts

# remove this script when https://github.com/opensearch-project/performance-analyzer/issues/44 is fixed
git fetch origin main
git checkout main

./gradlew build -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT -x test
mkdir -p $OUTPUT/plugins
cp ./build/distributions/*.zip $OUTPUT/plugins

mkdir -p $OUTPUT/maven/org/opensearch
./gradlew publishToMavenLocal -Dopensearch.version=$VERSION -Dbuild.snapshot=$SNAPSHOT
cp -r ~/.m2/repository/org/opensearch/opensearch-performance-analyzer $OUTPUT/maven/org/opensearch
39 changes: 39 additions & 0 deletions bundle-workflow/scripts/components/performance-analyzer/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# Copyright OpenSearch Contributors.
# SPDX-License-Identifier: Apache-2.0

set -ex

function usage() {
echo "Usage: $0 [args]"
echo ""
echo "Arguments:"
echo -e "-a ARTIFACTS\t[Required] Location of build artifacts."
echo -e "-o OUTPUT\t[Required] Output path."
echo -e "-h help"
}

while getopts ":h:a:o:" arg; do
case $arg in
h)
usage
exit 1
;;
o)
OUTPUT=$OPTARG
;;
a)
ARTIFACTS=$OPTARG
;;
?)
echo "Invalid option: -${arg}"
exit 1
;;
esac
done

## Setup Performance Analyzer Agent
cp -r $OUTPUT/plugins/opensearch-performance-analyzer/performance-analyzer-rca $OUTPUT/
mv $OUTPUT/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli $OUTPUT/bin
rm -rf $OUTPUT/bin/opensearch-performance-analyzer
15 changes: 6 additions & 9 deletions manifests/opensearch-1.1.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ components:
# https://github.com/opensearch-project/security/issues/1403
repository: https://github.com/dblock/security.git
ref: fix-snapshot-build
#
# https://github.com/opensearch-project/opensearch-build/issues/148
#
# - name: performance-analyzer-rca
# repository: https://github.com/opensearch-project/performance-analyzer-rca.git
# ref: main
# - name: performance-analyzer
# repository: https://github.com/opensearch-project/performance-analyzer.git
# ref: main
- name: performance-analyzer-rca
repository: https://github.com/opensearch-project/performance-analyzer-rca.git
ref: main
- name: performance-analyzer
repository: https://github.com/opensearch-project/performance-analyzer.git
ref: main
- name: index-management
repository: https://github.com/opensearch-project/index-management.git
ref: main
Expand Down
2 changes: 1 addition & 1 deletion release/tar/linux/opensearch-tar-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PA_AGENT_JAVA_OPTS="-Dlog4j.configurationFile=$OPENSEARCH_HOME/plugins/opensearc
-Xms64M -Xmx64M -XX:+UseSerialGC -XX:CICompilerCount=1 -XX:-TieredCompilation -XX:InitialCodeCacheSize=4096 \
-XX:InitialBootClassLoaderMetaspaceSize=30720 -XX:MaxRAM=400m"

OPENSEARCH_MAIN_CLASS="com.amazon.opendistro.opensearch.performanceanalyzer.PerformanceAnalyzerApp" \
OPENSEARCH_MAIN_CLASS="org.opensearch.performanceanalyzer.PerformanceAnalyzerApp" \
OPENSEARCH_ADDITIONAL_CLASSPATH_DIRECTORIES=plugins/opensearch-performance-analyzer \
OPENSEARCH_JAVA_OPTS=$PA_AGENT_JAVA_OPTS

Expand Down

0 comments on commit 08e3812

Please sign in to comment.