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

LOG-1195: Add Openshift Ingest Plugin for ES #2122

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

lukas-vlcek
Copy link
Contributor

Description

Configure Elasticsearch to install Openshift Ingest Plugin.

/cc @ewolinetz
/assign @jcantrill

Links

Copy link
Contributor

@jcantrill jcantrill left a comment

Choose a reason for hiding this comment

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

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 18, 2021
@lukas-vlcek
Copy link
Contributor Author

/retest

@lukas-vlcek
Copy link
Contributor Author

/retest

@lukas-vlcek lukas-vlcek force-pushed the LOG-1195 branch 2 times, most recently from 30f67fe to d914dfa Compare May 19, 2021 14:38
@lukas-vlcek
Copy link
Contributor Author

lukas-vlcek commented May 19, 2021

@jcantrill @ewolinetz I added default pipeline definition and initialization on ES startup. Also I defined the default pipeline in appropriate index templates. Please have a look again.

Also notice change wrt the initialization process:

  • 0100 is for ingest pipeline initialization (they need to happen before index templates are pushed in)
  • 0200 is for index templates initialization now due to ^^

Q: Please let me know if I need to add the new folder ingest_pipelines on this line here:

chmod -R u+w,g+w ${HOME}/sgconfig ${ES_HOME}/index_templates

elasticsearch/ci-env.sh Outdated Show resolved Hide resolved
@ewolinetz
Copy link
Contributor

Q: Please let me know if I need to add the new folder ingest_pipelines on this line here:

we shouldn't need to because we aren't updating the file at all. no need to do writes there.

@lukas-vlcek lukas-vlcek force-pushed the LOG-1195 branch 2 times, most recently from 495350a to 0494b79 Compare May 19, 2021 16:18
@lukas-vlcek
Copy link
Contributor Author

/test cluster-logging-operator-e2e

@lukas-vlcek lukas-vlcek force-pushed the LOG-1195 branch 2 times, most recently from 191cfd7 to 75cf970 Compare June 1, 2021 16:09
elasticsearch/Dockerfile Show resolved Hide resolved
elasticsearch/fetch-artifacts-koji.yaml Outdated Show resolved Hide resolved
@@ -4,14 +4,19 @@ set -o xtrace

PROMETHEUS_EXPORTER_URL=${PROMETHEUS_EXPORTER_URL:-$MAVEN_REPO_URL/org/elasticsearch/plugin/prometheus/prometheus-exporter/$PROMETHEUS_EXPORTER_VER/prometheus-exporter-$PROMETHEUS_EXPORTER_VER.zip}
OPENDISTRO_URL=${OPENDISTRO_URL:-$MAVEN_REPO_URL/com/amazon/opendistroforelasticsearch/opendistro_security/$OPENDISTRO_VER/opendistro_security-$OPENDISTRO_VER.zip}
INGEST_PLUGIN_URL=${INGEST_PLUGIN_URL:-$MAVEN_REPO_URL/org/elasticsearch/plugin/ingest/openshift/$INGEST_PLUGIN_VER/openshift_ingest-plugin-$INGEST_PLUGIN_VER.zip}
Copy link
Contributor

Choose a reason for hiding this comment

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

If we never intend to pubblish this to an official maven repo then this line should simply default to use the URL manipulation that you are doing for CI and/or pulling it straight from the Viaq repo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This plugin is not generalized enough atm. It makes not sense to push it into any public mvn repo.

Copy link
Contributor

Choose a reason for hiding this comment

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

correct. that is exactly my point. we never intend to publish to maven so this change is incorrect (e.g. $MAVEN_REPO_URL)

@ewolinetz
Copy link
Contributor

@lukas-vlcek can we also fix the run.sh file to properly pick up the log4j2.properties file?

@lukas-vlcek
Copy link
Contributor Author

@ewolinetz I think we can (though I would prefer separate PR).

@vimalk78
Copy link
Contributor

/retest

2 similar comments
@vimalk78
Copy link
Contributor

/retest

@vimalk78
Copy link
Contributor

/retest

@vimalk78
Copy link
Contributor

/retest

2 similar comments
@vimalk78
Copy link
Contributor

/retest

@vimalk78
Copy link
Contributor

/retest

@@ -57,6 +58,7 @@ ENV ES_PATH_CONF=/etc/elasticsearch/ \
JAVA_HOME=/usr/lib/jvm/jre \
NODE_QUORUM=1 \
PROMETHEUS_EXPORTER_VER=6.8.1.0-redhat-00001 \
INGEST_PLUGIN_VER=6.8.1.0-redhat-00001 \
Copy link
Contributor

Choose a reason for hiding this comment

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

@@ -1,3 +1,4 @@
- nvr: org.elasticsearch-elasticsearch-6.8.1.redhat_00006-1
- nvr: com.amazon.opendistroforelasticsearch-opendistro_security-0.10.0.4_redhat_00001-1
- nvr: org.elasticsearch.plugin.prometheus-prometheus-exporter-6.8.1.0_redhat_00001-1
- nvr: org.elasticsearch.plugin.ingest-openshift-ingest-plugin-6.8.1.0_redhat_00001-1
Copy link
Contributor

Choose a reason for hiding this comment

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

org.elasticsearch.plugin.ingest-openshift-ingest-plugin-6.8.1.0_redhat_00002-1

https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1638435


if [[ "${OPENSHIFT_CI:-}" == "true" ]]; then
# This flag is set during CI runs. If no ARG was passed in,
# default to maven.org.
export ES_ARCHIVE_URL=https://github.com/openshift/origin-aggregated-logging/releases/download/elasticsearch-oss-$ES_VER/elasticsearch-oss-$ES_VER.zip
export OPENDISTRO_URL=https://github.com/openshift/origin-aggregated-logging/releases/download/opendistro_security-$OPENDISTRO_VER/opendistro_security-$OPENDISTRO_VER.zip

# TODO[lvlcek]: We need to download official releases from ViaQ repo. Getting it from lukas-vlcek is temporary.
INGEST_PLUGIN_VER=$(echo $INGEST_PLUGIN_VER | cut -d'-' -f1)
export INGEST_PLUGIN_URL=https://github.com/lukas-vlcek/elasticsearch-openshift-ingest-plugin/releases/download/v$INGEST_PLUGIN_VER/openshift-ingest-plugin-$INGEST_PLUGIN_VER.zip
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldnt we "correct" the upstream url to point to a release published here https://github.com/ViaQ/elasticsearch-openshift-ingest-plugin

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I see what you mean @jcantrill
The thing is that we need to decide and control who, how and when cuts new releases for https://github.com/ViaQ/elasticsearch-openshift-ingest-plugin/

At this point it is just manual process. I created some tags in my clone for which I manually built releases and uploaded them to https://github.com/lukas-vlcek/elasticsearch-openshift-ingest-plugin/releases
(^^ This is what @vimalk78 used for his tests btw...)

Now, there is no process that is syncing tags between my clone and official ViaQ upstream.
We can either create tags manually or we can adopt similar approach that is used in prometheus-plugin – which means that whenever there is a commit that includes this property file without -SNAPSHOT suffix here ...
https://github.com/vvanholl/elasticsearch-prometheus-exporter/blob/master/gradle.properties#L3

... then a new tag is created automatically and a new release is built and uploaded automatically as well. See https://github.com/vvanholl/elasticsearch-prometheus-exporter/blob/master/.github/workflows/ci.yml#L39

We should decide how we want to control this. I would prefer fully automated approach (i.e. the samy way the prometheus plugin does it), but I am OK if you decide to do it differently.

//cc @ewolinetz

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BTW, I do not think I have privs to create tags on ViaQ repo (the upstream). Which means if we decide we will create and upload release manually then I believe we need to ask @ewolinetz to do this.

@@ -4,14 +4,19 @@ set -o xtrace

PROMETHEUS_EXPORTER_URL=${PROMETHEUS_EXPORTER_URL:-$MAVEN_REPO_URL/org/elasticsearch/plugin/prometheus/prometheus-exporter/$PROMETHEUS_EXPORTER_VER/prometheus-exporter-$PROMETHEUS_EXPORTER_VER.zip}
OPENDISTRO_URL=${OPENDISTRO_URL:-$MAVEN_REPO_URL/com/amazon/opendistroforelasticsearch/opendistro_security/$OPENDISTRO_VER/opendistro_security-$OPENDISTRO_VER.zip}
INGEST_PLUGIN_URL=${INGEST_PLUGIN_URL:-$MAVEN_REPO_URL/org/elasticsearch/plugin/ingest/openshift/$INGEST_PLUGIN_VER/openshift_ingest-plugin-$INGEST_PLUGIN_VER.zip}
Copy link
Contributor

Choose a reason for hiding this comment

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

correct. that is exactly my point. we never intend to publish to maven so this change is incorrect (e.g. $MAVEN_REPO_URL)

@lukas-vlcek lukas-vlcek force-pushed the LOG-1195 branch 3 times, most recently from 7acaf74 to a0cfcac Compare June 21, 2021 15:00
Add default openshift_schema pipeline definiton for all [app-, infra-, audit-] indices.
@lukas-vlcek
Copy link
Contributor Author

/test cluster-logging-operator-e2e

@jcantrill
Copy link
Contributor

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 21, 2021
@jcantrill
Copy link
Contributor

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 21, 2021
@ewolinetz
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 21, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ewolinetz, jcantrill, lukas-vlcek

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [ewolinetz,jcantrill]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@lukas-vlcek
Copy link
Contributor Author

/test cluster-logging-operator-e2e

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

3 similar comments
@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit f9e5da9 into openshift:master Jun 22, 2021
@lukas-vlcek lukas-vlcek deleted the LOG-1195 branch June 22, 2021 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. midstream/Dockerfile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants