Skip to content

Commit

Permalink
Migrate notebooks frontend and backend plugin to OpenSearch 1.15 (ope…
Browse files Browse the repository at this point in the history
…nsearch-project#3)

* Refactor notebooks for opensearch

* Refactor kotlin imports

* Refactor es notebooks for opensearch

* bump kibana notebooks to opensearch 1.15

* Rename es-notebooks to opensearch-notebooks

* Rename kibana-notebooks to notebooks

* Refactor github workflows for opensearch

* More renaming

* Refactor docs

* Update workflows

* Rename notebooks to dashboards-notebooks

* Refactor and remove duplicate docs

* rename kibana in strings related to security plugin

* Fix typo in workflows

* Rename ES in docs

* Rename ES in variables

* Rename opendistro-notebooks to opensearch-notebooks in plugin name

* Address comments

* Change opensearch-notebooks to notebooks-dashboards

* Update documents for repo

* Address comments
  • Loading branch information
joshuali925 authored Apr 16, 2021
1 parent 2b64efe commit 3cd2e43
Show file tree
Hide file tree
Showing 184 changed files with 936 additions and 956 deletions.
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: 🐛 Bug report
about: Create a report to help us improve
title: "[BUG]"
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Plugins**
Please list all plugins currently enabled.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Host/Environment (please complete the following information):**
- OS: [e.g. iOS]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: 🎆 Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

name: Release Kibana Notebooks Artifacts
name: Release Dashboards Notebooks Artifacts

on:
push:
tags:
- 'v*'

env:
PLUGIN_NAME: opendistroNotebooksKibana
OD_VERSION: 1.13.0.0
PLUGIN_NAME: notebooksDashboards
OD_VERSION: 1.15.0.0

jobs:

Expand All @@ -28,41 +28,42 @@ jobs:
- name: Checkout Plugin
uses: actions/checkout@v1

- name: Checkout Kibana
# TODO change to opensearch
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v1
with:
repository: opendistro-for-elasticsearch/kibana-oss
ref: 7.10.2
token: ${{secrets.OD_ACCESS}}
path: kibana-notebooks/kibana
repository: opensearch-project/Opensearch-Dashboards
ref: 1.x
path: dashboards-notebooks/OpenSearch-Dashboards

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.23.1'

- name: Move Kibana Notebooks to Plugins Dir
run: mv kibana-notebooks kibana/plugins/kibana-notebooks
- name: Move Notebooks to Plugins Dir
run: mv notebooks OpenSearch-Dashboards/plugins/notebooks

- name: Kibana Pluign Bootstrap
- name: OpenSearch-Dashboards Pluign Bootstrap
run: |
cd kibana/plugins/kibana-notebooks
yarn kbn bootstrap
cd OpenSearch-Dashboards/plugins/notebooks
yarn osd bootstrap
- name: Build Artifact
run: |
cd kibana/plugins/kibana-notebooks
cd OpenSearch-Dashboards/plugins/notebooks
yarn build
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}.zip
- name: Upload to S3
run: |
cd kibana/plugins/kibana-notebooks
cd OpenSearch-Dashboards/plugins/notebooks
artifact=`ls ./build/*.zip`
# inject build number before the suffix
zip_outfile=`basename ${artifact%.zip}-build-${GITHUB_RUN_NUMBER}.zip`
# TODO change s3 link
s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/kibana-plugins/notebooks/"
echo "Copying ${artifact} to ${s3_prefix}${zip_outfile}"
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/dashboards-notebooks-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

name: Test and Build Dashboards Notebooks

on: [pull_request, push]

env:
PLUGIN_NAME: notebooksDashboards
OD_VERSION: 1.15.0.0

jobs:

build:

runs-on: ubuntu-latest

steps:
- name: Checkout Plugin
uses: actions/checkout@v1

- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v1
with:
repository: opensearch-project/Opensearch-Dashboards
ref: 1.x
path: dashboards-notebooks/OpenSearch-Dashboards

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.23.1'

- name: Move Notebooks to Plugins Dir
run: mv dashboards-notebooks OpenSearch-Dashboards/plugins/dashboards-notebooks

- name: OpenSearch Dashboards Pluign Bootstrap
run: |
cd OpenSearch-Dashboards/plugins/dashboards-notebooks
yarn osd bootstrap
- name: Build Artifact
run: |
cd OpenSearch-Dashboards/plugins/dashboards-notebooks
yarn build
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OD_VERSION }}.zip
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: dashboards-notebooks
path: OpenSearch-Dashboards/plugins/dashboards-notebooks/build
50 changes: 0 additions & 50 deletions .github/workflows/kibana-notebooks-test-and-build-workflow.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release Notebooks ES Plugin Artifacts
name: Release OpenSearch Notebooks Backend Plugin Artifacts
# This workflow is triggered on creating tags to master or an opendistro release branch
on:
push:
Expand Down Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Run build
run: |
cd es-notebooks
cd opensearch-notebooks
./gradlew build buildDeb buildRpm --no-daemon --refresh-dependencies -Dbuild.snapshot=false
artifact=`ls ./build/distributions/*.zip`
rpm_artifact=`ls ./build/distributions/*.rpm`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test and Build Notebooks ES Plugin
name: Test and Build OpenSearch Notebooks Backend Plugin

on: [push, pull_request]

Expand All @@ -16,16 +16,16 @@ jobs:

- name: Build with Gradle
run: |
cd es-notebooks
cd opensearch-notebooks
./gradlew build
- name: Create Artifact Path
run: |
mkdir -p es-notebooks-builds
cp -r ./es-notebooks/build/distributions/*.zip es-notebooks-builds/
mkdir -p opensearch-notebooks-builds
cp -r ./opensearch-notebooks/build/distributions/*.zip opensearch-notebooks-builds/
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: es-notebooks
path: es-notebooks-builds
name: opensearch-notebooks
path: opensearch-notebooks-builds
29 changes: 25 additions & 4 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
## Code of Conduct
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
[email protected] with any additional questions or comments.

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.


**Our open source communities endeavor to:**

* Be Inclusive: We are committed to being a community where everyone can join and contribute. This means using inclusive and welcoming language.
* Be Welcoming: We are committed to maintaining a safe space for everyone to be able to contribute.
* 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.
* 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.


**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:**

* The use of violent threats, abusive, discriminatory, or derogatory language;
* Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, race, political or religious affiliation;
* Posting of sexually explicit or violent content;
* The use of sexualized language and unwelcome sexual attention or advances;
* Public or private harassment of any kind;
* Publishing private information, such as physical or electronic address, without permission;
* Other conduct which could reasonably be considered inappropriate in a professional setting;
* Advocating for or encouraging any of the above behaviors.
* Enforcement and Reporting Code of Conduct Issues:

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.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ information to effectively respond to your bug report or contribution.

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](https://github.com/mauve-hedgehog/OpenES-Sample/issues), or [recently closed](https://github.com/mauve-hedgehog/OpenES-Sample/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
When filing an issue, please check [existing open](https://github.com/opensearch-project/dashboards-notebooks/issues), or [recently closed](https://github.com/opensearch-project/dashboards-notebooks/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
Expand Down Expand Up @@ -78,7 +78,7 @@ GitHub provides additional document on [forking a repository](https://help.githu


## Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/mauve-hedgehog/OpenES-Sample/labels/help%20wanted) issues is a great place to start.
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/opensearch-project/dashboards-notebooks/labels/help%20wanted) issues is a great place to start.


## Code of Conduct
Expand All @@ -93,6 +93,6 @@ If you discover a potential security issue in this project we ask that you notif

## Licensing

See the [LICENSE](https://github.com/mauve-hedgehog/OpenES-Sample/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
See the [LICENSE](https://github.com/opensearch-project/dashboards-notebooks/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
28 changes: 27 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -173,3 +172,30 @@
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
9 changes: 9 additions & 0 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Dashboards Notebooks Maintainers

## Maintainers
| Maintainer | GitHub ID | Affiliation |
|------------------------|---------------------------------------------------|-------------|
| Anantha Krishna Bhatta | [akbhatta](https://github.com/akbhatta) | Amazon |
| David Cui | [davidcui-amzn](https://github.com/davidcui-amzn) | Amazon |
| Joshua Li | [joshuali925](https://github.com/joshuali925) | Amazon |
| Zhongnan Su | [zhongnansu](https://github.com/zhongnansu) | Amazon |
12 changes: 12 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
OpenSearch
Copyright 2021 OpenSearch Contributors

This product includes software developed by
Elasticsearch (http://www.elastic.co).
Copyright 2009-2018 Elasticsearch

This product includes software developed by The Apache Software
Foundation (http://www.apache.org/).

This product includes software developed by
Joda.org (http://www.joda.org/).
Loading

0 comments on commit 3cd2e43

Please sign in to comment.