Skip to content

Conversation

@rhysyngsun
Copy link
Contributor

@rhysyngsun rhysyngsun commented Sep 9, 2024

What are the relevant tickets?

Part of https://github.com/mitodl/hq/issues/5179

Description (What does it do?)

This updates the docker compose setup to support running OpenSearch in a 3-node cluster locally.

How can this be tested?

  • You should be able to run docker compose up as usual without any additional configuration.
  • Test the 3-node cluster:
    • docker compose stop if it's running
    • Set export OPENSEARCH_CLUSTER_TYPE=cluster in your shell
    • docker compose up - you should see 3 opensearch nodes instead of 1
    • Run manage.py recreate_index --all as the new cluster uses separate volumes to avoid breaking things if you switch back and forth.
    • You should be able to search as with a single node cluster.

@gitguardian
Copy link

gitguardian bot commented Sep 9, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9430286 Triggered Generic Password 06f8806 docker-compose.yml View secret
9430286 Triggered Generic Password 06f8806 docker-compose.services.yml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@rhysyngsun rhysyngsun force-pushed the nl/local-opensearch-cluster branch 2 times, most recently from 13fbdc7 to 86a67cf Compare September 11, 2024 14:37
@rhysyngsun rhysyngsun marked this pull request as ready for review September 11, 2024 14:37
@rhysyngsun rhysyngsun added the Needs Review An open Pull Request that is ready for review label Sep 11, 2024
@shanbady shanbady self-requested a review September 11, 2024 18:10
@shanbady shanbady self-assigned this Sep 11, 2024
Copy link
Contributor

@shanbady shanbady left a comment

Choose a reason for hiding this comment

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

codespaces appears to have issues. I think you may need to adjust the service name in the devcontainer.json

@rhysyngsun
Copy link
Contributor Author

@shanbady addressed your feedback

Copy link
Contributor

@shanbady shanbady left a comment

Choose a reason for hiding this comment

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

@rhysyngsun still appears to be some issue -
This is a working codespace note the ports visible and that the uwsgi process is bound to port 8061, the api server is exposed at 8063 and frontend at 8062.

Screenshot 2024-09-12 at 10 47 05 AM

On this branch there are only 2 ports that show up and uwsgi process is bound to 8063 instead of 8061

Screenshot 2024-09-12 at 10 36 09 AM

If you can get the port binding to look the same as in the first screenshot I think we will have a working setup. I recall not having to explicitly exposing or binding to 8061 (that somehow seemed to automatically happen) but the 8063 I had to bind via the PORT env var.

ports:
- "8061:8061"
depends_on:
# db:
Copy link
Contributor

Choose a reason for hiding this comment

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

stray comment and block

Copy link
Contributor

@shanbady shanbady left a comment

Choose a reason for hiding this comment

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

👍

@shanbady shanbady assigned rhysyngsun and unassigned shanbady Sep 12, 2024
@shanbady shanbady added Waiting on author and removed Needs Review An open Pull Request that is ready for review labels Sep 12, 2024
@rhysyngsun rhysyngsun force-pushed the nl/local-opensearch-cluster branch from 091bed3 to 06f8806 Compare September 12, 2024 19:51
@rhysyngsun rhysyngsun merged commit 3bff381 into main Sep 12, 2024
@rhysyngsun rhysyngsun deleted the nl/local-opensearch-cluster branch September 12, 2024 20:02
@odlbot odlbot mentioned this pull request Sep 12, 2024
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants