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

User facing documentation for Logstash on ECK #6585

Closed
wants to merge 27 commits into from

Conversation

robbavey
Copy link
Member

@robbavey robbavey commented Mar 24, 2023

Work in Progress docs

Includes

  • Rough quickstart guide
  • How to Configure Logstash on ECK, including
    • Logstash Configuration
    • Pipeline Configuration
    • Using ElasticsearchRef
    • Scaling Logstash
    • Exposing Services
  • Sample recipes for configuring pipelines in different ways
  • Advanced Configuration - setting JVM options
  • Limitations of the Technical Preview

@botelastic botelastic bot added the triage label Mar 24, 2023
@thbkrkr thbkrkr added the >docs Documentation label Mar 24, 2023
@botelastic botelastic bot removed the triage label Mar 24, 2023
@robbavey robbavey requested a review from kaisecheng April 3, 2023 13:25
Copy link
Contributor

@kaisecheng kaisecheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can update the container version in all recipes from 8.6.1 to 8.7.0, especially Logstash stack monitoring only works with 8.7+

For the todo, we will need to cover pipeline reload use case.

}
}
output {
stdout { codec => rubydebug }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As elasticsearch cluster is included in the sample, I think the pipeline can have es-output example

  elasticsearch {
    hosts => [ "${DEFAULT_ELASTICSEARCH_HOSTS}" ]
    user => "${DEFAULT_ELASTICSEARCH_USER}"
    password => "${DEFAULT_ELASTICSEARCH_PASSWORD}"
    cacert => "${DEFAULT_ELASTICSEARCH_CA_CERTS}"
  }

send_to => 'prod'
}
pipeline {
send_to => 'qa'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 nice pipeline-to-pipeline example

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nearly! I forgot to remove some old pipelines 🤦

@kaisecheng
Copy link
Contributor

need a section for es-output to point users to customize users and roles

@robbavey robbavey marked this pull request as ready for review April 25, 2023 15:30
Comment on lines 449 to 456
=== Single Pipeline defined in CRD

[source,sh,subs="attributes"]
----
kubectl apply -f {logstash_recipes}/logstash-eck.yaml
----

Deploys Logstash with a single pipeline defined in the CRD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional to repeat this Single Pipeline defined in CRD section?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not 🤦

* <<{p}-logstash-technical-preview-limitations,Technical Preview Limitations>>


NOTE: Running Logstash on ECK is compatible only with Logstash 8.7+.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to remove this? I do see LS 8.6.1 versions are in settings (ex: logstash.yml) and as I understood stack monitoring for Logstash requires 8.7.0+.
Or, we can change all configs version to 8.7.0 to align with this note.

barkbay added 2 commits April 27, 2023 11:37
* In the init container: copy the Elasticsearch configuration, and then create links.

* Set default security context for Elasticsearch containers, including the sidecars.

* Add E2E check for securityContext.
…ic#6724)

* Introduce HasWarnings interface

* Update samples in config/recipes

* Update example in docs

* Update CRD/API documentation

* Update Helm Charts

* Add checkPolicyID for next major release
@thbkrkr thbkrkr added the v2.8.0 label Apr 27, 2023
* Update module go.elastic.co/apm/v2 to v2.4.1
* Update module go.elastic.co/apm/module/apmzap/v2 to v2.4.1
* Update module go.elastic.co/apm/module/apmhttp/v2 to v2.4.1
* Update module go.elastic.co/apm/module/apmelasticsearch/v2 to v2.4.1

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Thibault Richard <[email protected]>
Copy link
Collaborator

@pebrc pebrc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a quick pass LGTM, found a few nits only.

@alaudazzi
Copy link
Contributor

I referenced the new file from the Orchestrating Elastic Stack applications landing page.

@alaudazzi alaudazzi self-requested a review April 28, 2023 11:26
Copy link
Contributor

@alaudazzi alaudazzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a second pass and left a few editing suggestions.

config/recipes/logstash/README.asciidoc Outdated Show resolved Hide resolved
config/recipes/logstash/README.asciidoc Outdated Show resolved Hide resolved

Deploys Logstash with the pipeline defined in a secret and referred to via `pipelinesRef`

===== Pipeline as mounted volume - `logstash-pipelinevolume.yaml`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal which implies to rename the file.

Suggested change
===== Pipeline as mounted volume - `logstash-pipelinevolume.yaml`
===== Pipeline as mounted volume - `logstash-pipeline-as-volume.yaml`

config/recipes/logstash/README.asciidoc Outdated Show resolved Hide resolved
config/recipes/logstash/README.asciidoc Outdated Show resolved Hide resolved
config/recipes/logstash/logstash-es-role.yaml Outdated Show resolved Hide resolved
robbavey and others added 4 commits April 28, 2023 16:13
This commit introduces a technical preview of the Logstash Operator for ECK

The Logstash operator introduces a Logstash CRD:

This operator provides support for:
* Defining logstash.yml in config or configRef sections of the CRD
* Integration with Elasticsearch clusters via the use of elasticsearchRefs, and environment variable substitution to introduce those elasticsearch references into logstash pipelines.
* Definition of pipelines.yml in pipelines or pipelinesRef sections of the CRD with support for pipeline definition in volume mounts
* Support for multiple pipeline and pipeline->pipeline configurations
* Support for automatic pipeline reload in logstash pods when a pipeline change is detected without triggering a full restart of the pod.
* Stack monitoring support via sending metrics and logs to a monitoring elasticsearch cluster via the use of monitoring.logs.elasticsearchRefs and monitoring.metrics.elasticsearchRefs
* Support for defining multiple services for logstash plugins.

Logstash nodes are created as StatefulSets - we expect in later versions of the logstash operator to support persistence in Logstash nodes, including persistent queues and dead letter queues.

A work in progress PR includes documentation and recipes on how to use this logstash operator. There are also samples in this PR located under config/samples/logstash/*

Co-authored-by: Michael Morello <[email protected]>
Co-authored-by: Rob Bavey <[email protected]>
Co-authored-by: Kaise Cheng <[email protected]>
Co-authored-by: kaisecheng <[email protected]>
Co-authored-by: Michael Morello <[email protected]>
Co-authored-by: Thibault Richard <[email protected]>
Co-authored-by: Peter Brachwitz <[email protected]>
)

This commit ensures that we take into account the volumes provided by the user to append the default elasticsearch-data volumeMount.
This adds a new flag `--container-repository` to the operator to be able to specify
a global container repository.

With this it is now possible to use DockerHub images for example: `--container-registry docker.io --container-repository=elastic`.

---------
Co-authored-by: Peter Brachwitz <[email protected]>
This adjusts the number of volumes expected from Beats sidecars in the Logstash
Stack Monitoring unit tests.

Why? Because we don't test PRs with an automatic merge of the main branch (🐛🐞), we missed that the tests in elastic#6732 had to be updated to take into account the changes made by elastic#6703, which adds a new temp volume to the Beats sidecars.
@robbavey robbavey force-pushed the logstash_doc branch 2 times, most recently from 2d57563 to 16694f1 Compare April 28, 2023 16:11
Still a work in progress - will need elasticsearchRef to work fully
@robbavey
Copy link
Member Author

I've answered all the comments on this PR, and created a new one retargeted to the main branch:

#6743

@robbavey robbavey closed this Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs Documentation v2.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants