Skip to content

Commit

Permalink
fix failed docker build due to missing plugins (opensearch-project#1162)
Browse files Browse the repository at this point in the history
* fix failed docker build due to missing plugins

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* fix indent

Signed-off-by: Tianle Huang <tianleh@amazon.com>

Co-authored-by: Ubuntu <ubuntu@ip-172-31-63-149.us-west-2.compute.internal>
  • Loading branch information
tianleh and Ubuntu authored Nov 26, 2021
1 parent f6a46b1 commit e4b6372
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 6 additions & 2 deletions docker/release/dockerfiles/opensearch.al2.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ RUN groupadd -g $GID opensearch && \
mkdir /tmp/opensearch

# Prepare working directory

ARG SECURITY_PLUGIN_DIR=$OPENSEARCH_HOME/plugins/opensearch-security
ARG PERFORMANCE_ANALYZER_PLUGIN_DIR=$OPENSEARCH_HOME/plugins/opensearch-performance-analyzer

COPY opensearch-*.tgz /tmp/opensearch/
RUN tar -xzpf /tmp/opensearch/opensearch-`uname -p`.tgz -C $OPENSEARCH_HOME --strip-components=1 && rm -rf /tmp/opensearch && \
chmod 750 $OPENSEARCH_HOME/plugins/opensearch-security/tools/* && \
mkdir -p $OPENSEARCH_HOME/data && chown -R $UID:$GID $OPENSEARCH_HOME/data
RUN if [[ -d $SECURITY_PLUGIN_DIR ]] ; then chmod 750 $SECURITY_PLUGIN_DIR/tools/* ; fi
COPY opensearch-docker-entrypoint.sh opensearch-onetime-setup.sh $OPENSEARCH_HOME/
COPY log4j2.properties opensearch.yml $OPENSEARCH_HOME/config/
COPY performance-analyzer.properties $OPENSEARCH_HOME/plugins/opensearch-performance-analyzer/pa_config/
RUN if [[ -d $PERFORMANCE_ANALYZER_PLUGIN_DIR ]] ; then cp performance-analyzer.properties $PERFORMANCE_ANALYZER_PLUGIN_DIR/pa_config/; fi


########################### Stage 1 ########################
Expand Down
7 changes: 5 additions & 2 deletions scripts/opensearch-onetime-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ fi

##Perf Plugin
PA_PLUGIN="opensearch-performance-analyzer"
chmod 755 $OPENSEARCH_HOME/plugins/$PA_PLUGIN/pa_bin/performance-analyzer-agent
chmod 755 $OPENSEARCH_HOME/bin/performance-analyzer-agent-cli

if [ -d $OPENSEARCH_HOME/plugins/$PA_PLUGIN ]; then
chmod 755 $OPENSEARCH_HOME/plugins/$PA_PLUGIN/pa_bin/performance-analyzer-agent
chmod 755 $OPENSEARCH_HOME/bin/performance-analyzer-agent-cli
fi

if ! grep -q '## OpenDistro Performance Analyzer' $OPENSEARCH_HOME/config/jvm.options; then
CLK_TCK=`/usr/bin/getconf CLK_TCK`
Expand Down

0 comments on commit e4b6372

Please sign in to comment.