Discovery installation

Hi There ,

I tried to install es and discovery and followed this:

I adjusted the docker-compose file:

  es:
    image: opensearchproject/opensearch:1.3.0
    restart: on-failure
    networks: [ internal ]
    environment:
      - cluster.name=es-docker-cluster
      - node.name=es
      - cluster.initial_master_nodes=es
      - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
      - OPENSEARCH_JAVA_OPTS=-Xms8000m -Xmx8000m # minimum and maximum Java heap size, recommend setting both to 50% of system RAM
      - DISABLE_INSTALL_DEMO_CONFIG=true
      - DISABLE_SECURITY_PLUGIN=true
      - VIRTUAL_HOST=es.${DOMAIN}
      - LETSENCRYPT_HOST=es.${DOMAIN}
    ulimits:
      memlock:
        soft: -1
        hard: -1
    volumes:
      - ./data/es:/usr/share/elasticsearch/data

  discovery:
    image: cortezaproject/corteza-server-discovery:${VERSION}
    restart: on-failure
    env_file: [ .env ]
    depends_on: [ es, server ]
    networks: [ proxy, internal ]
    environment:
      VIRTUAL_HOST: discovery.${DOMAIN}
      VIRTUAL_PORT: 80
      LETSENCRYPT_HOST: discovery.${DOMAIN}

In .env i inserted the lines like in description but i have no starting point at what keys to insert or how to generate them:

DISCOVERY_INDEXER_PRIVATE_INDEX_CLIENT_KEY=${PRIVATE_KEY_EXAMPLE}
DISCOVERY_INDEXER_PRIVATE_INDEX_CLIENT_SECRET=${SECRET_EXAMPLE}
DISCOVERY_SEARCHER_CLIENT_KEY=${CLIENT_KEY_EXAMPLE}
DISCOVERY_SEARCHER_CLIENT_SECRET=${CLIENT_SECRET_EXAMPLE}
DISCOVERY_SEARCHER_JWT_SECRET=${JWT_SECRET_EXAMPLE}
DISCOVERY_SEARCHER_ALLOWED_ROLE=${ROLE_ALLOWED_EXAMPLE}

opensearch should be started with no security plugin enabled, so i dont quite get why these keys are required in the first place. but discovery refuses to start without them.
could you please give me a direction how to generate these keys?

Thanks in Advance and for the great System in general, please keep up the great work

Hey @nabl

opensearch should be started with no security plugin enabled, so i dont quite get why these keys are required in the first place. but discovery refuses to start without them.
could you please give me a direction how to generate these keys?

Corteza Discovery is a stand alone application, independent from the rest of the Corteza system. In order to make Discovery functional, you must grant access by creating an auth client along with a user and a role.

what keys to insert or how to generate them:

Access control defines what data the Discovery indexer has access to; more in the index configuration sections.

Take a look at our Low-Code Platform Developer Guide > Corteza Discovery for more info :grin:

Hi @vicky

Thank you for the links i dont know how i have overread this.
I sat it up now and discovery service is up and running.
If i make the discovery url it availible from the outside world: is there a security problem with it? because now i see a response like this without any authentication:

{"response":{"hits":null,"total_hits":0,"aggregations":[],"size":999,"from":0,"total_results":0}}

so my guess is that the service is waiting for querys to be run without auth, is that correct?
My second question is about how to add Discovery Application to access it.
There is no Discovery Button on the App chooser in Corteza.
But maybe that is a general problem what i have. also the reporter never showed up by itself.
I added the App config for reporter by myself copying from a plain setup of corteza. Am i missing something here?

Thank you very much and best regards
Lukas

got this issue also, enabled discovery, but can’t seem to access it from the app

If i make the discovery url it availible from the outside world: is there a security problem with it?

Discovery currently support private indexing policy but also have planning to support Public and Protected(Currently not in use; support will be added in a future release). hence, that response is for public index(users that are not logged-in). It is empty as there is not support as of now apart from that Private data will not be accessible or returned as response without proper authentication.

Check out Low-Code Platform Developer Guide > Corteza Discovery#Indexing Policy for more info :smiley:

CC @nabl,

From Corteza Admin webapp > From left menu > Applications, There you will be able to add application and also allow listing to your application list. You can take reference from the any of the existing applications. Doc for it, is being prepared it will be soon out. Cheers :crossed_fingers:

Actually tried that before, by copying settings from latest.cortezaproject.org

left latest, right my own setup

And yes the discovery tile shows up, but when clicked, it redirects me back to the ‘home’ with all tiles/apps, no errors, no logs.

Hey @grisgruis,

Apologies for that, This might be due to Discovery is not default web application.
Please add below server configuration to your .env file to enable discovery web application.

HTTP_WEBAPP_LIST=admin,compose,workflow,reporter,discovery

Note: List out only all the webapps which are being used :smiley:

Corteza doc reference for Server configuration :: Corteza Docs

2 Likes

haha this is properly hidden… but thanks!

1 Like

@nabl how did you arrived to start Discovery Server and linked it with Corteza Server, thanks

Hi @vicky, i followed all your comments concerning the configuration of Corteza Discovery, i didn’t undestand where can i find your-discovery-server-base-url in

DISCOVERY_BASE_URL=your-discovery-server-base-url

Following the documentation in: Corteza Discovery :: Corteza Docs