Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #25

Merged
merged 2 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,26 @@ gem install bundler
Unit tests and integration tests are executed inside Docker environment.
Perform the following from your project root directory eg: `~/workspace/logstash-output-opensearch`

#### Run Unit Tests

```bash
# Set up Environment variable for docker to pull your test environment
export LOGSTASH_VERSION=7.13.2 # will use latest version if not specified.

# Set up docker ( this will build, install into Logstash )
scripts/unit-test/docker-setup.sh

# Run tests
scripts/unit-test/docker-run.sh
```

#### Run Integration Tests
1. Tests against OpenSearch clusters.

```bash
# Set up Environment variable for Docker to pull your test environment
export LOGSTASH_VERSION=7.13.2 # will use latest version if not specified.
export OPENSEARCH_VERSION=1.0.0-rc1 # will use latest if not specified.
export INTEGRATION=true

# Set up docker ( this will build, install into Logstash )
scripts/opensearch/docker-setup.sh
Expand All @@ -70,25 +83,19 @@ scripts/opensearch/docker-setup.sh
scripts/opensearch/docker-run.sh
```

To perform unit tests, set `INTEGRATION=false` and re-run the `docker-run.sh`.
You don't have to set up Docker again.

2. Tests against OpenDistro clusters.

```bash
# Set up Environment variable for docker to pull your test environment
export LOGSTASH_VERSION=7.13.2 # mandatory
export LOGSTASH_VERSION=7.13.2 # will use latest version if not specified.
export OPENDISTRO_VERSION=1.13.2 # will use latest if not specified.
export INTEGRATION=false

# Set up docker ( this will build, install into Logstash )
scripts/opendistro/docker-setup.sh

# Run tests
scripts/opendistro/docker-run.sh
```
To perform unit tests, set `INTEGRATION=false` and re-run the `docker-run.sh`.
You don't have to set up Docker again.

### Run plugin in Logstash

Expand Down Expand Up @@ -167,10 +174,10 @@ To run the Logstash Output Opensearch plugin, add following configuration in you
```
output {
opensearch {
hosts => "hostname"
user => "admin"
password => "admin"
index => "logstash-logs-%{+YYYY.MM.dd}"
hosts => "https://hostname:port"
user => "admin"
password => "admin"
index => "logstash-logs-%{+YYYY.MM.dd}"
}
}
```
Expand Down
Loading