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 version to 2.2 #200

Merged
merged 1 commit into from
Aug 6, 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
8 changes: 4 additions & 4 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ This package uses the [Gradle](https://docs.gradle.org/current/userguide/usergui

4. Because we are supplying our own version of the RCA framework, the SHA might have changed. So, delete the old SHA file if it exists. The SHA will get updated during build time.

`rm -f licenses/performanceanalyzer-rca-2.1.0.0.jar.sha1`
`rm -f licenses/performanceanalyzer-rca-2.2.0.0.jar.sha1`

5. Trigger a gradle build. This builds the plugin, runs unit tests and creates the plugin jar.

Expand Down Expand Up @@ -105,16 +105,16 @@ You can use the packaged Dockerfile and docker-compose.yml files [here](./docker

4. Copy the RCA framework artifact and the Performance Analyzer plugin JAR into this folder

`cp <RCA framework root>/build/distributions/performance-analyzer-rca-2.1.0.0-SNAPSHOT.zip ./`
`cp <Performance Analyzer plugin root>/build/distributions/opensearch-performance-analyzer-2.1.0.0-SNAPSHOT.zip ./`
`cp <RCA framework root>/build/distributions/performance-analyzer-rca-2.2.0.0-SNAPSHOT.zip ./`
`cp <Performance Analyzer plugin root>/build/distributions/opensearch-performance-analyzer-2.2.0.0-SNAPSHOT.zip ./`

### Installation

1. Make sure you're in the `rca-infra` folder.

2. Build and tag the Docker image with our RCA framework.

`docker build -t opensearch/pa-rca:2.1 .`
`docker build -t opensearch/pa-rca:2.2 .`

3. Spin up a two node cluster as follows:

Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ distributions {
}

ext {
opensearch_version = System.getProperty("opensearch.version", "2.1.0-SNAPSHOT")
opensearch_version = System.getProperty("opensearch.version", "2.2.0-SNAPSHOT")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")

// 2.1.0-SNAPSHOT -> 2.1.0.0-SNAPSHOT
// 2.2.0-SNAPSHOT -> 2.2.0.0-SNAPSHOT
version_tokens = opensearch_version.tokenize('-')
opensearch_build = version_tokens[0] + '.0'
if (buildVersionQualifier) {
Expand Down Expand Up @@ -182,7 +182,7 @@ jacocoTestCoverageVerification {
violationRules {
rule {
limit {
minimum = 0.7
minimum = 0.6
}
}
}
Expand Down Expand Up @@ -458,7 +458,7 @@ task buildDocker(type: Exec) {
dependsOn(copyAllArtifacts)

workingDir(dockerArtifactsDir)
commandLine 'docker', 'build', '-t', 'opensearch/pa-rca:2.1', '.'
commandLine 'docker', 'build', '-t', 'opensearch/pa-rca:2.2', '.'
}

task runDocker(type: Exec) {
Expand Down
15 changes: 8 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ WORKDIR /usr/share/opensearch
ENV BUST_CACHE 1576286189

# Download and extract defined OpenSearch version.
RUN curl -fsSL https://artifacts.opensearch.org/snapshots/core/opensearch/2.1.0-SNAPSHOT/opensearch-min-2.1.0-SNAPSHOT-linux-x64-latest.tar.gz | \
RUN curl -fsSL https://artifacts.opensearch.org/snapshots/core/opensearch/2.2.0-SNAPSHOT/opensearch-min-2.2
.0-SNAPSHOT-linux-x64-latest.tar.gz | \
tar zx --strip-components=1

RUN set -ex && for opensearchdirs in config data logs; do \
Expand All @@ -38,20 +39,20 @@ RUN set -ex && for opensearchdirs in config data logs; do \

COPY --chown=1000:0 opensearch.yml log4j2.properties config/

COPY --chown=1000:0 performance-analyzer-rca-2.1.0.0-SNAPSHOT.zip config/
COPY --chown=1000:0 performance-analyzer-rca-2.2.0.0-SNAPSHOT.zip config/

COPY --chown=1000:0 opensearch-performance-analyzer-2.1.0.0-SNAPSHOT.zip /tmp/
COPY --chown=1000:0 opensearch-performance-analyzer-2.2.0.0-SNAPSHOT.zip /tmp/

RUN opensearch-plugin install --batch file:///tmp/opensearch-performance-analyzer-2.1.0.0-SNAPSHOT.zip; \
rm /tmp/opensearch-performance-analyzer-2.1.0.0-SNAPSHOT.zip
RUN opensearch-plugin install --batch file:///tmp/opensearch-performance-analyzer-2.2.0.0-SNAPSHOT.zip; \
rm /tmp/opensearch-performance-analyzer-2.2.0.0-SNAPSHOT.zip

USER 0

# Set gid to 0 for opensearch and make group permission similar to that of user
RUN chown -R opensearch:0 . && \
chmod -R g=u /usr/share/opensearch

RUN unzip config/performance-analyzer-rca-2.1.0.0-SNAPSHOT.zip
RUN unzip config/performance-analyzer-rca-2.2.0.0-SNAPSHOT.zip

RUN chmod -R 755 /dev/shm
################################################################################
Expand Down Expand Up @@ -123,7 +124,7 @@ EXPOSE 9200 9300 9600 9650

LABEL org.label-schema.schema-version="1.0" \
org.label-schema.name="opensearch" \
org.label-schema.version="2.1.0" \
org.label-schema.version="2.2.0" \
org.label-schema.url="https://opensearch.org/" \
org.label-schema.vcs-url="https://github.com/opensearch-project/opensearch-build" \
org.label-schema.license="Apache-2.0" \
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ version: '2.1'
services:
opensearch1:
container_name: opensearch1
image: opensearch/pa-rca:2.1
image: opensearch/pa-rca:2.2
mem_limit: 4g
networks:
opensearchnet:
Expand All @@ -34,7 +34,7 @@ services:
container_name: opensearch2
environment:
- node.master=false
image: opensearch/pa-rca:2.1
image: opensearch/pa-rca:2.2
mem_limit: 4g
networks:
- opensearchnet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Util {
private static final Logger LOG = LogManager.getLogger(Util.class);

public static final String PA_BASE_URL = "/_plugins/_performanceanalyzer";
public static final String LEGACY_OPENDISTRO_PA_BASE_URL = "/_opendistro/_performanceanalyzer";
public static final String LEGACY_OPENDISTRO_PA_BASE_URL = PA_BASE_URL;

public static final String METRICS_QUERY_URL = PA_BASE_URL + "/metrics";
public static final String LEGACY_OPENDISTRO_METRICS_QUERY_URL =
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/plugin-descriptor.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#
# classname=foo.bar.BazPlugin
# description=My cool plugin
# version=2.1
# opensearch.version=2.1
# version=2.2
# opensearch.version=2.2
# java.version=1.7
#
### mandatory elements for all plugins:
Expand All @@ -27,7 +27,7 @@
description=Performance Analyzer Plugin
#
# 'version': plugin's version
version=2.1.0.0
version=2.2.0.0
#
# 'name': the plugin name
name=performance-analyzer
Expand All @@ -42,4 +42,4 @@ classname=org.opensearch.performanceanalyzer.PerformanceAnalyzerPlugin
java.version=1.8
#
# 'opensearch.version' version of openSearch compiled against
opensearch.version=2.1.0
opensearch.version=2.2.0