Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions to run OpenSearch from source code #3512

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Yerzhaisang
Copy link
Contributor

Description

While working on a recent issue, I faced challenges figuring out how to test my implementation locally. Thankfully, @brianf-aws guided me on how to run ml-commons from the source code.

To help new contributors avoid similar confusion, I’ve added clear instructions on how to build and run OpenSearch from source, enabling them to test their changes effectively.

Related Issues

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@opensearch-trigger-bot opensearch-trigger-bot bot added the documentation Improvements or additions to documentation label Feb 6, 2025
@Yerzhaisang Yerzhaisang had a problem deploying to ml-commons-cicd-env-require-approval February 6, 2025 22:15 — with GitHub Actions Failure
@Yerzhaisang Yerzhaisang had a problem deploying to ml-commons-cicd-env-require-approval February 6, 2025 22:15 — with GitHub Actions Failure
DEVELOPER_GUIDE.md Outdated Show resolved Hide resolved
dev-docker-compose.yml Outdated Show resolved Hide resolved
DEVELOPER_GUIDE.md Outdated Show resolved Hide resolved
@dhrubo-os
Copy link
Collaborator

Thanks a lot for raising this PR; it's something I've been planning to raise for a while! :D

Copy link
Contributor

@brianf-aws brianf-aws left a comment

Choose a reason for hiding this comment

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

Thanks for taking the initiative! Left some comments to enhance the tutorial

DEVELOPER_GUIDE.md Outdated Show resolved Hide resolved
DEVELOPER_GUIDE.md Show resolved Hide resolved
DEVELOPER_GUIDE.md Outdated Show resolved Hide resolved
dev-docker-compose.yml Outdated Show resolved Hide resolved
dev-docker-compose.yml Outdated Show resolved Hide resolved
@@ -0,0 +1,125 @@
version: '3'
Copy link
Contributor

Choose a reason for hiding this comment

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

We can also explain what this is doing for example you can create a OS cluster (2 data nodes 2 ml nodes) running your custom Ml-Commons code. We should also imply that this does not run OSD (OS dashboards)

Copy link
Collaborator

Choose a reason for hiding this comment

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

May be we can add this too so that OSD can be added to the setup too [We might need to add : opensearchstaging/opensearch:3.0.0]:

opensearch-dashboards:
    image: opensearchstaging/opensearch-dashboards:latest
    container_name: opensearch-dashboards
    ports:
      - 5601:5601
    expose:
      - "5601"
    environment:
      OPENSEARCH_HOSTS: '["https://opensearch-node1:9200","https://opensearch-node2:9200"]'
    networks:
      - opensearch-net

Copy link
Contributor

Choose a reason for hiding this comment

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

@Yerzhaisang Be careful when adding the dashboards part. You would need to set the security plugin on (it turns on https between nodes.)

      - "DISABLE_SECURITY_PLUGIN=false"

or omitting it should help you use https

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hey @dhrubo-os , should these lines work?
When I open dashboard, I see only OpenSearch Dashboards server is not ready yet

Copy link
Contributor

Choose a reason for hiding this comment

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

@Yerzhaisang This part is tricky; when you do dashboards it expects https nodes check your OS nodes to see that security plugin is turned on.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so does developer really need dashboards or is it possible to handle anything with curl and apps like Postman ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good question, When I need to test something involving a system index I cant use dashboards as it requires https traffic which means the security plugin needs to be turned on. This is just my dev experience I dont have these options down to a science. Also from my experience its hard to debug when you have dashboards enabled it tends to time out (there is some setting to extend this time for OSD to wait for a response).

If your testing usually doesnt involve using the security plugin removed then dashboards is nice to use.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dhrubo-os could you please share your opinion? I think a developer doesn't need OSD (my opinion)

DEVELOPER_GUIDE.md Outdated Show resolved Hide resolved
@ylwu-amzn
Copy link
Collaborator

How about move the docker compose file to docs/docker ?

@dhrubo-os
Copy link
Collaborator

dhrubo-os commented Feb 10, 2025

@Yerzhaisang take updates from upstream for integ tests to pass.

@Yerzhaisang Yerzhaisang had a problem deploying to ml-commons-cicd-env-require-approval February 11, 2025 20:44 — with GitHub Actions Failure
@Yerzhaisang Yerzhaisang temporarily deployed to ml-commons-cicd-env-require-approval February 11, 2025 20:44 — with GitHub Actions Inactive
@Yerzhaisang Yerzhaisang had a problem deploying to ml-commons-cicd-env-require-approval February 11, 2025 22:26 — with GitHub Actions Failure
@Yerzhaisang Yerzhaisang had a problem deploying to ml-commons-cicd-env-require-approval February 11, 2025 22:26 — with GitHub Actions Failure
@Yerzhaisang Yerzhaisang requested a deployment to ml-commons-cicd-env-require-approval February 11, 2025 22:41 — with GitHub Actions Waiting
@Yerzhaisang Yerzhaisang requested a deployment to ml-commons-cicd-env-require-approval February 11, 2025 22:41 — with GitHub Actions Waiting
@Yerzhaisang Yerzhaisang requested a deployment to ml-commons-cicd-env-require-approval February 18, 2025 19:41 — with GitHub Actions Waiting
@Yerzhaisang Yerzhaisang requested a deployment to ml-commons-cicd-env-require-approval February 18, 2025 19:41 — with GitHub Actions Waiting
@Yerzhaisang Yerzhaisang requested a deployment to ml-commons-cicd-env-require-approval February 18, 2025 19:41 — with GitHub Actions Waiting
@Yerzhaisang Yerzhaisang requested a deployment to ml-commons-cicd-env-require-approval February 18, 2025 19:41 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants