Skip to content

Increase open search version from 2.13 to 2.17#383

Merged
killev merged 7 commits intomainfrom
increase-open-search-version
Oct 29, 2024
Merged

Increase open search version from 2.13 to 2.17#383
killev merged 7 commits intomainfrom
increase-open-search-version

Conversation

@killev
Copy link
Contributor

@killev killev commented Oct 17, 2024

This pr increases Open Search version from 2.13 to 2.17 because 2.13 image has been abandoned and isn't maintained anymore

@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@coderabbitai
Copy link

coderabbitai bot commented Oct 17, 2024

Walkthrough

The docker-compose.yml file has been updated with several modifications to service configurations and environment variables. The opensearch-single-node service has been upgraded to use a newer image version, changing from opensearchproject/opensearch:2.13.0 to opensearchproject/opensearch:2.17.0. The logstash service has had its environment variable LOG_LEVEL removed, while the django service has had its environment variables organized and expanded, including the addition of DJANGO_LOG_LEVEL=INFO. A new init-kafka service has been introduced, and the kafka service now includes a health check. The deployment/terraform/opensearch.tf file reflects an upgrade in the OpenSearch engine version from "OpenSearch_2.13" to "OpenSearch_2.17". A new release section for version 1.24.0 has been added to the RELEASE-NOTES.md file.

Changes

File Change Summary
docker-compose.yml - Updated opensearch-single-node image version from 2.13.0 to 2.17.0
- Removed environment variable LOG_LEVEL from logstash service
- Added environment variable DJANGO_LOG_LEVEL=INFO to django service
- Refined depends_on for django to include health dependencies on database, memcached, kafka, and opensearch-single-node, as well as logstash
- Introduced new service init-kafka with commands to create Kafka topics
- Added health check for kafka service
deployment/terraform/opensearch.tf - Updated engine_version in aws_opensearch_domain from "OpenSearch_2.13" to "OpenSearch_2.17"
doc/release/RELEASE-NOTES.md - Added new release section for version 1.24.0, including product name and release date
- Noted architecture/environment change: Open Search version upgraded to 2.17

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Docker
    participant OpenSearch
    participant Logstash
    participant Database
    participant Kafka
    participant InitKafka

    User->>Docker: Start services
    Docker->>OpenSearch: Start opensearch-single-node
    Docker->>Database: Start database
    Docker->>Kafka: Start kafka
    Kafka->>Docker: Health check
    Docker->>Logstash: Start logstash
    Logstash->>OpenSearch: Connects
    Docker->>InitKafka: Start init-kafka
    InitKafka->>Kafka: Create topics
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:57 — with GitHub Actions Inactive
@killev killev had a problem deploying to Quality Environment October 17, 2024 11:57 — with GitHub Actions Failure
@killev killev temporarily deployed to Quality Environment October 17, 2024 11:59 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Oct 17, 2024

React App | Jest test suite - Code coverage report

Total: 25.86%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@killev killev temporarily deployed to Quality Environment October 17, 2024 12:04 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Oct 17, 2024

Dedupe Hub App | Unittest test suite - Code coverage report

Total: 56.14%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@killev killev temporarily deployed to Quality Environment October 17, 2024 12:05 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 17, 2024 12:05 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Oct 17, 2024

Contricleaner App | Unittest test suite - Code coverage report

Total: 98.91%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

@barecheck
Copy link

barecheck bot commented Oct 17, 2024

Countries App | Unittest test suite - Code coverage report

Total: 100%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
docker-compose.yml (1)

227-227: LGTM: Added LOG_LEVEL environment variable.

Adding the LOG_LEVEL=INFO environment variable is a good practice for controlling log verbosity in the Logstash service.

Consider adding a comment explaining the purpose of this variable for better documentation:

      - LOGSTASH_UPDATE_INTERVAL_MINUTES=1
+     # Control the verbosity of Logstash logs
      - LOG_LEVEL=INFO
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 3423e1a and 35fcdea.

📒 Files selected for processing (1)
  • docker-compose.yml (2 hunks)
🧰 Additional context used
🔇 Additional comments (2)
docker-compose.yml (2)

Line range hint 229-231: LGTM: Adjusted service dependencies for Logstash.

The depends_on section for the logstash service has been correctly adjusted to include both opensearch-single-node and database. This ensures proper service startup order.


Line range hint 1-234: Summary: OpenSearch version updated and Logstash configuration improved.

The changes in this PR successfully achieve the objective of updating the OpenSearch version from 2.13 to 2.17. Additionally, the Logstash service configuration has been improved with better log level control and proper service dependencies.

These changes enhance the overall Docker Compose configuration without introducing any apparent conflicts or issues with other services.

@killev killev temporarily deployed to Quality Environment October 17, 2024 12:14 — with GitHub Actions Inactive
@barecheck
Copy link

barecheck bot commented Oct 17, 2024

Django App | Unittest test suite - Code coverage report

Total: 77.93%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

Copy link
Contributor

@vladsha-dev vladsha-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The version should also be updated in the TF code.
  2. Are there any risks associated with updating it?

@killev killev temporarily deployed to Quality Environment October 22, 2024 09:55 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:27 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:27 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:27 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:28 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:28 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:28 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:28 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:28 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:28 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:28 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:28 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:28 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:28 — with GitHub Actions Inactive
@killev killev had a problem deploying to Quality Environment October 29, 2024 13:28 — with GitHub Actions Failure
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:30 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:35 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:35 — with GitHub Actions Inactive
@killev killev temporarily deployed to Quality Environment October 29, 2024 13:36 — with GitHub Actions Inactive
@killev
Copy link
Contributor Author

killev commented Oct 29, 2024

  1. Are there any risks associated with updating it?

Not sure about risks. I consider them as low, but if we merge now, we have plenty time to test

@sonarqubecloud
Copy link

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (2)
docker-compose.yml (2)

Line range hint 187-204: Consider adding health check for OpenSearch

While the OpenSearch configuration is correct, adding a health check would ensure more robust service startup orchestration, especially since other services depend on it.

Add the following health check configuration:

 image: opensearchproject/opensearch:2.17.0
+    healthcheck:
+      test: ["CMD-SHELL", "curl -s http://localhost:9200/_cluster/health?pretty | grep -q '\"status\" : \"green\"\\|\"status\" : \"yellow\"'"]
+      interval: 20s
+      timeout: 10s
+      retries: 3
     environment:

Line range hint 191-192: Review Resource Allocation for Production

The JVM heap size is set to 512MB (min and max), which might need adjustment based on your production workload and available resources.

Consider:

  1. Adjusting OPENSEARCH_JAVA_OPTS based on available system memory (recommended: 50% of system RAM)
  2. Monitoring memory usage patterns to optimize these settings
  3. Implementing horizontal scaling if needed
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between dcf798f and 14eb496.

📒 Files selected for processing (2)
  • doc/release/RELEASE-NOTES.md (1 hunks)
  • docker-compose.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • doc/release/RELEASE-NOTES.md
🔇 Additional comments (2)
docker-compose.yml (2)

187-187: OpenSearch version upgrade looks good!

The upgrade to OpenSearch 2.17.0 is correctly implemented. The configuration settings, including memory limits, security settings, and resource limits, are properly configured for the new version.


Line range hint 193-195: Security Configuration Advisory

The current configuration disables the security plugin and demo configurations, which is fine for development. However, ensure that appropriate security measures are implemented in production environments.

Consider maintaining separate configuration files for development and production environments, with security properly enabled in production.

Copy link
Contributor

@vladsha-dev vladsha-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants