Skip to content

Commit

Permalink
Backport/backport 165 to 2.x (#196)
Browse files Browse the repository at this point in the history
* bumping up the opensearch dashboards versions

Signed-off-by: Riya Saxena <[email protected]>

* Add workflow to verify installation of the plugin zip and dashboards … (#165)

* Add workflow to verify installation of the plugin zip and dashboards comes up healthy

Signed-off-by: Derek Ho <[email protected]>

* Add loose

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
(cherry picked from commit 0405502)

---------

Signed-off-by: Riya Saxena <[email protected]>
Co-authored-by: Derek Ho <[email protected]>
  • Loading branch information
riysaxen-amzn and derek-ho authored Apr 26, 2024
1 parent 640535e commit d1a3c8d
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
cd ./OpenSearch-Dashboards/
su `id -un 1000` -c "source $NVM_DIR/nvm.sh && nvm use && node -v && yarn -v &&
cd ./plugins/dashboards-notifications &&
whoami && yarn osd bootstrap && yarn build"
whoami && yarn osd bootstrap --single-version=loose && yarn build"
- name: Run unit tests
uses: nick-fields/retry@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ jobs:
- name: OpenSearch Dashboards Plugin Bootstrap
run: |
cd OpenSearch-Dashboards/plugins/dashboards-notifications
yarn osd bootstrap
cd ./OpenSearch-Dashboards/plugins/dashboards-notifications
yarn osd bootstrap --single-version=loose
- name: Build Artifact
run: |
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/verify-binary-installation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: 'Install Dashboards with Plugin via Binary'

on: [push, pull_request]
env:
OPENSEARCH_VERSION: '3.0.0'
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm

jobs:
verify-binary-installation:
name: Run binary installation
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# TODO: add windows support when OSD core is stable on windows
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Branch
uses: actions/checkout@v3

- name: Set env
run: |
opensearch_version=$(node -p "require('./opensearch_dashboards.json').opensearchDashboardsVersion")
plugin_version=$(node -p "require('./opensearch_dashboards.json').version")
echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV
shell: bash

- name: Run Opensearch
uses: derek-ho/start-opensearch@v2
with:
opensearch-version: ${{ env.OPENSEARCH_VERSION }}
security-enabled: false

- name: Run Dashboard
id: setup-dashboards
uses: derek-ho/setup-opensearch-dashboards@v1
with:
plugin_name: dashboards-notifications
built_plugin_name: notifications-dashboards
install_zip: true

- name: Start the binary
run: |
nohup ./bin/opensearch-dashboards &
working-directory: ${{ steps.setup-dashboards.outputs.dashboards-binary-directory }}
shell: bash

- name: Health check
run: |
timeout 300 bash -c 'while [[ "$(curl http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
shell: bash
2 changes: 1 addition & 1 deletion opensearch_dashboards.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
],
"server": true,
"ui": true
}
}

0 comments on commit d1a3c8d

Please sign in to comment.