Skip to content

Commit 51cc034

Browse files
committed
Migrates plugin to OpenSearch Dashboards
Contains renaming/rewriting of references to previous ODFE Index Management Kibana plugin and updates to use the new OpenSearch and OpenSearch Dashboard.
1 parent c8727b6 commit 51cc034

File tree

77 files changed

+586
-465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+586
-465
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ extends: "@elastic/kibana"
44
settings:
55
import/resolver:
66
'@elastic/eslint-import-resolver-kibana':
7-
rootPackageName: 'opendistro_index_management_kibana'
7+
rootPackageName: 'opensearch_index_management_dashboards'
88
pluginPaths:
99
- .

.github/workflows/cypress-workflow.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,61 +23,61 @@ jobs:
2323
uses: actions/checkout@v2
2424
with:
2525
path: index-management
26-
# TODO: Move this after Kibana plugin setup so we can pull down the correct branch to support all opendistro branches
26+
# TODO: Move this after OpenSearch-Dashboards plugin setup so we can pull down the correct branch to support all opendistro branches
2727
repository: opendistro-for-elasticsearch/index-management
2828
- name: Run elasticsearch with plugin
2929
run: |
3030
cd index-management
3131
./gradlew run &
3232
sleep 300
3333
# timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done'
34-
- name: Checkout Index Management Kibana plugin
34+
- name: Checkout Index Management Dashboards plugin
3535
uses: actions/checkout@v2
3636
with:
37-
path: index-management-kibana-plugin
38-
- name: Get Kibana version
39-
id: kibana_version
37+
path: index-management-dashboards-plugin
38+
- name: Get OpenSearch-Dashboards version
39+
id: opensearch_dashboards_version
4040
run: |
41-
echo "::set-output name=kibana_version::$(node -p "(require('./index-management-kibana-plugin/kibana.json').kibanaVersion).match(/[.0-9]+/)[0]")"
42-
- name: Checkout Kibana
41+
echo "::set-output name=opensearch_dashboards_version::$(node -p "(require('./index-management-dashboards-plugin/opensearch_dashboards.json').opensearchDashboardsVersion).match(/[.0-9]+/)[0]")"
42+
- name: Checkout OpenSearch-Dashboards
4343
uses: actions/checkout@v2
4444
with:
45-
repository: opendistro-for-elasticsearch/kibana-oss
46-
ref: ${{ steps.kibana_version.outputs.kibana_version }}
47-
token: ${{ secrets.GITHUB_KIBANA_OSS }}
48-
path: kibana
45+
repository: opensearch-project/OpenSearch-Dashboards
46+
ref: ${{ steps.opensearch_dashboards_version.outputs.opensearch_dashboards_version }}
47+
token: ${{ secrets.GITHUB_OPENSEARCH_DASHBOARDS_OSS }}
48+
path: OpenSearch-Dashboards
4949
- name: Get node and yarn versions
5050
id: versions
5151
run: |
52-
echo "::set-output name=node_version::$(node -p "(require('./kibana/package.json').engines.node).match(/[.0-9]+/)[0]")"
53-
echo "::set-output name=yarn_version::$(node -p "(require('./kibana/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
52+
echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
53+
echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
5454
- name: Setup node
5555
uses: actions/setup-node@v1
5656
with:
5757
node-version: ${{ steps.versions.outputs.node_version }}
5858
registry-url: 'https://registry.npmjs.org'
59-
- name: Install correct yarn version for Kibana
59+
- name: Install correct yarn version for OpenSearch-Dashboards
6060
run: |
6161
npm uninstall -g yarn
6262
echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
6363
npm i -g yarn@${{ steps.versions.outputs.yarn_version }}
64-
- name: Bootstrap plugin/kibana
64+
- name: Bootstrap plugin/OpenSearch-Dashboards
6565
run: |
66-
mkdir -p kibana/plugins
67-
mv index-management-kibana-plugin kibana/plugins
68-
cd kibana/plugins/index-management-kibana-plugin
69-
yarn kbn bootstrap
70-
- name: Run kibana server
66+
mkdir -p OpenSearch-Dashboards/plugins
67+
mv index-management-dashboards-plugin OpenSearch-Dashboards/plugins
68+
cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
69+
yarn osd bootstrap
70+
- name: Run OpenSearch-Dashboards server
7171
run: |
72-
cd kibana
72+
cd OpenSearch-Dashboards
7373
yarn start --no-base-path --no-watch &
7474
sleep 300
7575
# timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
7676
# for now just chrome, use matrix to do all browsers later
7777
- name: Cypress tests
7878
uses: cypress-io/github-action@v2
7979
with:
80-
working-directory: kibana/plugins/index-management-kibana-plugin
80+
working-directory: OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
8181
command: yarn run cypress run
8282
wait-on: 'http://localhost:5601'
8383
browser: chrome
@@ -86,10 +86,10 @@ jobs:
8686
if: failure()
8787
with:
8888
name: cypress-screenshots
89-
path: kibana/plugins/index-management-kibana-plugin/cypress/screenshots
89+
path: OpenSearch-Dashboards/plugins/index-management-dashboards-plugin/cypress/screenshots
9090
# Test run video was always captured, so this action uses "always()" condition
9191
- uses: actions/upload-artifact@v1
9292
if: always()
9393
with:
9494
name: cypress-videos
95-
path: kibana/plugins/index-management-kibana-plugin/cypress/videos
95+
path: OpenSearch-Dashboards/plugins/index-management-dashboards-plugin/cypress/videos

.github/workflows/release-workflow.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,49 +7,49 @@ on:
77

88
jobs:
99
build:
10-
name: Build Index Management Kibana
10+
name: Build Index Management Dashboards
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout Index Management Kibana plugin
13+
- name: Checkout Index Management Dashboards plugin
1414
uses: actions/checkout@v2
1515
with:
16-
path: index-management-kibana-plugin
17-
- name: Get Kibana version
18-
id: kibana_version
16+
path: index-management-dashboards-plugin
17+
- name: Get OpenSearch-Dashboards version
18+
id: opensearch_dashboards_version
1919
run: |
20-
echo "::set-output name=kibana_version::$(node -p "(require('./index-management-kibana-plugin/kibana.json').kibanaVersion).match(/[.0-9]+/)[0]")"
21-
- name: Checkout Kibana
20+
echo "::set-output name=opensearch_dashboards_version::$(node -p "(require('./index-management-dashboards-plugin/opensearch_dashboards.json').opensearchDashboardsVersion).match(/[.0-9]+/)[0]")"
21+
- name: Checkout OpenSearch-Dashboards
2222
uses: actions/checkout@v2
2323
with:
24-
repository: opendistro-for-elasticsearch/kibana-oss
25-
ref: ${{ steps.kibana_version.outputs.kibana_version }}
26-
token: ${{ secrets.GITHUB_KIBANA_OSS }}
27-
path: kibana
24+
repository: opensearch-project/OpenSearch-Dashboards
25+
ref: ${{ steps.opensearch_dashboards_version.outputs.opensearch_dashboards_version }}
26+
token: ${{ secrets.GITHUB_OPENSEARCH_DASHBOARDS_OSS }}
27+
path: OpenSearch-Dashboards
2828
- name: Get node and yarn versions
2929
id: versions
3030
run: |
31-
echo "::set-output name=node_version::$(node -p "(require('./kibana/package.json').engines.node).match(/[.0-9]+/)[0]")"
32-
echo "::set-output name=yarn_version::$(node -p "(require('./kibana/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
31+
echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
32+
echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
3333
- name: Setup node
3434
uses: actions/setup-node@v1
3535
with:
3636
node-version: ${{ steps.versions.outputs.node_version }}
3737
registry-url: 'https://registry.npmjs.org'
38-
- name: Install correct yarn version for Kibana
38+
- name: Install correct yarn version for OpenSearch-Dashboards
3939
run: |
4040
npm uninstall -g yarn
4141
echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
4242
npm i -g yarn@${{ steps.versions.outputs.yarn_version }}
43-
- name: Bootstrap plugin/kibana
43+
- name: Bootstrap plugin/OpenSearch-Dashboards
4444
run: |
45-
mkdir -p kibana/plugins
46-
mv index-management-kibana-plugin kibana/plugins
47-
cd kibana/plugins/index-management-kibana-plugin
48-
yarn kbn bootstrap
45+
mkdir -p OpenSearch-Dashboards/plugins
46+
mv index-management-dashboards-plugin OpenSearch-Dashboards/plugins
47+
cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
48+
yarn osd bootstrap
4949
- name: Build plugin
5050
id: build_zip
5151
run: |
52-
cd kibana/plugins/index-management-kibana-plugin
52+
cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
5353
yarn build
5454
zip_path=`ls $(pwd)/build/*.zip`
5555
echo "::set-output name=zip_path::$zip_path"
@@ -65,7 +65,7 @@ jobs:
6565
6666
# inject build number before the suffix
6767
zip_outfile=`basename ${zip%.zip}-build-${GITHUB_RUN_NUMBER}.zip`
68-
68+
# TODO: Change s3 location
6969
s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/kibana-plugins/index-management/"
7070
7171
echo "Copying ${zip} to ${s3_prefix}${zip_outfile}"
@@ -86,7 +86,7 @@ jobs:
8686
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8787
with:
8888
upload_url: ${{ steps.create_release.outputs.upload_url }}
89-
asset_name: opendistro_index_management_kibana.zip
89+
asset_name: opendistro_index_management_dashboards.zip
9090
asset_path: ${{ steps.build_zip.outputs.zip_path }}
9191
asset_content_type: application/zip
9292
- name: Upload Workflow Artifacts

.github/workflows/unit-tests-workflow.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,43 @@ jobs:
99
name: Run unit tests
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout Index Management Kibana plugin
12+
- name: Checkout Index Management Dashboards plugin
1313
uses: actions/checkout@v2
1414
with:
15-
path: index-management-kibana-plugin
16-
- name: Get Kibana version
17-
id: kibana_version
15+
path: index-management-dashboards-plugin
16+
- name: Get OpenSearch-Dashboards version
17+
id: opensearch_dashboards_version
1818
run: |
19-
echo "::set-output name=kibana_version::$(node -p "(require('./index-management-kibana-plugin/kibana.json').kibanaVersion).match(/[.0-9]+/)[0]")"
20-
- name: Checkout Kibana
19+
echo "::set-output name=opensearch_dashboards_version::$(node -p "(require('./index-management-dashboards-plugin/opensearch_dashboards.json').opensearchDashboardsVersion).match(/[.0-9]+/)[0]")"
20+
- name: Checkout OpenSearch-Dashboards
2121
uses: actions/checkout@v2
2222
with:
23-
repository: opendistro-for-elasticsearch/kibana-oss
24-
ref: ${{ steps.kibana_version.outputs.kibana_version }}
25-
token: ${{ secrets.GITHUB_KIBANA_OSS }}
26-
path: kibana
23+
repository: opensearch-project/OpenSearch-Dashboards
24+
ref: ${{ steps.opensearch_dashboards_version.outputs.opensearch_dashboards_version }}
25+
token: ${{ secrets.GITHUB_OPENSEARCH_DASHBOARDS_OSS }}
26+
path: OpenSearch-Dashboards
2727
- name: Get node and yarn versions
2828
id: versions
2929
run: |
30-
echo "::set-output name=node_version::$(node -p "(require('./kibana/package.json').engines.node).match(/[.0-9]+/)[0]")"
31-
echo "::set-output name=yarn_version::$(node -p "(require('./kibana/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
30+
echo "::set-output name=node_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.node).match(/[.0-9]+/)[0]")"
31+
echo "::set-output name=yarn_version::$(node -p "(require('./OpenSearch-Dashboards/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
3232
- name: Setup node
3333
uses: actions/setup-node@v1
3434
with:
3535
node-version: ${{ steps.versions.outputs.node_version }}
3636
registry-url: 'https://registry.npmjs.org'
37-
- name: Install correct yarn version for Kibana
37+
- name: Install correct yarn version for OpenSearch-Dashboards
3838
run: |
3939
npm uninstall -g yarn
4040
echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
4141
npm i -g yarn@${{ steps.versions.outputs.yarn_version }}
42-
- name: Bootstrap plugin/kibana
42+
- name: Bootstrap plugin/OpenSearch-Dashboards
4343
run: |
44-
mkdir -p kibana/plugins
45-
mv index-management-kibana-plugin kibana/plugins
46-
cd kibana/plugins/index-management-kibana-plugin
47-
yarn kbn bootstrap
44+
mkdir -p OpenSearch-Dashboards/plugins
45+
mv index-management-dashboards-plugin OpenSearch-Dashboards/plugins
46+
cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
47+
yarn osd bootstrap
4848
- name: Run tests
4949
run: |
50-
cd kibana/plugins/index-management-kibana-plugin
50+
cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin
5151
yarn run test:jest
File renamed without changes.

CODE_OF_CONDUCT.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
1-
## Code of Conduct
2-
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3-
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4-
[email protected] with any additional questions or comments.
1+
2+
This code of conduct applies to all spaces provided by the OpenSource project including in code, documentation, issue trackers, mailing lists, chat channels, wikis, blogs, social media and any other communication channels used by the project.
3+
4+
5+
**Our open source communities endeavor to:**
6+
7+
* Be Inclusive: We are committed to being a community where everyone can join and contribute. This means using inclusive and welcoming language.
8+
* Be Welcoming: We are committed to maintaining a safe space for everyone to be able to contribute.
9+
* Be Respectful: We are committed to encouraging differing viewpoints, accepting constructive criticism and work collaboratively towards decisions that help the project grow. Disrespectful and unacceptable behavior will not be tolerated.
10+
* Be Collaborative: We are committed to supporting what is best for our community and users. When we build anything for the benefit of the project, we should document the work we do and communicate to others on how this affects their work.
11+
12+
13+
**Our Responsibility. As contributors, members, or bystanders we each individually have the responsibility to behave professionally and respectfully at all times. Disrespectful and unacceptable behaviors include, but are not limited to:**
14+
15+
* The use of violent threats, abusive, discriminatory, or derogatory language;
16+
* Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, race, political or religious affiliation;
17+
* Posting of sexually explicit or violent content;
18+
* The use of sexualized language and unwelcome sexual attention or advances;
19+
* Public or private harassment of any kind;
20+
* Publishing private information, such as physical or electronic address, without permission;
21+
* Other conduct which could reasonably be considered inappropriate in a professional setting;
22+
* Advocating for or encouraging any of the above behaviors.
23+
* Enforcement and Reporting Code of Conduct Issues:
24+
25+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported. [Contact us](mailto:[email protected]). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.

0 commit comments

Comments
 (0)