Skip to content

Commit ed03dca

Browse files
authored
Update and add documentation files (opensearch-project#105)
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
1 parent b9c0fde commit ed03dca

6 files changed

+67
-154
lines changed

CONTRIBUTING.md

+3-104
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,4 @@
1-
# Contributing Guidelines
2-
3-
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
4-
documentation, we greatly value feedback and contributions from our community.
5-
6-
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
7-
information to effectively respond to your bug report or contribution.
8-
9-
10-
## Reporting Bugs/Feature Requests
11-
12-
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
13-
14-
When filing an issue, please check [existing open](../../issues), or [recently closed](../../issues?q=is%3Aissue+is%3Aclosed), issues to make sure somebody else hasn't already
15-
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
16-
17-
* A reproducible test case or series of steps
18-
* The version of our code being used
19-
* Any modifications you've made relevant to the bug
20-
* Anything unusual about your environment or deployment
21-
22-
23-
## Contributing via Pull Requests
24-
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
25-
26-
1. You are working against the latest source on the *master* branch.
27-
2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
28-
3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
29-
30-
To send us a pull request, please:
31-
32-
1. Fork the repository.
33-
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
34-
3. Ensure local tests pass.
35-
4. Commit to your fork using clear commit messages.
36-
5. Send us a pull request, answering any default questions in the pull request interface.
37-
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
38-
39-
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
40-
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
41-
42-
43-
## Finding contributions to work on
44-
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'](../../labels/help%20wanted) issues is a great place to start.
45-
46-
47-
## Code of Conduct
48-
49-
Please refer to [Code of Conduct](./CODE_OF_CONDUCT.md) on this repository.
50-
51-
52-
## Developer Certificate of Origin
53-
54-
OpenSearch is an open source product released under the Apache 2.0 license (see either [the Apache site](https://www.apache.org/licenses/LICENSE-2.0) or the [LICENSE.txt file](./LICENSE.txt)). The Apache 2.0 license allows you to freely use, modify, distribute, and sell your own products that include Apache 2.0 licensed software.
55-
56-
We respect intellectual property rights of others and we want to make sure all incoming contributions are correctly attributed and licensed. A Developer Certificate of Origin (DCO) is a lightweight mechanism to do that.
57-
58-
The DCO is a declaration attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a `Signed-off-by` statement and thereby agrees to the DCO, which you can find below or at [DeveloperCertificate.org](http://developercertificate.org/).
59-
60-
```
61-
Developer's Certificate of Origin 1.1
62-
63-
By making a contribution to this project, I certify that:
64-
65-
(a) The contribution was created in whole or in part by me and I
66-
have the right to submit it under the open source license
67-
indicated in the file; or
68-
69-
(b) The contribution is based upon previous work that, to the
70-
best of my knowledge, is covered under an appropriate open
71-
source license and I have the right under that license to
72-
submit that work with modifications, whether created in whole
73-
or in part by me, under the same open source license (unless
74-
I am permitted to submit under a different license), as
75-
Indicated in the file; or
76-
77-
(c) The contribution was provided directly to me by some other
78-
person who certified (a), (b) or (c) and I have not modified
79-
it.
80-
81-
(d) I understand and agree that this project and the contribution
82-
are public and that a record of the contribution (including
83-
all personal information I submit with it, including my
84-
sign-off) is maintained indefinitely and may be redistributed
85-
consistent with this project or the open source license(s)
86-
involved.
87-
```
88-
We require that every contribution to OpenSearch is signed with a Developer Certificate of Origin. Additionally, please use your real name. We do not accept anonymous contributors nor those utilizing pseudonyms.
89-
90-
Each commit must include a DCO which looks like this
91-
92-
```
93-
Signed-off-by: Jane Smith <jane.smith@email.com>
94-
```
95-
You may type this line on your own when writing your commit messages. However, if your user.name and user.email are set in your git configs, you can use `-s` or `– – signoff` to add the `Signed-off-by` line to the end of the commit message.
96-
97-
## Security issue notifications
98-
99-
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public GitHub issue.
100-
101-
102-
## Licensing
103-
104-
See the [LICENSE](./LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
1+
## Contributing to this Project
1052

3+
OpenSearch is a community project that is built and maintained by people just like **you**.
4+
[This document](https://github.com/opensearch-project/.github/blob/main/CONTRIBUTING.md) explains how you can contribute to this and related projects.

DEVELOPER_GUIDE.md

+35-22
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,54 @@
1-
# Developer Guide
1+
- [Developer Guide](#developer-guide)
2+
- [Forking and Cloning](#forking-and-cloning)
3+
- [Install Prerequisites](#install-prerequisites)
4+
- [JDK 14](#jdk-14)
5+
- [Setup](#setup)
6+
- [Build](#build)
7+
- [Building from the command line](#building-from-the-command-line)
8+
- [Building from the IDE](#building-from-the-ide)
9+
- [Debugging](#debugging)
10+
- [Advanced: Launching multi node clusters locally](#advanced-launching-multi-node-clusters-locally)
211

3-
## Setup
12+
## Developer Guide
413

5-
1. Checkout source code of this package from the Github repo.
6-
1. Launch Intellij IDEA, Choose Import Project and select the settings.gradle file in the root of this package.
7-
1. To build from command line set JAVA_HOME to point to a JDK 14 before running `./gradlew`.
14+
### Forking and Cloning
815

9-
* Unix System
10-
* export JAVA_HOME=jdk-install-dir: Replace jdk-install-dir by the JAVA_HOME directory of your system.
11-
* export PATH=$JAVA_HOME/bin:$PATH
12-
* Windows System
13-
* Find **My Computers** from file directory, right click and select **properties**.
14-
* Select the **Advanced** tab, select **Environment variables**.
15-
* Edit **JAVA_HOME** to path of where JDK software is installed.
16+
Fork this repository on GitHub, and clone locally with `git clone`.
1617

17-
## Build
18+
### Install Prerequisites
19+
20+
#### JDK 14
21+
22+
OpenSearch components build using Java 14 at a minimum. This means you must have a JDK 14 installed with the environment variable `JAVA_HOME` referencing the path to Java home for your JDK 14 installation, e.g. `JAVA_HOME=/usr/lib/jvm/jdk-14`.
23+
24+
### Setup
25+
26+
1. Clone the repository (see [Forking and Cloning](#forking-and-cloning))
27+
2. Make sure `JAVA_HOME` is pointing to a Java 14 JDK (see [Install Prerequisites](#install-prerequisites))
28+
3. Launch Intellij IDEA, Choose Import Project and select the settings.gradle file in the root of this package.
29+
30+
### Build
1831

1932
This package uses the [Gradle](https://docs.gradle.org/current/userguide/userguide.html) build system. Gradle comes with excellent documentation that should be your first stop when trying to figure out how to operate or modify the build. we also use the OpenSearch build tools for Gradle. These tools are idiosyncratic and don't always follow the conventions and instructions for building regular Java code using Gradle. Not everything in this package will work the way it's described in the Gradle documentation. If you encounter such a situation, the OpenSearch build tools [source code](https://github.com/opensearch-project/OpenSearch/tree/main/buildSrc/src/main/groovy/org/opensearch/gradle) is your best bet for figuring out what's going on.
2033

2134
Currently we just put RCF jar in lib as dependency. Plan to publish to Maven and we can import it later. Before publishing to Maven, you can still build this package directly and find source code in RCF Github package.
2235

23-
### Building from the command line
36+
#### Building from the command line
2437

2538
1. `./gradlew build` builds and tests
26-
1. `./gradlew :run` launches a single node cluster with anomaly-detection (and job-scheduler) plugin installed
27-
1. `./gradlew :integTest` launches a single node cluster with anomaly-detection (and job-scheduler) plugin installed and runs all integration tests except security
28-
1. ` ./gradlew :integTest --tests="**.test execute foo"` runs a single integration test class or method
29-
1. `./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin` launches integration tests against a local cluster and run tests with security
30-
1. `./gradlew spotlessApply` formats code. And/or import formatting rules in `.eclipseformat.xml` with IDE.
39+
2. `./gradlew :run` launches a single node cluster with anomaly-detection (and job-scheduler) plugin installed
40+
3. `./gradlew :integTest` launches a single node cluster with anomaly-detection (and job-scheduler) plugin installed and runs all integration tests except security
41+
4. ` ./gradlew :integTest --tests="**.test execute foo"` runs a single integration test class or method
42+
5. `./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin` launches integration tests against a local cluster and run tests with security
43+
6. `./gradlew spotlessApply` formats code. And/or import formatting rules in `.eclipseformat.xml` with IDE.
3144

3245
When launching a cluster using one of the above commands logs are placed in `/build/cluster/run node0/opensearch-<version>/logs`. Though the logs are teed to the console, in practices it's best to check the actual log file.
3346

34-
### Building from the IDE
47+
#### Building from the IDE
3548

3649
Currently, the only IDE we support is IntelliJ IDEA. It's free, it's open source, it works. The gradle tasks above can also be launched from IntelliJ's Gradle toolbar and the extra parameters can be passed in via the Launch Configurations VM arguments.
3750

38-
### Debugging
51+
#### Debugging
3952

4053
Sometimes it's useful to attach a debugger to either the OpenSearch cluster or the integ tests to see what's going on. When running unit tests you can just hit 'Debug' from the IDE's gutter to debug the tests. To debug code running in an actual server run:
4154

@@ -55,7 +68,7 @@ To debug code running in an integ test (which exercises the server from a separa
5568

5669
The test runner JVM will start suspended and wait for a debugger to attach to `localhost:5005` before running the tests.
5770

58-
### Advanced: Launching multi node clusters locally
71+
#### Advanced: Launching multi node clusters locally
5972

6073
Sometimes you need to launch a cluster with more than one OpenSearch server process.
6174

MAINTAINERS.md

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# OpenSearch Anomaly Detection Maintainers
22

33
## Maintainers
4-
| Maintainer | GitHub ID | Affiliation |
5-
| --------------- | --------- | ----------- |
6-
| Hanguang Zhang | [zhanghg08](https://github.com/zhanghg08) | Amazon |
7-
| Jack Mazanec | [jmazanec15](https://github.com/jmazanec15) | Amazon |
8-
| Jing Zhang | [jngz-es](https://github.com/jngz-es) | Amazon |
9-
| Kaituo Li | [kaituo](https://github.com/kaituo) | Amazon |
10-
| Lai Jiang | [wnbts](https://github.com/wnbts) | Amazon |
11-
| Sarat Vemulapalli | [saratvemulapalli](https://github.com/saratvemulapalli) | Amazon |
12-
| Tyler Ohlsen | [ohtyler](https://github.com/ohltyler) | Amazon |
13-
| Vamshi Vijay Nakkirtha | [vamshin](https://github.com/vamshin) | Amazon |
14-
| Vijayan Balasubramanian | [VijayanB](https://github.com/VijayanB) | Amazon |
15-
| Weicong Sun | [weicongs-amazon](https://github.com/weicongs-amazon) | Amazon |
16-
| Yaliang Wu | [ylwu-amzn](https://github.com/ylwu-amzn) | Amazon |
17-
| Yizhe Liu | [yizheliu-amazon](https://github.com/yizheliu-amazon) | Amazon |
4+
| Maintainer | GitHub ID | Affiliation |
5+
| ----------------------- | ------------------------------------------------------- | ----------- |
6+
| Hanguang Zhang | [zhanghg08](https://github.com/zhanghg08) | Amazon |
7+
| Jack Mazanec | [jmazanec15](https://github.com/jmazanec15) | Amazon |
8+
| Jing Zhang | [jngz-es](https://github.com/jngz-es) | Amazon |
9+
| Kaituo Li | [kaituo](https://github.com/kaituo) | Amazon |
10+
| Lai Jiang | [wnbts](https://github.com/wnbts) | Amazon |
11+
| Sarat Vemulapalli | [saratvemulapalli](https://github.com/saratvemulapalli) | Amazon |
12+
| Tyler Ohlsen | [ohtyler](https://github.com/ohltyler) | Amazon |
13+
| Vamshi Vijay Nakkirtha | [vamshin](https://github.com/vamshin) | Amazon |
14+
| Vijayan Balasubramanian | [VijayanB](https://github.com/VijayanB) | Amazon |
15+
| Yaliang Wu | [ylwu-amzn](https://github.com/ylwu-amzn) | Amazon |
16+
| Yizhe Liu | [yizheliu-amazon](https://github.com/yizheliu-amazon) | Amazon |
17+
18+
[This document](https://github.com/opensearch-project/.github/blob/main/MAINTAINERS.md) explains what maintainers do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md).

README.md

+10-14
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@
44
[![Forum](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/Use-this-category-for-all-questions-around-machine-learning-plugins)
55
![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)
66

7+
<img src="https://opensearch.org/assets/brand/SVG/Logo/opensearch_logo_default.svg" height="64px"/>
8+
79
<!-- TOC -->
810

911
- [OpenSearch Anomaly Detection](#opensearch-anomaly-detection)
10-
- [Highlights](#highlights)
1112
- [Documentation](#documentation)
1213
- [Contributing](#contributing)
1314
- [Code of Conduct](#code-of-conduct)
1415
- [Security](#security)
15-
- [Licensing](#licensing)
16+
- [License](#license)
1617
- [Copyright](#copyright)
1718

1819
<!-- /TOC -->
@@ -21,38 +22,33 @@
2122

2223
The OpenSearch Anomaly Detection plugin enables you to leverage Machine Learning based algorithms to automatically detect anomalies as your log data is ingested. Combined with [OpenSearch Alerting](https://github.com/opensearch-project/alerting), you can monitor your data in near real time and automatically send alert notifications . With an intuitive OpenSearch Dashboards interface, and a powerful API, it is easy to set up, tune, and monitor your anomaly detectors.
2324

24-
## Highlights
25-
2625
Anomaly detection is using the [Random Cut Forest (RCF) algorithm](https://github.com/aws/random-cut-forest-by-aws) for detecting anomalous data points.
2726

2827
Anomaly detections run a scheduled job using [job-scheduler](https://github.com/opensearch-project/job-scheduler).
2928

30-
You should use anomaly detection plugin with the same version of [OpenSearch Alerting](https://github.com/opensearch-project/alerting). You can also create a monitor based on the anomaly detector. A scheduled monitor run checks the anomaly detection results regularly, and collects anomalies to trigger alerts based on custom trigger conditions.
29+
You can use this plugin with the same version of the [OpenSearch Alerting Plugin](https://github.com/opensearch-project/alerting) to create monitors based on created anomaly detectors. A scheduled monitor run checks the anomaly detection results regularly, and collects anomalies to trigger alerts based on custom trigger conditions.
3130

3231
## Documentation
3332

3433
Please see [our documentation](https://docs-beta.opensearch.org/monitoring-plugins/ad/index/).
3534

36-
## Contributing
3735

38-
We welcome you to get involved in development, documentation, and testing of the anomaly detection plugin.
39-
40-
See our [contribution guidelines](CONTRIBUTING.md) and the [developer guide](DEVELOPER_GUIDE.md) to get started.
36+
## Contributing
4137

42-
If you are looking for a quick contribution, we still don't have 100% unit test coverage for now. Check out [GitHub issues](https://github.com/opensearch-project/anomaly-detection/issues) for other ideas.
38+
See [developer guide](DEVELOPER_GUIDE.md) and [how to contribute to this project](CONTRIBUTING.md).
4339

4440
## Code of Conduct
4541

46-
This project has adopted an [Open Source Code of Conduct](CODE_OF_CONDUCT.md).
42+
This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUCT.md). For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq), or contact [opensource-codeofconduct@amazon.com](mailto:opensource-codeofconduct@amazon.com) with any additional questions or comments.
4743

4844
## Security
4945

5046
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public GitHub issue.
5147

52-
## Licensing
48+
## License
5349

54-
See the [LICENSE](LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
50+
This project is licensed under the [Apache v2.0 License](LICENSE.txt).
5551

5652
## Copyright
5753

58-
Copyright 2021 OpenSearch Contributors
54+
Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.

RELEASING.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This project follows the [OpenSearch release process](https://github.com/opensearch-project/.github/blob/main/RELEASING.md).

SECURITY.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Reporting a Vulnerability
2+
3+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or directly via email to aws-security@amazon.com. Please do **not** create a public GitHub issue.

0 commit comments

Comments
 (0)