Skip to content

Commit

Permalink
Updated development instructions (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
andsel authored Mar 30, 2023
1 parent e0bdec5 commit db64bfc
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,39 @@ Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/log

## Developing

### 1. Plugin Developement and Testing
### 1. Plugin Development and Testing

#### Code

- To get started, you'll need JRuby with the Bundler gem installed.
- You'll also need a Logstash installation to build the plugin against.

- 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
- `export LOGSTASH_SOURCE=1` and point `LOGSTASH_PATH` to a local Logstash
e.g. `export LOGSTASH_PATH=/opt/local/logstash-8.7.0`

- Install Ruby dependencies
```sh
bundle install
bundle exec rake vendor
```

- Install Java dependencies - regenerates the *lib/logstash-output-google_pubsub_jars.rb*
script used to load the .jar dependencies when the plugin starts.
```sh
./gradlew vendor
```
NOTE: This step is necessary whenever **build.gradle** is updated.

#### Test

- Update your dependencies

```sh
bundle install
bundle exec rake vendor
```

- Run tests
- Run Ruby tests

```sh
bundle exec rspec
Expand All @@ -57,12 +67,8 @@ 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
Expand All @@ -80,12 +86,8 @@ 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

Expand Down

0 comments on commit db64bfc

Please sign in to comment.