{"id":22018448,"url":"https://github.com/flavienbwk/opensearch-docker-compose","last_synced_at":"2025-04-12T23:32:52.328Z","repository":{"id":41100330,"uuid":"385886249","full_name":"flavienbwk/opensearch-docker-compose","owner":"flavienbwk","description":"Dockerized cluster architecture for OpenSearch with compose.","archived":false,"fork":false,"pushed_at":"2025-03-21T02:33:17.000Z","size":83,"stargazers_count":174,"open_issues_count":1,"forks_count":87,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-04T04:24:02.542Z","etag":null,"topics":["cluster","docker","docker-compose","elasticsearch","opendistro","opensearch","security"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flavienbwk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-14T09:35:57.000Z","updated_at":"2025-04-02T16:47:27.000Z","dependencies_parsed_at":"2023-12-06T13:25:34.805Z","dependency_job_id":"8dd4f5f1-5df0-4b54-a96f-398d3c9ad139","html_url":"https://github.com/flavienbwk/opensearch-docker-compose","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienbwk%2Fopensearch-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienbwk%2Fopensearch-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienbwk%2Fopensearch-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flavienbwk%2Fopensearch-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flavienbwk","download_url":"https://codeload.github.com/flavienbwk/opensearch-docker-compose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647257,"owners_count":21139081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cluster","docker","docker-compose","elasticsearch","opendistro","opensearch","security"],"created_at":"2024-11-30T05:12:13.730Z","updated_at":"2025-04-12T23:32:52.305Z","avatar_url":"https://github.com/flavienbwk.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenSearch - Docker - Compose\n\n![OpenSearch version](https://img.shields.io/badge/OpenSearch%20version-2.19.1-blue)\n\nDockerized cluster architecture for OpenSearch with compose.\n\n## Key concepts\n\n- OpenSearch is [the successor of OpenDistro](https://opendistro.github.io/for-elasticsearch/blog/2021/06/forward-to-opensearch/)\n- OpenSearch = Elasticsearch\n- OpenSearch Dashboards = Kibana\n\n## Cluster setup\n\nRaise your host's ulimits for ElasticSearch to handle high I/O :\n\n```bash\nsudo sysctl -w vm.max_map_count=512000\n# Persist this setting in `/etc/sysctl.conf` and execute `sysctl -p`\n```\n\nNow, we will generate the certificates for the cluster :\n\n```bash\n# You may want to edit the OPENDISTRO_DN variable first\nbash generate-certs.sh\n```\n\nStart the cluster :\n\n```bash\ndocker compose up -d\n```\n\nWait about 30 seconds and run `securityadmin` to initialize the security plugin :\n\n```bash\ndocker compose exec os01 bash -c \"chmod +x plugins/opensearch-security/tools/securityadmin.sh \u0026\u0026 bash plugins/opensearch-security/tools/securityadmin.sh -cd config/opensearch-security -icl -nhnv -cacert config/certificates/ca/ca.pem -cert config/certificates/ca/admin.pem -key config/certificates/ca/admin.key -h localhost\"\n```\n\n\u003e Find all the configuration files in the container's `/usr/share/opensearch/config/opensearch-security` directory. You might want to [mount them as volumes](https://opendistro.github.io/for-elasticsearch-docs/docs/install/docker-security/).\n\nAccess OpenSearch Dashboards through [https://localhost:5601](https://localhost:5601)\n\nDefault username is `admin` and password is `admin`\n\n\u003e Take a look at [OpenSearch's internal users documentation](https://opensearch.org/docs/security-plugin/configuration/yaml/) to add, remove or update a user.\n\n## Hot-warm architecture setup\n\nUse a [hot-warm cluster architecture](https://opensearch.org/docs/latest/opensearch/cluster/#advanced-step-7-set-up-a-hot-warm-architecture) if you have data that you rarely want to update or search so you can place them on lower-cost storage nodes.\n\n\u003ccenter\u003e\n    \u003cimg alt=\"Hot-warm architecture schema\" src=\"./hot-warm-architecture.jpg\" /\u003e\n\u003c/center\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eHot-warm architecture cluster setup instructions...\u003c/summary\u003e\n\u003cbr\u003e\n\nRaise your host's ulimits for ElasticSearch to handle high I/O :\n\n```bash\nsudo sysctl -w vm.max_map_count=512000\n# Persist this setting in `/etc/sysctl.conf` and execute `sysctl -p`\n```\n\nNow, we will generate the certificates for the cluster :\n\n```bash\n# You may want to edit the OPENDISTRO_DN variable first\nbash generate-certs-hot-warm.sh\n```\n\nAdjust `Xms/Xmx` parameters and start the cluster :\n\n```bash\ndocker compose -f docker-compose.hot-warm.yml up -d\n```\n\nWait about 60 seconds and run `securityadmin` to initialize the security plugin :\n\n```bash\ndocker compose exec os01 bash -c \"chmod +x plugins/opensearch-security/tools/securityadmin.sh \u0026\u0026 bash plugins/opensearch-security/tools/securityadmin.sh -cd config/opensearch-security -icl -nhnv -cacert config/certificates/ca/ca.pem -cert config/certificates/ca/admin.pem -key config/certificates/ca/admin.key -h localhost\"\n```\n\n\u003e Find all the configuration files in the container's `/usr/share/opensearch/config/opensearch-security` directory. You might want to [mount them as volumes](https://opendistro.github.io/for-elasticsearch-docs/docs/install/docker-security/).\n\nAccess OpenSearch Dashboards through [https://localhost:5601](https://localhost:5601)\n\nDefault username is `admin` and password is `admin`\n\n\u003e Take a look at [OpenSearch's internal users documentation](https://opensearch.org/docs/security-plugin/configuration/yaml/) to add, remove or update a user.\n\n\u003c/details\u003e\n\nTo add an index to a warm node :\n\n```jsn\nPUT newindex\n{\n  \"settings\": {\n    \"index.routing.allocation.require.temp\": \"warm\"\n  }\n}\n```\n\nYou might want to use [Index State Management (ILM)](https://opensearch.org/docs/latest/im-plugin/index/) to automatically move old indices from _hot_ to _warm_ nodes.\n\n## Why OpenSearch\n\n- Fully open source (including plugins)\n- Fully under Apache 2.0 license\n- Advanced security plugin (free)\n- Alerting plugin (free)\n- Allows you to [perform SQL queries against ElasticSearch](https://opendistro.github.io/for-elasticsearch-docs/docs/sql/)\n- Maintained by AWS and used for its cloud services\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflavienbwk%2Fopensearch-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflavienbwk%2Fopensearch-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflavienbwk%2Fopensearch-docker-compose/lists"}