Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi Guys, I Have A Question About Elasticsearch Connection, We Are On Kubernetes Environment (Clearml Is Deployed With Helm Chart), In The Secret We Have This :

Hi guys, I have a question about elasticsearch connection, we are on kubernetes environment (clearml is deployed with helm chart), in the secret we have this :

externalServices:
    elasticsearchConnectionString: '[{"scheme":"http","http_auth":"(elastic,toto)","host":"elasticsearch-es-http","port":9200}]'

And as resut, it returned this exception :

Can't specify the options 'http_auth' via a dictionary in 'hosts', only 'host', 'path_prefix', 'port', 'scheme', 'url_prefix', 'use_ssl' options are allowed

As i don't have any "http_auth" field, we tried to set the host with login/password informations :

externalServices:
    elasticsearchConnectionString: '[{"scheme":"http","host":"elastic,toto@elasticsearch-es-http","port":9200}]'

With no success as it seems not resolved the host (which is written between bracket when clearML tried to connect to elasticsearch)

Is there any workaround as I want to keep login/password behavior on our elasticsearch ?

  
  
Posted one month ago
Votes Newest

Answers 18


Hi @<1752864322440138752:profile|GiddyDragonfly90> - Can you try with the last value you proposed, but use : to separate user and password in the string, like this:

externalServices:
    elasticsearchConnectionString: '[{"scheme":"http","host":"elastic:toto@elasticsearch-es-http","port":9200}]'
  
  
Posted one month ago

Okay I tried, it works with :

apiserver:
  extraEnvs:
    - name: CLEARML_ELASTIC_SERVICE_USERNAME
      value: "elastic"
    - name: CLEARML_ELASTIC_SERVICE_PASSWORD
      value: "toto"

But we don't need to add the option into elasticsearchConnectionString :

externalServices:
    elasticsearchConnectionString: "[...,"secure":true,...]"

As we get this error :

ValueError: Can't specify the options 'secure' via a dictionary in 'hosts', only 'host', 'path_prefix', 'port', 'scheme', 'url_prefix', 'use_ssl' options are allowed

It works fine, thank you very much 😉

  
  
Posted one month ago

For this to work you might also have to add "secure": true in the connection string object:

externalServices:
    elasticsearchConnectionString: "[...,"secure":true,...]"
  
  
Posted one month ago

I see, in the example you provided you used a comma , to separate username and password, I suggest trying to use a column :

  
  
Posted one month ago

Found it

  
  
Posted one month ago

Yes, I've already try to pass credentials into host name, but it didn't work

  
  
Posted one month ago

@<1752864322440138752:profile|GiddyDragonfly90> - MongoDB is used as a dependency Helm Chart from the Bitnami repo. We are using version 12.1.31 of the chart. See this tag None

In the clearml override values, under the mongodb section you can specify any value that is usable in the original chart 🙂

  
  
Posted one month ago

            - name: CLEARML__HOSTS__ELASTIC__WORKERS__ARGS
              value: >-
                {"verify_certs":false}
            - name: CLEARML__HOSTS__ELASTIC__DATASETS__ARGS
              value: >-
                {"verify_certs":false}
            - name: CLEARML__HOSTS__ELASTIC__EVENTS__ARGS
              value: >-
                {"verify_certs":false}
  
  
Posted one month ago

🙂 let me know if that works for you

  
  
Posted one month ago

@<1729671499981262848:profile|CooperativeKitten94> last question, is there any extraEnvs for MongoDB ? As credentials are plain text into logs

  
  
Posted one month ago

To override args passed to elastic connection string

  
  
Posted one month ago

i can't see any option on elasticsearchConnectionString which allow me to bypass certificate check

  
  
Posted one month ago

Yes, already tried, it's not implemented as we got this error :

Can't specify the options 'verify_certs' via a dictionary in 'hosts', only 'host', 'path_prefix', 'port', 'scheme', 'url_prefix', 'use_ssl' options are allowed
  
  
Posted one month ago

As the elasticsearch cluster might be reinstalled, I prefer to not add the CA into bundle certificates of clearml

  
  
Posted one month ago

If that doesn't work, try removing the auth from the connection string and instead define two extraEnvs for the apiserver :

apiserver:
  extraEnvs:
    - name: CLEARML_ELASTIC_SERVICE_USERNAME
      value: "elastic"
    - name: CLEARML_ELASTIC_SERVICE_PASSWORD
      value: "toto"
  
  
Posted one month ago

I didn't know that I could use CLEARML_ELASTIC_SERVICE_USERNAME / CLEARML_ELASTIC_SERVICE_PASSWORD env variables 🙂 good to know

  
  
Posted one month ago

@<1752864322440138752:profile|GiddyDragonfly90> - I think you can also add verify_certs: false in the same elasticsearchConnectionString object, have you tried?

  
  
Posted one month ago

@<1729671499981262848:profile|CooperativeKitten94> as we use eck operator for our elasticsearch cluster, clearML try to connect to elasticsearch using https, but as it is self signed certificates, it it possible to bypass certificate check ?

  
  
Posted one month ago
81 Views
18 Answers
one month ago
one month ago
Tags