Skip to content

Disable all logging statements to prevent broad perf impact #788

Disable all logging statements to prevent broad perf impact

Disable all logging statements to prevent broad perf impact #788

name: Plugin Install
on: [push, pull_request, workflow_dispatch]
jobs:
plugin_install:
name: Plugin Install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build
run: ./gradlew clean assemble -Dbuild.snapshot=false
- name: Download OpenSearch Core
run: |
opensearch_version=`./gradlew properties -q | grep "opensearch_version:" | awk '{print $2}' | sed 's/-SNAPSHOT//g'`
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/$opensearch_version/latest/linux/x64/tar/builds/opensearch/dist/opensearch-min-$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-*.zip opensearch-security.zip
- name: Run OpenSearch with plugin
run: |
cat > os-ep.sh <<EOF
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
chown 1001:1001 -R /opensearch
su -c "/opensearch/bin/opensearch" -s /bin/bash opensearch
EOF
docker build -t opensearch-test:latest -f- . <<EOF
FROM ubuntu:latest
COPY --chown=1001:1001 os-ep.sh /docker-host/
COPY --chown=1001:1001 opensearch-security.zip /docker-host/security-plugin.zip
COPY --chown=1001:1001 opensearch* /opensearch/
RUN chmod +x /docker-host/os-ep.sh
RUN useradd -u 1001 -s /sbin/nologin opensearch
ENV PATH="/opensearch/bin:${PATH}"
WORKDIR /opensearch/
ENTRYPOINT /docker-host/os-ep.sh
EOF
docker run --name ops -d -p 9200:9200 -p 9600:9600 -i opensearch-test:latest
- name: Sleep while OpenSearch finishes starting up
uses: whatnick/[email protected]
with:
time: '30s'
- name: Check OpenSearch Running
run: curl -XGET https://localhost:9200 -u 'admin:admin' -k -v
- name: Get Docker Logs
if: always()
run: docker logs ops
- name: Run sanity tests
run: ./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="opensearch" -Dhttps=true -Duser=admin -Dpassword=admin