From 32735f3c7e8a6862a4065b2d15952bee95cebdfe Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Mon, 21 Mar 2022 20:44:31 +0000 Subject: [PATCH 1/5] Add CI check for demo script Signed-off-by: Peter Nied --- .github/workflows/plugin_install.yml | 71 ++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 .github/workflows/plugin_install.yml diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml new file mode 100644 index 0000000000..1d0b505598 --- /dev/null +++ b/.github/workflows/plugin_install.yml @@ -0,0 +1,71 @@ +name: Plugin Install + +on: [push, pull_request, workflow_dispatch] + +env: + OPENSEARCH_VERSION: "1.3.0" + +jobs: + plugin_install: + name: Plugin Install + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + jdk: [8, 11, 14] + + steps: + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.jdk }} + + - name: Checkout security + uses: actions/checkout@v2 + + - name: Build + run: ./gradlew clean assemble -Dbuild.snapshot=false + + - name: Download OpenSearch Core + run: | + wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{env.OPENSEARCH_VERSION}}/latest/linux/x64/builds/opensearch/dist/opensearch-min-${{env.OPENSEARCH_VERSION}}-linux-x64.tar.gz + tar -xzf opensearch-*.tar.gz + rm -f opensearch-*.tar.gz + + - name: Move and rename security plugin for installation + run: mv build/distributions/opensearch-security-${{env.OPENSEARCH_VERSION}}.0.zip opensearch-security.zip + + - name: Run OpenSearch with plugin + run: | + cat > os-ep.sh <> /opensearch/config/opensearch.yml + chown 1001:1001 -R /opensearch + su -c "/opensearch/bin/opensearch" -s /bin/bash opensearch + EOF + docker build -t opensearch-test:latest -f- . < Date: Tue, 22 Mar 2022 20:39:30 +0000 Subject: [PATCH 2/5] Moving to OpenSearch 1.4.0 that does not have the jar conflict Signed-off-by: Peter Nied --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 1d0b505598..26c6ad85fd 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -3,7 +3,7 @@ name: Plugin Install on: [push, pull_request, workflow_dispatch] env: - OPENSEARCH_VERSION: "1.3.0" + OPENSEARCH_VERSION: "1.4.0" jobs: plugin_install: From 5c41c9dad5867971af6a4ad7bca77e3c55a214a9 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Tue, 22 Mar 2022 20:40:28 +0000 Subject: [PATCH 3/5] Remove unneeded configuration entry Signed-off-by: Peter Nied --- .github/workflows/plugin_install.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 26c6ad85fd..6e18dbc134 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -41,7 +41,6 @@ jobs: yes | opensearch-plugin install file:///docker-host/security-plugin.zip chmod +x plugins/opensearch-security/tools/install_demo_configuration.sh yes | plugins/opensearch-security/tools/install_demo_configuration.sh - echo "plugins.security.unsupported.restapi.allow_securityconfig_modification: true" >> /opensearch/config/opensearch.yml chown 1001:1001 -R /opensearch su -c "/opensearch/bin/opensearch" -s /bin/bash opensearch EOF From b7445bc64491f12812c0bc47c1b410607fca72d6 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Tue, 22 Mar 2022 21:11:41 +0000 Subject: [PATCH 4/5] Switch to wildcard instead of version number Signed-off-by: Peter Nied --- .github/workflows/plugin_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin_install.yml b/.github/workflows/plugin_install.yml index 6e18dbc134..bc919997df 100644 --- a/.github/workflows/plugin_install.yml +++ b/.github/workflows/plugin_install.yml @@ -33,7 +33,7 @@ jobs: rm -f opensearch-*.tar.gz - name: Move and rename security plugin for installation - run: mv build/distributions/opensearch-security-${{env.OPENSEARCH_VERSION}}.0.zip opensearch-security.zip + run: mv build/distributions/opensearch-security-*.0.zip opensearch-security.zip - name: Run OpenSearch with plugin run: | From 7582c8d7140a66d6db4eaa030865eebf4ae0ae41 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Tue, 22 Mar 2022 22:58:04 +0000 Subject: [PATCH 5/5] Move default opensearch version forward Signed-off-by: Peter Nied --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 72a0cd53d3..451aca4e33 100644 --- a/build.gradle +++ b/build.gradle @@ -56,7 +56,7 @@ repositories { } ext { - opensearch_version = System.getProperty("opensearch.version", "1.3.0-SNAPSHOT") + opensearch_version = System.getProperty("opensearch.version", "1.4.0-SNAPSHOT") } configurations.all {