Skip to content

Commit 7fad952

Browse files
Release 1.0.0.0 (#40)
Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
1 parent 894c669 commit 7fad952

9 files changed

+166
-178
lines changed

.github/workflows/links.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Link Checker
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
linkchecker:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: lychee Link Checker
14+
id: lychee
15+
uses: lycheeverse/lychee-action@master
16+
with:
17+
args: --accept=200,403,429 "**/*.html" "**/*.md" "**/*.txt" "**/*.json"
18+
env:
19+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
20+
- name: Fail if there were link errors
21+
run: exit ${{ steps.lychee.outputs.exit_code }}

ADMINS.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## Admins
2+
3+
| Admin | GitHub ID | Affiliation |
4+
| --------------- | --------------------------------------- | ----------- |
5+
| Henri Yandell | [hyandell](https://github.com/hyandell) | Amazon |
6+
7+
[This document](https://github.com/opensearch-project/.github/blob/main/ADMINS.md) explains what admins 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).

CONTRIBUTING.md

+3-138
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,4 @@
1-
# Contributing Guidelines
1+
# Contributing to this project
22

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](https://github.com/opensearch-project/job-scheduler/issues), or [recently closed](https://github.com/opensearch-project/job-scheduler/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), 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 *main* 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'](https://github.com/opensearch-project/job-scheduler/labels/help%20wanted) issues is a great place to start.
45-
46-
47-
## Code of Conduct
48-
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
49-
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
50-
opensource-codeofconduct@amazon.com with any additional questions or comments.
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-
By making a contribution to this project, I certify that:
63-
(a) The contribution was created in whole or in part by me and I
64-
have the right to submit it under the open source license
65-
indicated in the file; or
66-
(b) The contribution is based upon previous work that, to the
67-
best of my knowledge, is covered under an appropriate open
68-
source license and I have the right under that license to
69-
submit that work with modifications, whether created in whole
70-
or in part by me, under the same open source license (unless
71-
I am permitted to submit under a different license), as
72-
Indicated in the file; or
73-
(c) The contribution was provided directly to me by some other
74-
person who certified (a), (b) or (c) and I have not modified
75-
it.
76-
(d) I understand and agree that this project and the contribution
77-
are public and that a record of the contribution (including
78-
all personal information I submit with it, including my
79-
sign-off) is maintained indefinitely and may be redistributed
80-
consistent with this project or the open source license(s)
81-
involved.
82-
```
83-
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.
84-
85-
Each commit must include a DCO which looks like this
86-
87-
```
88-
Signed-off-by: Jane Smith <jane.smith@email.com>
89-
```
90-
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.
91-
92-
## Security issue notifications
93-
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.
94-
95-
## Developer Certificate of Origin
96-
97-
OpenSearch Common Utils 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.
98-
99-
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.
100-
101-
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/).
102-
103-
```
104-
Developer's Certificate of Origin 1.1
105-
By making a contribution to this project, I certify that:
106-
(a) The contribution was created in whole or in part by me and I
107-
have the right to submit it under the open source license
108-
indicated in the file; or
109-
(b) The contribution is based upon previous work that, to the
110-
best of my knowledge, is covered under an appropriate open
111-
source license and I have the right under that license to
112-
submit that work with modifications, whether created in whole
113-
or in part by me, under the same open source license (unless
114-
I am permitted to submit under a different license), as
115-
Indicated in the file; or
116-
(c) The contribution was provided directly to me by some other
117-
person who certified (a), (b) or (c) and I have not modified
118-
it.
119-
(d) I understand and agree that this project and the contribution
120-
are public and that a record of the contribution (including
121-
all personal information I submit with it, including my
122-
sign-off) is maintained indefinitely and may be redistributed
123-
consistent with this project or the open source license(s)
124-
involved.
125-
```
126-
We require that every contribution to OpenSearch Common Utils is signed with a Developer Certificate of Origin. Additionally, please use your real name. We do not accept anonymous contributors nor those utilizing pseudonyms.
127-
128-
Each commit must include a DCO which looks like this
129-
130-
```
131-
Signed-off-by: Jane Smith <jane.smith@email.com>
132-
```
133-
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.
134-
135-
## Licensing
136-
137-
See the [LICENSE](https://github.com/opensearch-project/job-scheduler/blob/main/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
138-
139-
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.
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

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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+
- [Debugging](#debugging)
9+
- [Using IntelliJ IDEA](#using-intellij-idea)
10+
- [Submitting Changes](#submitting-changes)
11+
12+
## Developer Guide
13+
14+
So you want to contribute code to this project? Excellent! We're glad you're here. Here's what you need to do.
15+
16+
### Forking and Cloning
17+
18+
Fork this repository on GitHub, and clone locally with `git clone`.
19+
20+
### Install Prerequisites
21+
22+
#### JDK 14
23+
24+
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`.
25+
26+
## Setup
27+
28+
1. Check out this package from version control.
29+
2. Launch Intellij IDEA, choose **Import Project**, and select the `settings.gradle` file in the root of this package.
30+
3. To build from the command line, set `JAVA_HOME` to point to a JDK >= 14 before running `./gradlew`.
31+
- Unix System
32+
1. `export JAVA_HOME=jdk-install-dir`: Replace `jdk-install-dir` with the JAVA_HOME directory of your system.
33+
2. `export PATH=$JAVA_HOME/bin:$PATH`
34+
35+
- Windows System
36+
1. Find **My Computers** from file directory, right click and select **properties**.
37+
2. Select the **Advanced** tab, select **Environment variables**.
38+
3. Edit **JAVA_HOME** to path of where JDK software is installed.
39+
40+
## Build
41+
The JobScheduler plugin uses the [Gradle](https://docs.gradle.org/4.10.2/userguide/userguide.html)
42+
build system.
43+
1. Checkout this package from version control.
44+
1. To build from command line set `JAVA_HOME` to point to a JDK >=14
45+
1. Run `./gradlew build`
46+
47+
Then you will find the built artifact located at `build/distributions` directory
48+
49+
## Install
50+
Once you have built the plugin from source code, run
51+
```bash
52+
opensearch-plugin install file://${PLUGIN_ZIP_FILE_PATH}
53+
```
54+
to install the JobScheduler plugin to your OpenSearch.
55+
56+
## Develop a plugin that extends JobScheduler
57+
JobScheduler plugin provides a SPI for other plugins to implement. Essentially, you need to
58+
1. Define your *JobParameter* type by implementing `ScheduledJobParameter` interface
59+
1. Implement your JobParameter parser function that can deserialize your JobParameter from XContent
60+
1. Create your *JobRunner* implementation by implementing `ScheduledJobRunner` interface
61+
1. Create your own plugin which implements `JobSchedulerExtension` interface
62+
- don't forget to create the service provider configuration file in your resources folder and
63+
bundle it into your plugin artifact
64+
65+
Please refer to the `sample-extension-plugin` subproject in this project, which provides a complete
66+
example of using JobScheduler to run periodical jobs.
67+
68+
The sample extension plugin takes an index name as input and logs the index shards to opensearch
69+
logs according to the specified Schedule. And it also exposes a REST endpoint for end users to
70+
create/delete jobs.
71+
72+
73+
### Using IntelliJ IDEA
74+
75+
Launch Intellij IDEA, choose **Import Project**, and select the `settings.gradle` file in the root of this package.
76+
77+
### Submitting Changes
78+
79+
See [CONTRIBUTING](CONTRIBUTING.md).

MAINTAINERS.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# OpenSearch Job Scheduler Maintainers
2-
31
## Maintainers
42
| Maintainer | GitHub ID | Affiliation |
3+
| --------------- | --------- | ----------- |
54
| Ashish Agrawal | [lezzago](https://github.com/lezzago) | Amazon |
65
| Bowen Lan | [bowenlan-amzn](https://github.com/bowenlan-amzn) | Amazon |
76
| Drew Baugher | [dbbaughe](https://github.com/dbbaughe) | Amazon |
87
| Mohammad Qureshi | [qreshi](https://github.com/qreshi) | Amazon |
98
| Sriram Kosuri | [skkosuri-amzn](https://github.com/skkosuri-amzn) | Amazon |
10-
| --------------- | --------- | ----------- |
9+
10+
[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

+31-37
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,50 @@
1+
[![Test and Build Workflow](https://github.com/opensearch-project/job-scheduler/workflows/Build%20and%20Test/badge.svg)](https://github.com/opensearch-project/job-scheduler/actions)
2+
[![codecov](https://codecov.io/gh/opensearch-project/job-scheduler/branch/main/graph/badge.svg)](https://codecov.io/gh/opensearch-project/job-scheduler)
3+
![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)
4+
5+
<img src="https://opensearch.org/assets/brand/SVG/Logo/opensearch_logo_default.svg" height="64px"/>
6+
7+
- [OpenSearch Job Scheduler](#opensearch-job-scheduler)
8+
- [Contributing](#contributing)
9+
- [Getting Help](#getting-help)
10+
- [Code of Conduct](#code-of-conduct)
11+
- [Security](#security)
12+
- [License](#license)
13+
- [Copyright](#copyright)
14+
115
# OpenSearch Job Scheduler
216

317
OpenSearch JobScheduler plugin provides a framework for OpenSearch plugin
418
developers to schedule periodical jobs running within OpenSearch nodes. You can schedule jobs
519
by specify an interval, or using Unix Cron expression to define more flexible schedule to execute
6-
your job.
20+
your job.
721

822
OpenSearch plugin developers can easily extend JobScheduler plugin to schedule jobs like running
923
aggregation query against raw data and save the aggregated data into a new index every hour, or keep
1024
monitoring the shard allocation by calling OpenSearch API and post the output to a Webhook.
1125

12-
## Build
13-
The JobScheduler plugin uses the [Gradle](https://docs.gradle.org/4.10.2/userguide/userguide.html)
14-
build system.
15-
1. Checkout this package from version control.
16-
1. To build from command line set `JAVA_HOME` to point to a JDK >=14
17-
1. Run `./gradlew build`
18-
19-
Then you will find the built artifact located at `build/distributions` directory
20-
21-
## Install
22-
Once you have built the plugin from source code, run
23-
```bash
24-
opensearch-plugin install file://${PLUGIN_ZIP_FILE_PATH}
25-
```
26-
to install the JobScheduler plugin to your OpenSearch.
27-
28-
## Develop a plugin that extends JobScheduler
29-
JobScheduler plugin provides a SPI for other plugins to implement. Essentially, you need to
30-
1. Define your *JobParameter* type by implementing `ScheduledJobParameter` interface
31-
1. Implement your JobParameter parser function that can deserialize your JobParameter from XContent
32-
1. Create your *JobRunner* implementation by implementing `ScheduledJobRunner` interface
33-
1. Create your own plugin which implements `JobSchedulerExtension` interface
34-
- don't forget to create the service provider configuration file in your resources folder and
35-
bundle it into your plugin artifact
36-
37-
Please refer to the `sample-extension-plugin` subproject in this project, which provides a complete
38-
example of using JobScheduler to run periodical jobs.
39-
40-
The sample extension plugin takes an index name as input and logs the index shards to opensearch
41-
logs according to the specified Schedule. And it also exposes a REST endpoint for end users to
42-
create/delete jobs.
26+
## Contributing
4327

44-
## Code of Conduct
28+
See [developer guide](DEVELOPER_GUIDE.md) and [how to contribute to this project](CONTRIBUTING.md).
4529

46-
This project has adopted an [Open Source Code of Conduct](https://www.opensearch.org/codeofconduct.html).
30+
## Getting Help
4731

32+
If you find a bug, or have a feature request, please don't hesitate to open an issue in this repository.
4833

49-
## Security issue notifications
34+
For more information, see [project website](https://opensearch.org/) and [documentation](https://docs-beta.opensearch.org/). If you need help and are unsure where to open an issue, try [forums](https://discuss.opendistrocommunity.dev/).
35+
36+
## Code of Conduct
37+
38+
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.
39+
40+
## Security
5041

5142
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.
5243

44+
## License
45+
46+
This project is licensed under the [Apache v2.0 License](./LICENSE)
5347

54-
## Licensing
48+
## Copyright
5549

56-
See the [LICENSE](./LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
50+
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)