Giter VIP home page Giter VIP logo

docker-opensearch-keycloak's Introduction

Docker Opensearch Keycloak (>17)

3 nodes architecture

Versions

  • Opensearch and Opensearch-Dashboards : 2.4.1
  • Keycloak : 20
  • Postgres (used for Keycloak) : 15
opensearch logo keycloak logo postgresql logo

Setup

  1. Important settings

    As specified in opensearch documentation important settings, we will increase vm.map_max_count value, which is the maximum number of memory map areas a process may have.

    To increase the value, add the following line to /etc/sysctl.conf:

    vm.max_map_count=262144

    Then run sudo sysctl -p to reload.

  2. Generate certificates

    This bash script will generate a root ca, an admin certificate (will be used to run securityadmin script later), a certificate for Keycloak, a certificate for opensearch nodes and one for opensearch dashboard.

    bash generate_certs.sh
  3. Start and configure Keycloak

    Open the .env file and edit admin credentials. Default is to admin:admin.

    KEYCLOAK_ADMIN_USER=admin
    KEYCLOAK_ADMIN_PASSWORD=admin

    Start keycloak

    docker-compose up -d keycloak
    # or docker compose depending on your setup
    docker compose up -d keycloak

    Create opensearch-dashboards Keycloak client

    When keycloak container is healthy, go to https://172.17.0.1:8443, click on Administration console and log in with admin credentials you specified in .env file.

    Click on Clients and Create client create client

    Edit Client ID to match opensearch_security.openid.client_id configured in opensearch-dashboards.yml create 1

    Configure Access settings create 2

    Once created and saved, copy opensearch-dashboards client secret and paste it in opensearch_security.openid.client_secret field in opensearch-dashboards.yml secret

  4. Start and configure Opensearch

    Start Opensearch

    docker-compose up -d opensearch-node1 opensearch-node2 opensearch-node3

    Wait a little until nodes are ready and then run securityadmin

    docker-compose exec opensearch-node1 bash -c "chmod +x plugins/opensearch-security/tools/securityadmin.sh && bash plugins/opensearch-security/tools/securityadmin.sh -cd config/opensearch-security -icl -nhnv -cacert config/certificates/ca/root-ca.pem -cert config/certificates/ca/admin.pem -key config/certificates/ca/admin.key -h localhost"
  5. Start Opensearch Dashboards

    docker-compose up -d opensearch-dashboards

    Opensearch Dashboards will be available at https://172.17.0.1:5601 and you can log in with credentials specified in .env file.

docker-opensearch-keycloak's People

Contributors

acompagnon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

nashidforbes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.