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

Setup scripts for local dev #30

Conversation

kavilla
Copy link
Member

@kavilla kavilla commented Nov 30, 2023

Setup scripts will assume it's in the root plugin directory of OSD and places the scripts folder into the OSD/scripts folder for run purposes with the following command:

yarn setup

This then will allow from the root OSD directory to run

yarn assistant:start

which will setup up the OpenSearch cluster as expected.


⚠️ Please note, at the time of writing this the feature/os-assistant and feature/2.11/os-assistant added the feature for installing OpenSearch assistant related plugins. Not main or 2.x.

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.

Setup scripts will assume it's in the root plugin directory of OSD
and places the `scripts` folder into the OSD/scripts folder for
run purposes with the following command:
```
yarn setup
```

This then will allow from the root OSD directory to run
```
yarn assistant:start
```
which will setup up the OpenSearch cluster as expected.

Please note, at the time of writing this the feature/os-assistant
and feature/2.11/os-assistant added the feature for installing
OpenSearch assistant related plugins. Not main or 2.x.

Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
@kavilla kavilla force-pushed the kavilla/setup_script branch from 7752435 to acc3701 Compare November 30, 2023 14:05
@kavilla kavilla changed the title Setup scripts and emit event on button click from component Setup scripts for local dev Nov 30, 2023
@kavilla kavilla mentioned this pull request Nov 30, 2023
Copy link
Member

@joshuali925 joshuali925 left a comment

Choose a reason for hiding this comment

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

could you explain the purpose a bit? e.g. why do we need scripts to setup and why does it change core version to 2.11.0? instead of asking users to clone core at 2.11.0 or move development to main

(add_model > $LOGS_DIR/add_model.log 2>&1 || clean) &

export OPENSEARCH_USERNAME=kibanaserver
export OPENSEARCH_PASSWORD=kibanaserver
Copy link
Member

Choose a reason for hiding this comment

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

what if user changed them?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I wish we can change this username for this user since I think it's confusing. This is an internal user. Which I feel like it's not accurate by the description linked as it doesn't feel like a demo user since it has super privileges. It also seems to be able to ignore attempts to remove privileges.

This script utilizes snapshots and anytime that is ran the snapshot will get wiped out clean and will have this super user. Which really is just used for the health check. This part is kind of more like an "easy install". What this does is call to OSD scripts to start up the cluster with security plugin and assistant required plugins. Run all the models stuff and then start up OSD. However, if the user would like to change some stuff then can do that stuff a little bit manually with the following:

In a window run the OpenSearch snapshot:

yarn opensearch snapshot --assistant --security  -E plugins.ml_commons.only_run_on_ml_node=true

run the curl requests.

and then in another window starting up a process of OpenSearch Dashboards

yarn start --security

With that said, I can still modify if a hard blocker. Lemme know!

Copy link
Member

Choose a reason for hiding this comment

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

i see, i asked because i remember logging into someone's dashboards using kibanaserver and people might want to change that. but since it's for development i think it's ok

@kavilla
Copy link
Member Author

kavilla commented Nov 30, 2023

could you explain the purpose a bit? e.g. why do we need scripts to setup and why does it change core version to 2.11.0? instead of asking users to clone core at 2.11.0 or move development to main

For sure, at the time of adding that I wasn't able to get ML commons to work outside of 2.11.0. feature/os-assistant was based on main which is 3.0.0 but I think we should be developing on main so setting the package.json version will then force the snapshot and ML commons plugin to be 2.11. But I agree it's pretty confusing, I think with more usage of ML Commons it would be preferable to have 2.x and main working then this can be removed.

But if we prefer I can remove that.

SuZhou-Joe pushed a commit to SuZhou-Joe/dashboards-assistant that referenced this pull request Dec 1, 2023
* feat: reload history after new session saved

Signed-off-by: Lin Wang <wonglam@amazon.com>

* refactor: remove status in error result

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
@kavilla kavilla closed this Dec 1, 2023
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.

None yet

2 participants