Skip to content

Instantly share code, notes, and snippets.


Lukáš Vlček lukas-vlcek

View GitHub Profile
lukas-vlcek /
Created February 10, 2023 16:27
Run testing OpenSearch cluster with a core plugin

The run task

OpenSearch has a built in gradle task run to spin up a testcluster.

This is a very useful feature for plugin authors expecially if they use the plugin template (which defines its own modification of run task). It gives author easy way how to spin up a new testcluster with their plugin deployed.

However, when it comes to "core" plugins (that is plugins in plugins folder) then the run task does not seem to be setup correctly to spin up a clus

View Increase log levels on ES cluster in OCP
oc exec <es_pod> -c elasticsearch -- es_util --query=_cluster/settings?flat_settings=true -X PUT -d \
"transient": {
"logger": {
"org.elasticsearch.ingest.openshift": "TRACE",
"org.elasticsearch.action": "DEBUG"
View com.redhat.viaq-openshift-project.template.json
"aliases": {
".all": {
"index_patterns": [
"mappings": {
lukas-vlcek / gist:a61aea97ebe4c2bf22651c3694e76c71
Last active August 9, 2019 12:03
Dots in fields problem when upgrading from ES2 to ES5
View gist:a61aea97ebe4c2bf22651c3694e76c71
# Start fresh ES 2.4.6 with dots in field names enabled
$ ES_JAVA_OPTS="-Dmapper.allow_dots_in_name=true" ./bin/elasticsearch
# Index two documents with conflisting mappings (conflisting from the ES5 perspective)
# See:
$ curl -X POST localhost:9200/test/type -d '{"":1}'
$ curl -X POST localhost:9200/test/type2 -d '{"foo":1}'
lukas-vlcek / gist:f659ad6157e185d6d869770fc660bccd
Created June 24, 2019 13:55
Example of "oc describe <pod>"
View gist:f659ad6157e185d6d869770fc660bccd
$ oc describe po ruby-ex-1-r72kx
Name: ruby-ex-1-r72kx
Namespace: lvlcek
Priority: 0
PriorityClassName: <none>
Start Time: Mon, 24 Jun 2019 14:58:56 +0200
Labels: app=ruby-ex
lukas-vlcek / gist:7a19dd6e66e3366e869114c58223e771
Last active January 22, 2019 13:29
5.x release tags of Prometheus ES plugin
View gist:7a19dd6e66e3366e869114c58223e771
Tag Correct hash Wrong hash Should have been Note
master, 5.x master, 5.x 5.x 0d0b738 c5794ed 1c24705 15d9cb3 9367988 2dafc5e f50587e ce171c7 a4a149f 112bb35 89f9cb2 a08fdbf ab155c7 27b1f30
View Blocked from mvn2 central
$ gradle clean
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'prometheus-exporter'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not download build-tools.jar (org.elasticsearch.gradle:build-tools:6.5.3)
> Could not get resource ''.
> Could not GET ''. Received status code 403 from server: Forbidden
View gist:e0d839447f44a5655f9531e34d49abcd
$ uname -a
Darwin Lukass-MacBook-Pro-2.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
$ git remote -v
origin (fetch)
origin (push)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
lukas-vlcek / gist:376be10b65e1491271bafa9c688a2b25
Last active June 14, 2018 11:31
kubernetes-mixin on Fedora
View gist:376be10b65e1491271bafa9c688a2b25
$ uname -a
Linux 4.15.17-200.fc26.x86_64 #1 SMP Thu Apr 12 18:28:26 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ git remote -v
origin (fetch)
origin (push)
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
View gist:c9102428242b107122cfa480bfc18c06
[lvlcek@dhcp-2-178 test-deploy]$ make WHAT=lvlcek sh
cd "gcp-dev"/ && ../../bin/
Activated service account credentials for: []
bash-4.2$ pwd
bash-4.2$ ansible-playbook -i inventory playbooks/openshift-grafana/config.yml
[WARNING]: * Failed to parse /usr/share/ansible/openshift-ansible/inventory/dynamic/gcp/ with script plugin: Inventory script (/usr/share/ansible/openshift-
ansible/inventory/dynamic/gcp/ had an execution error: Traceback (most recent call last): File "/usr/share/ansible/openshift-