Skip to content

Commit 0c4023f

Browse files
author
Aditya Jindal
committed
Standardizing Files
Signed-off-by: Aditya Jindal <[email protected]>
1 parent bc4369a commit 0c4023f

14 files changed

+160
-114
lines changed

CONTRIBUTING.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
OpenSearch is a community project that is built and maintained by people just like **you**.
2+
[This document](https://github.com/opensearch-project/.github/blob/main/CONTRIBUTING.md) explains how you can contribute to this and related projects.
3+
14
# Contributing Guidelines
25

36
Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional
@@ -21,7 +24,7 @@ reported the issue. Please try to include as much information as you can. Detail
2124

2225
## Developer Certificate of Origin
2326

24-
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 file](./LICENSE)). The Apache 2.0 license allows you to freely use, modify, distribute, and sell your own products that include Apache 2.0 licensed software.
27+
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 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.
2528

2629
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.
2730

@@ -80,8 +83,8 @@ To send us a pull request, please:
8083
5. Send us a pull request, answering any default questions in the pull request interface.
8184
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
8285

83-
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
84-
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
86+
GitHub provides additional document on [forking a repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo) and
87+
[creating a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).
8588

8689

8790
## Finding contributions to work on
@@ -100,6 +103,6 @@ If you discover a potential security issue in this project we ask that you notif
100103

101104
## Licensing
102105

103-
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
106+
See the [LICENSE](LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
104107

105108
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.

DEVELOPER_GUIDE.md

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Notifications plugin for OpenSearch
2+
3+
## Overview
4+
Notifications plugin for OpenSearch enables other plugins to send notifications via Email, Slack, Amazon Chime, Custom web-hook etc channels
5+
6+
## Highlights
7+
8+
1. Supports sending email with attachment (PDF, PNG, CSV, etc).
9+
1. Supports sending multipart email with Text and HTML body with full Embedded HTML support.
10+
1. Supports cross-plugin calls to send notifications (without re-implementing).
11+
1. Supports tracking the number of email sent from this plugin and throttling based on it.
12+
13+
## Documentation
14+
15+
Please see our [documentation](https://opendistro.github.io/for-elasticsearch-docs/).
16+
17+
## Setup
18+
19+
1. Check out this package from version control.
20+
1. Launch Intellij IDEA, choose **Import Project**, and select the `settings.gradle` file in the root of this package.
21+
1. To build from the command line, set `JAVA_HOME` to point to a JDK >= 14 before running `./gradlew`.
22+
23+
### Setup email notification using localhost email relay/server
24+
25+
1. Run local email server on the machine where OpenSearch is running. e.g. for Mac, run command `sudo postfix start`
26+
1. Verify that local email server does not require any authentication (Make sure server is listening on local port only)
27+
1. Update the `notification.yml` configuration file according to your setup
28+
29+
### Setup Amazon SES and SDK
30+
31+
While using Amazon SES as email channel for sending mail, use below procedure for SES setup and configure environment.
32+
33+
1. [Setup Amazon SES account](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sign-up-for-aws.html)
34+
1. [Verify Email address](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses-procedure.html)
35+
1. [Create IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-role-ec2) with [Allowing Access to Email-Sending Actions Only](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/control-user-access.html) `Action` required are `SendEmail` and `SendRawEmail`.
36+
1. While using command line [configure AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) [Refer Best practices](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html)
37+
1. [Use Amazon EC2 IAM role to grant permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html) while using EC2
38+
39+
## Build
40+
41+
This project uses following tools
42+
43+
1. [Gradle](https://docs.gradle.org/current/userguide/userguide.html) build system. Gradle comes with an excellent documentation that should be your first stop when trying to figure out how to operate or modify the build.
44+
1. 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. If you encounter such a situation, the OpenSearch build tools is your best bet for figuring out what's going on.
45+
46+
### Building from the command line
47+
48+
1. `./gradlew build` builds and tests project.
49+
1. `./gradlew run` launches a single node cluster with the `notifications` plugin installed.
50+
1. `./gradlew run -PnumNodes=3` launches a multi-node cluster (3 nodes) with the `notifications` plugin installed.
51+
1. `./gradlew integTest` launches a single node cluster with the `notifications` plugin installed and runs all integ tests.
52+
1. `./gradlew integTest -PnumNodes=3` launches a multi-node cluster with the `notifications` plugin installed and runs all integ tests.
53+
1. `./gradlew integTest -Dtests.class="*RunnerIT"` runs a single integ test class
54+
1. `./gradlew integTest -Dtests.method="test execute * with dryrun"` runs a single integ test method
55+
(remember to quote the test method name if it contains spaces).
56+
57+
When launching a cluster using above commands, logs are placed in `notifications/build/testclusters/integTest-0/logs/`.
58+
59+
#### Run integration tests with Security enabled
60+
61+
1. Setup a local OpenSearch cluster with security plugin.
62+
- `./gradlew build`
63+
- `./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=opensearch-integrationtest -Dhttps=true -Duser=admin -Dpassword=admin`
64+
- `./gradlew integTestRunner -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=opensearch-integrationtest -Dhttps=true -Duser=admin -Dpassword=admin --tests "<test name>"`
65+
66+
### Debugging
67+
68+
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, hit **Debug** from the IDE's gutter to debug the tests.
69+
You must start your debugger to listen for remote JVM before running the below commands.
70+
71+
To debug code running in an actual server, run:
72+
73+
```
74+
./gradlew integTest -Dopensearch.debug # to start a cluster and run integ tests
75+
```
76+
77+
OR
78+
79+
```
80+
./gradlew run --debug-jvm # to just start a cluster that can be debugged
81+
```
82+
83+
The OpenSearch server JVM will launch suspended and wait for a debugger to attach to `localhost:5005` before starting the OpenSearch server.
84+
The IDE needs to listen for the remote JVM. If using Intellij you must set your debug-configuration to "Listen to remote JVM" and make sure "Auto Restart" is checked.
85+
You must start your debugger to listen for remote JVM before running the commands.
86+
87+
To debug code running in an integ test (which exercises the server from a separate JVM), run:
88+
89+
```
90+
./gradlew -Dtest.debug integTest
91+
```
92+
93+
The test runner JVM will start suspended and wait for a debugger to attach to `localhost:5005` before running the tests.
94+
95+
96+
### Advanced: Launching multi-node clusters locally
97+
98+
Sometimes you need to launch a cluster with more than one OpenSearch server process.
99+
100+
You can do this by running `./gradlew run -PnumNodes=<numberOfNodesYouWant>`
101+
102+
You can also run the integration tests against a multi-node cluster by running `./gradlew integTest -PnumNodes=<numberOfNodesYouWant>`
103+
104+
You can also debug a multi-node cluster, by using a combination of above multi-node and debug steps.
105+
You must set up debugger configurations to listen on each port starting from `5005` and increasing by 1 for each node.
106+
107+
## Code of Conduct
108+
109+
See [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for more information.
110+
111+
## Security
112+
113+
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
114+
115+
## License
116+
117+
This project is licensed under the Apache-2.0 License. See [LICENSE](LICENSE.txt) for more information.
118+
119+
## Notice
120+
121+
See [NOTICE](NOTICE.txt) for more information.
122+
123+
## Copyright
124+
125+
Copyright OpenSearch Contributors. See [NOTICE](NOTICE.txt) for details.

LICENSE LICENSE.txt

File renamed without changes.

MAINTAINERS.md

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Notifications Maintainers
2-
31
## Maintainers
42
| Maintainer | GitHub ID | Affiliation |
53
|------------------------|---------------------------------------------------|-------------|

NOTICE NOTICE.txt

File renamed without changes.

README.md

+21-105
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,44 @@
11
[![codecov](https://codecov.io/gh/opensearch-project/notifications/branch/develop/graph/badge.svg?token=NYBFN3EFE4)](https://codecov.io/gh/opensearch-project/notifications)
2+
[![Chat](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev)
3+
![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)
24

5+
<img src="https://opensearch.org/assets/brand/SVG/Logo/opensearch_logo_default.svg" height="64px"/>
36

4-
# Notifications plugin for OpenSearch
7+
- [OpenSearch Notifications](#opensearch-notifications)
8+
- [Highlights](#highlights)
9+
- [Documentation](#documentation)
10+
- [Contributing](#contributing)
11+
- [Code of Conduct](#code-of-conduct)
12+
- [Security](#security)
13+
- [License](#license)
14+
- [Copyright](#copyright)
515

6-
## Overview
7-
Notifications plugin for OpenSearch enables other plugins to send notifications via Email, Slack, Amazon Chime, Custom web-hook etc channels
8-
9-
## Highlights
10-
11-
1. Supports sending email with attachment (PDF, PNG, CSV, etc).
12-
1. Supports sending multipart email with Text and HTML body with full Embedded HTML support.
13-
1. Supports cross-plugin calls to send notifications (without re-implementing).
14-
1. Supports tracking the number of email sent from this plugin and throttling based on it.
16+
# OpenSearch Notifications
1517

1618
## Documentation
1719

18-
Please see our [documentation](https://opendistro.github.io/for-elasticsearch-docs/).
19-
20-
## Setup
21-
22-
1. Check out this package from version control.
23-
1. Launch Intellij IDEA, choose **Import Project**, and select the `settings.gradle` file in the root of this package.
24-
1. To build from the command line, set `JAVA_HOME` to point to a JDK >= 14 before running `./gradlew`.
25-
26-
### Setup email notification using localhost email relay/server
27-
28-
1. Run local email server on the machine where OpenSearch is running. e.g. for Mac, run command `sudo postfix start`
29-
1. Verify that local email server does not require any authentication (Make sure server is listening on local port only)
30-
1. Update the `notification.yml` configuration file according to your setup
31-
32-
### Setup Amazon SES and SDK
33-
34-
While using Amazon SES as email channel for sending mail, use below procedure for SES setup and configure environment.
35-
36-
1. [Setup Amazon SES account](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sign-up-for-aws.html)
37-
1. [Verify Email address](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-email-addresses-procedure.html)
38-
1. [Create IAM role](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-service-role-ec2) with [Allowing Access to Email-Sending Actions Only](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/control-user-access.html) `Action` required are `SendEmail` and `SendRawEmail`.
39-
1. While using command line [configure AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html) [Refer Best practices](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html)
40-
1. [Use Amazon EC2 IAM role to grant permissions](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html) while using EC2
41-
42-
## Build
43-
44-
This project uses following tools
45-
46-
1. [Gradle](https://docs.gradle.org/current/userguide/userguide.html) build system. Gradle comes with an excellent documentation that should be your first stop when trying to figure out how to operate or modify the build.
47-
1. 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. If you encounter such a situation, the OpenSearch build tools is your best bet for figuring out what's going on.
48-
49-
### Building from the command line
50-
51-
1. `./gradlew build` builds and tests project.
52-
1. `./gradlew run` launches a single node cluster with the `notifications` plugin installed.
53-
1. `./gradlew run -PnumNodes=3` launches a multi-node cluster (3 nodes) with the `notifications` plugin installed.
54-
1. `./gradlew integTest` launches a single node cluster with the `notifications` plugin installed and runs all integ tests.
55-
1. `./gradlew integTest -PnumNodes=3` launches a multi-node cluster with the `notifications` plugin installed and runs all integ tests.
56-
1. `./gradlew integTest -Dtests.class="*RunnerIT"` runs a single integ test class
57-
1. `./gradlew integTest -Dtests.method="test execute * with dryrun"` runs a single integ test method
58-
(remember to quote the test method name if it contains spaces).
59-
60-
When launching a cluster using above commands, logs are placed in `notifications/build/testclusters/integTest-0/logs/`.
61-
62-
#### Run integration tests with Security enabled
20+
#### TODO: Create Documentation
21+
Please see our [documentation](https://opensearch.org/docs/latest/).
6322

64-
1. Setup a local ODFE cluster with security plugin.
65-
- `./gradlew build`
66-
- `./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=opensearch-integrationtest -Dhttps=true -Duser=admin -Dpassword=admin`
67-
- `./gradlew integTestRunner -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=opensearch-integrationtest -Dhttps=true -Duser=admin -Dpassword=admin --tests "<test name>"`
23+
## Contributing
6824

69-
### Debugging
7025

71-
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, hit **Debug** from the IDE's gutter to debug the tests.
72-
You must start your debugger to listen for remote JVM before running the below commands.
73-
74-
To debug code running in an actual server, run:
75-
76-
```
77-
./gradlew integTest -Dopensearch.debug # to start a cluster and run integ tests
78-
```
79-
80-
OR
81-
82-
```
83-
./gradlew run --debug-jvm # to just start a cluster that can be debugged
84-
```
85-
86-
The OpenSearch server JVM will launch suspended and wait for a debugger to attach to `localhost:5005` before starting the OpenSearch server.
87-
The IDE needs to listen for the remote JVM. If using Intellij you must set your debug-configuration to "Listen to remote JVM" and make sure "Auto Restart" is checked.
88-
You must start your debugger to listen for remote JVM before running the commands.
89-
90-
To debug code running in an integ test (which exercises the server from a separate JVM), run:
91-
92-
```
93-
./gradlew -Dtest.debug integTest
94-
```
95-
96-
The test runner JVM will start suspended and wait for a debugger to attach to `localhost:5005` before running the tests.
97-
98-
99-
### Advanced: Launching multi-node clusters locally
100-
101-
Sometimes you need to launch a cluster with more than one OpenSearch server process.
102-
103-
You can do this by running `./gradlew run -PnumNodes=<numberOfNodesYouWant>`
104-
105-
You can also run the integration tests against a multi-node cluster by running `./gradlew integTest -PnumNodes=<numberOfNodesYouWant>`
106-
107-
You can also debug a multi-node cluster, by using a combination of above multi-node and debug steps.
108-
You must set up debugger configurations to listen on each port starting from `5005` and increasing by 1 for each node.
26+
See [developer guide](DEVELOPER_GUIDE.md) and [how to contribute to this project](CONTRIBUTING.md).
10927

11028
## Code of Conduct
11129

112-
See [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for more information.
30+
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 [[email protected]](mailto:[email protected]) with any additional questions or comments.
11331

11432
## Security
11533

116-
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
34+
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.
11735

11836
## License
11937

120-
This project is licensed under the Apache-2.0 License. See [LICENSE](LICENSE) for more information.
38+
This project is licensed under the [Apache v2.0 License](LICENSE.txt).
12139

122-
## Notice
40+
## Copyright
12341

124-
See [NOTICE](NOTICE) for more information.
42+
Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
12543

126-
## Copyright
12744

128-
Copyright OpenSearch Contributors. See [NOTICE](NOTICE) for details.

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 [email protected]. Please do **not** create a public GitHub issue.

dashboards-notifications/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ This code is licensed under the Apache 2.0 License.
6262

6363
## Copyright
6464

65-
Copyright OpenSearch Contributors. See [NOTICE](../NOTICE) for details.
65+
Copyright OpenSearch Contributors. See [NOTICE](../NOTICE.txt) for details.
File renamed without changes.
File renamed without changes.
File renamed without changes.

notifications/core-spi/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ apply plugin: 'org.jetbrains.kotlin.plugin.allopen'
2727

2828
ext {
2929
projectSubstitutions = [:]
30-
licenseFile = rootProject.file('LICENSE')
31-
noticeFile = rootProject.file('NOTICE')
30+
licenseFile = rootProject.file('LICENSE.txt')
31+
noticeFile = rootProject.file('NOTICE.txt')
3232
}
3333

3434
task sourcesJar(type: Jar) {

0 commit comments

Comments
 (0)