From 4cc748431c485c17cc221f246df3139a9cda381a Mon Sep 17 00:00:00 2001 From: Naveen Tatikonda Date: Mon, 24 Jan 2022 03:34:31 +0530 Subject: [PATCH] Copy basic template files Signed-off-by: Naveen Tatikonda --- .github/CODEOWNERS | 2 + .github/CONTRIBUTING.md | 65 --------- .github/ISSUE_TEMPLATE.md | 9 -- .github/ISSUE_TEMPLATE/BUG_TEMPLATE.md | 31 ++++ .../FEATURE_REQUEST_TEMPLATE.md | 18 +++ .github/ISSUE_TEMPLATE/PROPOSAL_TEMPLATE.md | 21 +++ .github/ISSUE_TEMPLATE/config.yml | 7 + .github/PULL_REQUEST_TEMPLATE.md | 1 - ADMINS.md | 28 ++++ CHANGELOG.md | 137 ------------------ CODE_OF_CONDUCT.md | 24 +++ CONTRIBUTING.md | 121 ++++++++++++++++ CONTRIBUTORS | 18 --- DEVELOPER_GUIDE.md | 77 ++++++++++ LICENSE => LICENSE.txt | 2 +- MAINTAINERS.md | 82 +++++++++++ NOTICE.TXT => NOTICE.txt | 0 OpenSearch.svg | 1 + PULL_REQUEST_TEMPLATE.md | 11 ++ README.md | 113 ++++----------- RELEASING.md | 111 ++++++++++++++ SECURITY.md | 3 + 22 files changed, 564 insertions(+), 318 deletions(-) create mode 100644 .github/CODEOWNERS delete mode 100644 .github/CONTRIBUTING.md delete mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/BUG_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/PROPOSAL_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 ADMINS.md delete mode 100644 CHANGELOG.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md delete mode 100644 CONTRIBUTORS create mode 100644 DEVELOPER_GUIDE.md rename LICENSE => LICENSE.txt (99%) create mode 100644 MAINTAINERS.md rename NOTICE.TXT => NOTICE.txt (100%) create mode 100644 OpenSearch.svg create mode 100644 PULL_REQUEST_TEMPLATE.md create mode 100644 RELEASING.md create mode 100644 SECURITY.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..64a9fc3 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# This should match the owning team set up in https://github.com/orgs/opensearch-project/teams +* @opensearch-project/logstash-input-opensearch \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index d325328..0000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,65 +0,0 @@ -# Contributing to Logstash - -All contributions are welcome: ideas, patches, documentation, bug reports, -complaints, etc! - -Programming is not a required skill, and there are many ways to help out! -It is more important to us that you are able to contribute. - -That said, some basic guidelines, which you are free to ignore :) - -## Want to learn? - -Want to lurk about and see what others are doing with Logstash? - -* The irc channel (#logstash on irc.freenode.org) is a good place for this -* The [forum](https://discuss.elastic.co/c/logstash) is also - great for learning from others. - -## Got Questions? - -Have a problem you want Logstash to solve for you? - -* You can ask a question in the [forum](https://discuss.elastic.co/c/logstash) -* Alternately, you are welcome to join the IRC channel #logstash on -irc.freenode.org and ask for help there! - -## Have an Idea or Feature Request? - -* File a ticket on [GitHub](https://github.com/elastic/logstash/issues). Please remember that GitHub is used only for issues and feature requests. If you have a general question, the [forum](https://discuss.elastic.co/c/logstash) or IRC would be the best place to ask. - -## Something Not Working? Found a Bug? - -If you think you found a bug, it probably is a bug. - -* If it is a general Logstash or a pipeline issue, file it in [Logstash GitHub](https://github.com/elasticsearch/logstash/issues) -* If it is specific to a plugin, please file it in the respective repository under [logstash-plugins](https://github.com/logstash-plugins) -* or ask the [forum](https://discuss.elastic.co/c/logstash). - -# Contributing Documentation and Code Changes - -If you have a bugfix or new feature that you would like to contribute to -logstash, and you think it will take more than a few minutes to produce the fix -(ie; write code), it is worth discussing the change with the Logstash users and developers first! You can reach us via [GitHub](https://github.com/elastic/logstash/issues), the [forum](https://discuss.elastic.co/c/logstash), or via IRC (#logstash on freenode irc) -Please note that Pull Requests without tests will not be merged. If you would like to contribute but do not have experience with writing tests, please ping us on IRC/forum or create a PR and ask our help. - -## Contributing to plugins - -Check our [documentation](https://www.elastic.co/guide/en/logstash/current/contributing-to-logstash.html) on how to contribute to plugins or write your own! It is super easy! - -## Contribution Steps - -1. Test your changes! [Run](https://github.com/elastic/logstash#testing) the test suite -2. Please make sure you have signed our [Contributor License - Agreement](https://www.elastic.co/contributor-agreement/). We are not - asking you to assign copyright to us, but to give us the right to distribute - your code without restriction. We ask this of all contributors in order to - assure our users of the origin and continuing existence of the code. You - only need to sign the CLA once. -3. Send a pull request! Push your changes to your fork of the repository and - [submit a pull - request](https://help.github.com/articles/using-pull-requests). In the pull - request, describe what your changes do and mention any bugs/issues related - to the pull request. - - diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index c3cc91d..0000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,9 +0,0 @@ -Please post all product and debugging questions on our [forum](https://discuss.elastic.co/c/logstash). Your questions will reach our wider community members there, and if we confirm that there is a bug, then we can open a new issue here. - -For all general issues, please provide the following details for fast resolution: - -- Version: -- Operating System: -- Config File (if you have sensitive info, please remove it): -- Sample Data: -- Steps to Reproduce: diff --git a/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md b/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md new file mode 100644 index 0000000..23ef545 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md @@ -0,0 +1,31 @@ +--- +name: 🐛 Bug report +about: Create a report to help us improve +title: '[BUG]' +labels: 'bug, untriaged' +assignees: '' +--- + +**What is the bug?** +A clear and concise description of the bug. + +**How can one reproduce the bug?** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**What is the expected behavior?** +A clear and concise description of what you expected to happen. + +**What is your host/environment?** +- OS: [e.g. iOS] +- Version [e.g. 22] +- Plugins + +**Do you have any screenshots?** +If applicable, add screenshots to help explain your problem. + +**Do you have any additional context?** +Add any other context about the problem. diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST_TEMPLATE.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..be38cd2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST_TEMPLATE.md @@ -0,0 +1,18 @@ +--- +name: 🎆 Feature request +about: Request a feature in this project +title: '[FEATURE]' +labels: enhancement +assignees: '' +--- +**Is your feature request related to a problem?** +A clear and concise description of what the problem is, e.g. _I'm always frustrated when [...]_ + +**What solution would you like?** +A clear and concise description of what you want to happen. + +**What alternatives have you considered?** +A clear and concise description of any alternative solutions or features you've considered. + +**Do you have any additional context?** +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/PROPOSAL_TEMPLATE.md b/.github/ISSUE_TEMPLATE/PROPOSAL_TEMPLATE.md new file mode 100644 index 0000000..1f89124 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/PROPOSAL_TEMPLATE.md @@ -0,0 +1,21 @@ +--- +name: 💭 Proposal +about: Suggest an idea for a specific feature you wish to propose to the community for comment +title: '[PROPOSAL]' +labels: proposal +assignees: '' +--- +## What kind of business use case are you trying to solve? What are your requirements? +A clear and concise description of the business problem, e.g. _My customers are asking for [...]_ + +**What is the problem? What is preventing you from meeting the requirements?** +Describe what impact this problem has for lack of a solution. + +**What are you proposing? What do you suggest we do to solve the problem or improve the existing situation?** +Describe your proposed solution. It's OK if you don't have one. + +**What are your assumptions or prerequisites?** +Describe any assumptions you may be making that would limit the scope of this proposal. + +**What are remaining open questions?** +List questions that may need to be answered before proceeding with an implementation. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..67f6e2a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,7 @@ +contact_links: + - name: OpenSearch Community Support + url: https://discuss.opendistrocommunity.dev/ + about: Please ask and answer questions here. + - name: AWS/Amazon Security + url: https://aws.amazon.com/security/vulnerability-reporting/ + about: Please report security vulnerabilities here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index a153827..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1 +0,0 @@ -Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/ diff --git a/ADMINS.md b/ADMINS.md new file mode 100644 index 0000000..67cbb85 --- /dev/null +++ b/ADMINS.md @@ -0,0 +1,28 @@ +## Overview + +This document explains who the admins are (see below), what they do in this repo, and how they should be doing it. If you're interested in becoming a maintainer, see [MAINTAINERS](MAINTAINERS.md). If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md). + +## Current Admins + +| Admin | GitHub ID | Affiliation | +| ---------------- | ------------------------------------------------------ | ----------- | +| Henri Yandell | [hyandell](https://github.com/hyandell) | Amazon | +| Naveen Tatikonda | [naveentatikonda](https://github.com/naveentatikonda) | Amazon | + +## Admin Responsibilities + +As an admin you own stewartship of the repository and its settings. Admins have [admin-level permissions on a repository](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization). Use those privileges to serve the community and protect the repository as follows. + +### Prioritize Security + +Security is your number one priority. Manage security keys and safeguard access to the repository. + +Note that this repository is monitored and supported 24/7 by Amazon Security, see [Reporting a Vulnerability](SECURITY.md) for details. + +### Enforce Code of Conduct + +Act on [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) violations by revoking access, and blocking malicious actors. + +### Adopt Organizational Best Practices + +Adopt organizational best practices, work in the open, and collaborate with other admins by opening issues before making process changes. Prefer consistency, and avoid diverging from practices in the opensearch-project organization. diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 693ae49..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,137 +0,0 @@ -## 4.12.1 - - Fixed too_long_frame_exception by passing scroll_id in the body [#159](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/159) - -## 4.12.0 - - Feat: Update Elasticsearch client to 7.14.0 [#157](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/157) - -## 4.11.0 - - Feat: add user-agent header passed to the Elasticsearch HTTP connection [#158](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/158) - -## 4.10.0 - - Feat: added ecs_compatibility + event_factory support [#149](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/149) - -## 4.9.3 - - Fixed SSL handshake hang indefinitely with proxy setup [#156](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/156) - -## 4.9.2 - - Fix: a regression (in LS 7.14.0) where due the elasticsearch client update (from 5.0.5 to 7.5.0) the `Authorization` - header isn't passed, this leads to the plugin not being able to leverage `user`/`password` credentials set by the user. - [#153](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/153) - - -## 4.9.1 - - [DOC] Replaced hard-coded links with shared attributes [#143](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/143) - - [DOC] Added missing quote to docinfo_fields example [#145](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/145) - -## 4.9.0 - - Added `target` option, allowing the hit's source to target a specific field instead of being expanded at the root of the event. This allows the input to play nicer with the Elastic Common Schema when the input does not follow the schema. [#117](https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/117) - -## 4.8.3 - - [DOC] Fixed links to restructured Logstash-to-cloud docs [#139](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/139) - -## 4.8.2 - - [DOC] Document the permissions required in secured clusters [#137](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/137) - -## 4.8.1 - - Fixed connection error when using multiple `slices`. [#133](https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/133) - -## 4.8.0 - - Added the ability to configure connection-, request-, and socket-timeouts with `connect_timeout_seconds`, `request_timeout_seconds`, and `socket_timeout_seconds` [#121](https://github.com/logstash-plugins/logstash-input-elasticsearch/issues/121) - -## 4.7.1 - - [DOC] Updated sliced scroll link to resolve to correct location after doc structure change [#135](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/135) - - [DOC] Added usage example of docinfo metadata [#98](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/98) - -## 4.7.0 - - Added api_key support [#131](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/131) - -## 4.6.2 - - Added scroll clearing and better handling of scroll expiration [#128](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/128) - -## 4.6.1 - - [DOC] Removed outdated compatibility notice [#124](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/124) - -## 4.6.0 - - Feat: added option to specify proxy for ES [#114](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/114) - -## 4.5.0 - - Feat: Added support for cloud_id / cloud_auth configuration [#112](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/112) - -## 4.4.0 - - Changed Elasticsearch Client transport to use Manticore [#111](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/111) - -## 4.3.3 - - Loosen restrictions on Elasticsearch gem [#110](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/110) - -## 4.3.2 - - Fixed broken link to Elasticsearch Reference [#106](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/106) - -## 4.3.1 - - Fixed deeplink to Elasticsearch Reference [#103](https://github.com/logstash-plugins/logstash-input-elasticsearch/pull/103) - -## 4.3.0 - - Added managed slice scrolling with `slices` option - -## 4.2.1 - - Docs: Set the default_codec doc attribute. - -## 4.2.0 - - Docs: Deprecate `document_type` - - Add support for scheduling periodic execution of the query #81 - -## 4.1.1 - - Update gemspec summary - -## 4.1.0 - - Enable use of docinfo (@metadata) fields in `add_field` decorations - -## 4.0.6 - - Docs: Fix link syntax - -## 4.0.5 - - Fix some documentation issues - -## 4.0.3 - - Docs: Add requirement to use version 4.0.2 or higher to support sending Content-Type headers - - Fix scrolling to use json bodies in the requests (this makes scrolling not work in ES 1.x) - -## 4.0.2 - - Bump ES client to 5.0.2 to get content-type: json behavior - - Revert unneeded manticore change - -## 4.0.1 - - Switch internal HTTP client to support TLSv1.2 - - Upgrade ES client internally to better support ES 5.x - -## 4.0.0 - - Remove `scan` from list of options as this is no longer allowed in - Elasticsearch 5.0. - - Change default query to sort by \_doc, as this replicates the `scan` - behavior - - Improve documentation to show sort by \_doc, and how to add it to custom - queries. - -## 3.0.2 - - Relax constraint on logstash-core-plugin-api to >= 1.60 <= 2.99 - -## 3.0.1 - - Republish all the gems under jruby. -## 3.0.0 - - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141 -# 2.0.5 - - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash -# 2.0.4 - - New dependency requirements for logstash-core for the 5.0 release -## 2.0.3 - - Refactored field references and cleanups - -## 2.0.0 - - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully, - instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895 - - Dependency on logstash-core update to 2.0 - -## 1.0.2 (September 3 - 2015) - - fix scan/scroll response handling - -## 1.0.1 - - refactor request logic into own method (better memory gc perf) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2e86376 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,24 @@ +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:opensource-codeofconduct@amazon.com). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e21f830 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,121 @@ +- [Contributing to OpenSearch](#contributing-to-opensearch) +- [First Things First](#first-things-first) +- [Ways to Contribute](#ways-to-contribute) + - [Bug Reports](#bug-reports) + - [Feature Requests](#feature-requests) + - [Contributing Code](#contributing-code) +- [Developer Certificate of Origin](#developer-certificate-of-origin) +- [License Headers](#license-headers) +- [Review Process](#review-process) + +## Contributing to OpenSearch + +OpenSearch is a community project that is built and maintained by people just like **you**. We're glad you're interested in helping out. There are several different ways you can do it, but before we talk about that, let's talk about how to get started. + +## First Things First + +1. **When in doubt, open an issue** - For almost any type of contribution, the first step is opening an issue. Even if you think you already know what the solution is, writing down a description of the problem you're trying to solve will help everyone get context when they review your pull request. If it's truly a trivial change (e.g. spelling error), you can skip this step -- but as the subject says, when it doubt, [open an issue](issues). + +2. **Only submit your own work** (or work you have sufficient rights to submit) - Please make sure that any code or documentation you submit is your work or you have the rights to submit. We respect the intellectual property rights of others, and as part of contributing, we'll ask you to sign your contribution with a "Developer Certificate of Origin" (DCO) that states you have the rights to submit this work and you understand we'll use your contribution. There's more information about this topic in the [DCO section](#developer-certificate-of-origin). + +## Ways to Contribute + +### Bug Reports + +Ugh! Bugs! + +A bug is when software behaves in a way that you didn't expect and the developer didn't intend. To help us understand what's going on, we first want to make sure you're working from the latest version. + +Once you've confirmed that the bug still exists in the latest version, you'll want to check to make sure it's not something we already know about on the [open issues GitHub page](issues). + +If you've upgraded to the latest version and you can't find it in our open issues list, then you'll need to tell us how to reproduce it Provide as much information as you can. You may think that the problem lies with your query, when actually it depends on how your data is indexed. The easier it is for us to recreate your problem, the faster it is likely to be fixed. + +### Feature Requests + +If you've thought of a way that OpenSearch could be better, we want to hear about it. We track feature requests using GitHub, so please feel free to open an issue which describes the feature you would like to see, why you need it, and how it should work. + +### Contributing Code + +As with other types of contributions, the first step is to [open an issue on GitHub](issues/new/choose). Opening an issue before you make changes makes sure that someone else isn't already working on that particular problem. It also lets us all work together to find the right approach before you spend a bunch of time on a PR. So again, when in doubt, open an issue. + +## Developer Certificate of Origin + +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. + +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. + +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/). + +``` +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the + best of my knowledge, is covered under an appropriate open + source license and I have the right under that license to + submit that work with modifications, whether created in whole + or in part by me, under the same open source license (unless + I am permitted to submit under a different license), as + Indicated in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including + all personal information I submit with it, including my + sign-off) is maintained indefinitely and may be redistributed + consistent with this project or the open source license(s) + involved. + ``` + +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. + +Each commit must include a DCO which looks like this + +``` +Signed-off-by: Jane Smith +``` + +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. + +## License Headers + +New files in your code contributions should contain the following license header. If you are modifying existing files with license headers, or including new files that already have license headers, do not remove or modify them without guidance. + +### Java + +``` +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +``` + +### Python +``` +# Copyright OpenSearch Contributors +# SPDX-License-Identifier: Apache-2.0 +``` + +### Shell +``` +# Copyright OpenSearch Contributors +# SPDX-License-Identifier: Apache-2.0 +``` + +## Review Process + +We deeply appreciate everyone who takes the time to make a contribution. We will review all contributions as quickly as possible. As a reminder, [opening an issue](issues/new/choose) discussing your change before you make it is the best way to smooth the PR process. This will prevent a rejection because someone else is already working on the problem, or because the solution is incompatible with the architectural direction. + +During the PR process, expect that there will be some back-and-forth. Please try to respond to comments in a timely fashion, and if you don't wish to continue with the PR, let us know. If a PR takes too many iterations for its complexity or size, we may reject it. Additionally, if you stop responding we may close the PR as abandoned. In either case, if you feel this was done in error, please add a comment on the PR. + +If we accept the PR, a [maintainer](MAINTAINERS.md) will merge your change and usually take care of backporting it to appropriate branches ourselves. + +If we reject the PR, we will close the pull request with a comment explaining why. This decision isn't always final: if you feel we have misunderstood your intended change or otherwise think that we should reconsider then please continue the conversation with a comment on the PR and we'll do our best to address any further points you raise. diff --git a/CONTRIBUTORS b/CONTRIBUTORS deleted file mode 100644 index 673b50a..0000000 --- a/CONTRIBUTORS +++ /dev/null @@ -1,18 +0,0 @@ -The following is a list of people who have contributed ideas, code, bug -reports, or in general have helped logstash along its way. - -Contributors: -* Colin Surprenant (colinsurprenant) -* Jonathan Van Eenwyk (jdve) -* Jordan Sissel (jordansissel) -* João Duarte (jsvd) -* Kurt Hurtado (kurtado) -* Luca Belluccini (lucabelluccini) -* Pier-Hugues Pellerin (ph) -* Richard Pijnenburg (electrical) -* Suyog Rao (suyograo) - -Note: If you've sent us patches, bug reports, or otherwise contributed to -Logstash, and you aren't on the list above and want to be, please let us know -and we'll make sure you're here. Contributions from folks like you are what make -open source awesome. diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md new file mode 100644 index 0000000..dbda26d --- /dev/null +++ b/DEVELOPER_GUIDE.md @@ -0,0 +1,77 @@ +# Developer Guide + +So you want to contribute code to logstash-input-opensearch? Excellent! We're glad you're here. Here's what you need to do. + +## 1. Plugin Developement and Testing + +### Code +- To get started, you'll need JRuby with the Bundler gem installed. + +- Fork [opensearch-project/logstash-input-opensearch](https://github.com/opensearch-project/logstash-input-opensearch) and clone locally. + +Example: +```bash + git clone https://github.com/[your username]/logstash-input-opensearch.git. +``` + + +- Install dependencies +```sh +bundle install +``` + +### Test + +- Update your dependencies + +```sh +bundle install +``` + +- Run tests + +```sh +bundle exec rspec +``` + +## 2. Running your unpublished Plugin in Logstash + +### 2.1 Run in a local Logstash clone + +- Edit Logstash `Gemfile` and add the local plugin path, for example: +```ruby +gem "logstash-input-opensearch", :path => "/your/local/logstash-input-opensearch" +``` +- Install plugin +```sh +# Logstash 2.3 and higher +bin/logstash-plugin install --no-verify + +# Prior to Logstash 2.3 +bin/plugin install --no-verify + +``` +- Run Logstash with your plugin +```sh +bin/logstash -e 'input {opensearch {}}' +``` +At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash. + +### 2.2 Run in an installed Logstash + +You can use the same **2.1** method to run your plugin in an installed Logstash by editing its `Gemfile` and pointing the `:path` to your local plugin development directory or you can build the gem and install it using: + +- Build your plugin gem +```sh +gem build logstash-input-opensearch.gemspec +``` +- Install the plugin from the Logstash home +```sh +# Logstash 2.3 and higher +bin/logstash-plugin install --no-verify + +# Prior to Logstash 2.3 +bin/plugin install --no-verify + +``` +- Start Logstash and proceed to test the plugin \ No newline at end of file diff --git a/LICENSE b/LICENSE.txt similarity index 99% rename from LICENSE rename to LICENSE.txt index a80a3fd..d645695 100644 --- a/LICENSE +++ b/LICENSE.txt @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020 Elastic and contributors + 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. diff --git a/MAINTAINERS.md b/MAINTAINERS.md new file mode 100644 index 0000000..03ac260 --- /dev/null +++ b/MAINTAINERS.md @@ -0,0 +1,82 @@ +- [Overview](#overview) +- [Current Maintainers](#current-maintainers) +- [Maintainer Responsibilities](#maintainer-responsibilities) + - [Uphold Code of Conduct](#uphold-code-of-conduct) + - [Prioritize Security](#prioritize-security) + - [Review Pull Requests](#review-pull-requests) + - [Triage Open Issues](#triage-open-issues) + - [Be Responsive](#be-responsive) + - [Maintain Overall Health of the Repo](#maintain-overall-health-of-the-repo) + - [Add Continuous Integration Checks](#add-continuous-integration-checks) + - [Developer Certificate of Origin Workflow](#developer-certificate-of-origin-workflow) + - [Use Semver](#use-semver) + - [Release Frequently](#release-frequently) + - [Promote Other Maintainers](#promote-other-maintainers) + - [Describe the Repo](#describe-the-repo) + +## Overview + +This document explains who the maintainers are (see below), what they do in this repo, and how they should be doing it. If you're interested in contributing, see [CONTRIBUTING](CONTRIBUTING.md). + +## Current Maintainers + +| Maintainer | GitHub ID | Affiliation | +| ------------------------ | ------------------------------------------------------ | ----------- | +| Naveen Tatikonda | [naveentatikonda](https://github.com/naveentatikonda) | Amazon | +| Vamshi Vijay Nakkirtha | [vamshin](https://github.com/vamshin) | Amazon | + +## Maintainer Responsibilities + +Maintainers are active and visible members of the community, and have [maintain-level permissions on a repository](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization). Use those privileges to serve the community and evolve code as follows. + +### Uphold Code of Conduct + +Model the behavior set forward by the [Code of Conduct](CODE_OF_CONDUCT.md) and raise any violations to other maintainers and admins. + +### Prioritize Security + +Security is your number one priority. Maintainer's Github keys must be password protected securely and any reported security vulnerabilities are addressed before features or bugs. + +Note that this repository is monitored and supported 24/7 by Amazon Security, see [Reporting a Vulnerability](SECURITY.md) for details. + +### Review Pull Requests + +Review pull requests regularly, comment, suggest, reject, merge and close. Accept only high quality pull-requests. Provide code reviews and guidance on incomming pull requests. Don't let PRs be stale and do your best to be helpful to contributors. + +### Triage Open Issues + +Manage labels, review issues regularly, and triage by labelling them. + +All repositories in this organization have a standard set of labels, including `bug`, `documentation`, `duplicate`, `enhancement`, `good first issue`, `help wanted`, `blocker`, `invalid`, `question`, `wontfix`, and `untriaged`, along with release labels, such as `v1.0.0`, `v1.1.0`, `v2.0.0`, `patch`, and `backport`. + +Use labels to target an issue or a PR for a given release, add `help wanted` to good issues for new community members, and `blocker` for issues that scare you or need immediate attention. Request for more information from a submitter if an issue is not clear. Create new labels as needed by the project. + +### Be Responsive + +Respond to enhancement requests, and forum posts. Allocate time to reviewing and commenting on issues and conversations as they come in. + +### Maintain Overall Health of the Repo + +Keep the `main` branch at production quality at all times. Backport features as needed. Cut release branches and tags to enable future patches. + +### Add Continuous Integration Checks + +Add integration checks that validate pull requests and pushes to ease the burden on Pull Request reviewers. + +#### Developer Certificate of Origin Workflow + +Validates pull requests commits are all signed with DCO, [dco.yml](./workflow/dco.yml). Example [pull request](https://github.com/opensearch-project/opensearch-ci/pull/16). + +### Use Semver + +Use and enforce [semantic versioning](https://semver.org/) and do not let breaking changes be made outside of major releases. + +### Release Frequently + +Make frequent project releases to the community. + +### Promote Other Maintainers + +Assist, add, and remove [MAINTAINERS](MAINTAINERS.md). Exercise good judgement, and propose high quality contributors to become co-maintainers. + +### Describe the Repo diff --git a/NOTICE.TXT b/NOTICE.txt similarity index 100% rename from NOTICE.TXT rename to NOTICE.txt diff --git a/OpenSearch.svg b/OpenSearch.svg new file mode 100644 index 0000000..ad4c18d --- /dev/null +++ b/OpenSearch.svg @@ -0,0 +1 @@ + diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..f88c935 --- /dev/null +++ b/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +### Description +[Describe what this change achieves] + +### Issues Resolved +[List any issues this PR will resolve] + +### Check List +- [ ] Commits are signed per the DCO using --signoff + +By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. +For more information on following Developer Certificate of Origin and signing off your commits, please check [here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). diff --git a/README.md b/README.md index c6a17d4..bb50bae 100644 --- a/README.md +++ b/README.md @@ -1,99 +1,38 @@ -# Logstash Plugin +# Logstash Input OpenSearch -[![Gem Version](https://badge.fury.io/rb/logstash-input-elasticsearch.svg)](https://badge.fury.io/rb/logstash-input-elasticsearch) -[![Travis Build Status](https://travis-ci.com/logstash-plugins/logstash-input-elasticsearch.svg)](https://travis-ci.com/logstash-plugins/logstash-input-elasticsearch) +- [Welcome!](#welcome) +- [Project Resources](#project-resources) +- [Code of Conduct](#code-of-conduct) +- [License](#license) +- [Copyright](#copyright) -This is a plugin for [Logstash](https://github.com/elastic/logstash). +## Welcome! -It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way. +**logstash-input-opensearch** is a community-driven, open source fork logstash-input-elasticsearch licensed under the [Apache v2.0 License](LICENSE). For more information, see [opensearch.org](https://opensearch.org/). -## Documentation +The logstash-input-opensearch plugin helps to read the search query results performed on an OpenSearch cluster. This is useful for replaying test logs, reindexing, etc. This helps users to run the query one time to load data into Logstash. -Logstash provides infrastructure to automatically generate documentation for this plugin. We use the asciidoc format to write documentation so any comments in the source code will be first converted into asciidoc and then into html. All plugin documentation are placed under one [central location](http://www.elastic.co/guide/en/logstash/current/). +## Project Resources -- For formatting code or config example, you can use the asciidoc `[source,ruby]` directive -- For more asciidoc formatting tips, see the excellent reference here https://github.com/elastic/docs#asciidoc-guide +* [Project Website](https://opensearch.org/) +* [Documentation](https://opensearch.org/docs/clients/logstash/index/) +* [Developer Guide](DEVELOPER_GUIDE.md) +* Need help? Try [Forums](https://discuss.opendistrocommunity.dev/) +* [Project Principles](https://opensearch.org/#principles) +* [Contributing to OpenSearch](CONTRIBUTING.md) +* [Maintainer Responsibilities](MAINTAINERS.md) +* [Release Management](RELEASING.md) +* [Admin Responsibilities](ADMINS.md) +* [Security](SECURITY.md) -## Need Help? +## Code of Conduct -Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/logstash discussion forum. +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. -## Developing +## License -### 1. Plugin Developement and Testing +This project is licensed under the [Apache v2.0 License](LICENSE.txt). -#### Code -- To get started, you'll need JRuby with the Bundler gem installed. +## Copyright -- Create a new plugin or clone and existing from the GitHub [logstash-plugins](https://github.com/logstash-plugins) organization. We also provide [example plugins](https://github.com/logstash-plugins?query=example). - -- Install dependencies -```sh -bundle install -``` - -#### Test - -- Update your dependencies - -```sh -bundle install -``` - -- Run tests - -```sh -bundle exec rspec -``` - -### 2. Running your unpublished Plugin in Logstash - -#### 2.1 Run in a local Logstash clone - -- Edit Logstash `Gemfile` and add the local plugin path, for example: -```ruby -gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome" -``` -- Install plugin -```sh -# Logstash 2.3 and higher -bin/logstash-plugin install --no-verify - -# Prior to Logstash 2.3 -bin/plugin install --no-verify - -``` -- Run Logstash with your plugin -```sh -bin/logstash -e 'filter {awesome {}}' -``` -At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash. - -#### 2.2 Run in an installed Logstash - -You can use the same **2.1** method to run your plugin in an installed Logstash by editing its `Gemfile` and pointing the `:path` to your local plugin development directory or you can build the gem and install it using: - -- Build your plugin gem -```sh -gem build logstash-filter-awesome.gemspec -``` -- Install the plugin from the Logstash home -```sh -# Logstash 2.3 and higher -bin/logstash-plugin install --no-verify - -# Prior to Logstash 2.3 -bin/plugin install --no-verify - -``` -- Start Logstash and proceed to test the plugin - -## Contributing - -All contributions are welcome: ideas, patches, documentation, bug reports, complaints, and even something you drew up on a napkin. - -Programming is not a required skill. Whatever you've seen about open source and maintainers or community members saying "send patches or die" - you will not see that here. - -It is more important to the community that you are able to contribute. - -For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file. +Copyright OpenSearch Contributors. See [NOTICE](NOTICE.txt) for details. diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 0000000..2d415e2 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,111 @@ +- [Overview](#overview) +- [Branching](#branching) + - [OpenSearch Branching](#opensearch-branching) + - [Plugin Branching](#plugin-branching) + - [Feature Branches](#feature-branches) +- [Versioning](#versioning) + - [Version Numbers](#version-numbers) + - [Incrementing Versions](#incrementing-versions) +- [Tagging](#tagging) +- [Release Labels](#release-labels) +- [Releasing](#releasing) +- [Backporting](#backporting) + +## Overview + +This document explains the release strategy for artifacts in this organization. + +## Branching + +Projects create a new branch when they need to start working on 2 separate versions of the product, with the `main` branch being the furthermost release. + +### OpenSearch Branching + +[OpenSearch](https://github.com/opensearch-project/OpenSearch) typically tracks 3 releases in parallel. For example, given the last major release of 1.0, OpenSearch in this organization maintains the following active branches. + +* **main**: The _next major_ release, currently 2.0. This is the branch where all merges take place, and code moves fast. +* **1.x**: The _next minor_ release, currently 1.1. Once a change is merged into `main`, decide whether to backport it to `1.x`. +* **1.0**: The _current_ release, currently 1.0. In between minor releases, only hotfixes (e.g. security) are backported to `1.0`. The next release out of this branch will be 1.0.1. + +Label PRs with the next major version label (e.g. `2.0.0`) and merge changes into `main`. Label PRs that you believe need to be backported as `1.x` and `1.0`. Backport PRs by checking out the versioned branch, cherry-pick changes and open a PR against each target backport branch. + +### Plugin Branching + +Plugins, such as [job-scheduler](https://github.com/opensearch-project/job-scheduler) aren't as active as OpenSearch, and typically track 2 releases in parallel instead of 3. This still translates into 3 branches. For example, given the last major release of 1.0, job-scheduler maintains the following. + +* **main**: The _next_ release, currently 1.1. This is the branch where all merges take place, and code moves fast. +* **1.x**: A common parent branch for the series of 1.x releases. This is where 1.x patches will be made when `main` becomes 2.0. +* **1.0**: The _current_ release, currently 1.0. This branch's parent is `1.x` to make future merges easier. 'In between minor releases, only hotfixes (e.g. security) are backported to `1.0`. The next release out of this branch will be 1.0.1. + +### Feature Branches + +Do not creating branches in the upstream repo, use your fork, for the exception of long lasting feature branches that require active collaboration from multiple developers. Name feature branches `feature/`. Once the work is merged to `main`, please make sure to delete the feature branch. + +## Versioning + +OpenSearch versioning [follows semver](https://opensearch.org/blog/technical-post/2021/08/what-is-semver/). + +### Version Numbers + +The build number of the engine is 3-digit `major.minor.patch` (e.g. `1.1.0`), while plugins use 4 digits (`1.1.0.45`). See [OpenSearch#1093](https://github.com/opensearch-project/OpenSearch/issues/1093) for a proposal to remove this difference. + +### Incrementing Versions + +Versions are incremented as soon as development starts on a given version to avoid confusion. In the examples above versions are as follows. + +* OpenSearch: `main` = 2.0.0, `1.x` = 1.1.0, and `1.0` = 1.0.0 +* job-scheduler: `main` = 1.1.0.0, `1.0` = 1.0.0.0 + +## Tagging + +Create tags after a release that match the version number, `major.minor.patch`, without a `v` prefix. + +* [OpenSearch tags](https://github.com/opensearch-project/OpenSearch/tags): [1.0.0](https://github.com/opensearch-project/OpenSearch/releases/tag/1.0.0) +* [job-scheduler tags](https://github.com/opensearch-project/job-scheduler/tags): [1.0.0.0](https://github.com/opensearch-project/job-scheduler/releases/tag/1.0.0.0) + +For a discussion on whether to add a prefixing `v` to release tags, see [#35](https://github.com/opensearch-project/.github/issues/35). + +## Release Labels + +Repositories create consistent release labels, such as `v1.0.0`, `v1.1.0` and `v2.0.0`, as well as `patch` and `backport`. Use release labels to target an issue or a PR for a given release. See [MAINTAINERS](MAINTAINERS.md#triage-open-issues) for more information on triaging issues. + +## Releasing + +The OpenSearch release process is centralized. + +1. Two candidate bundle builds for OpenSearch and OpenSearch Dashboards, produced by [bundle-workflow](https://github.com/opensearch-project/opensearch-build/blob/main/bundle-workflow/README.md), are chosen as release candidates. Those artifacts have successful end-to-end integration, backwards-compatibility and performance tests, and are signed. +2. Staged maven artifacts are promoted to Maven Central. +3. Bundles and -min artifacts are published to [opensearch.org](https://opensearch.org/downloads.html). + +## Backporting + +This project follows [semantic versioning](https://semver.org/spec/v2.0.0.html). Backwards-incompatible changes always result in a new major version and will __never__ be backported. Small improvements and features will be backported to a new minor version (e.g. `1.1`). Security fixes will be backported to a new patch version (e.g. `1.0.1`). + +Here are the commands we typically run to backport changes to release branches: + +1. Checkout the target release branch and pull the latest changes from `upstream`. In the examples below, our target release branch is `1.x`. + +``` +git checkout 1.x +git pull upstream 1.x +``` + +2. Create a local branch for the backport. A convenient naming convention is _backport-\[PR-id\]-\[target-release-branch\]_. + +``` +git checkout -b backport-pr-xyz-1.x +``` + +3. Cherry-pick the commit to backport. Remember to include [DCO signoff](CONTRIBUTING.md#developer-certificate-of-origin). + +``` +git cherry-pick -s +``` + +4. Push the local branch to your fork. + +``` +git push origin backport-pr-xyz-1.x +``` + +5. Create a pull request for the change. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..b862921 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,3 @@ +## Reporting a Vulnerability + +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.