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

[Update Documentation] Getting started with OpenSearch-Benchmark! #383

Closed
AkshathRaghav opened this issue Oct 5, 2023 · 0 comments
Closed
Labels
documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers

Comments

@AkshathRaghav
Copy link
Contributor

Context:
There are different ways to get started with running a cluster and running a benchmark against it.
I was trying to use the docker-compose.yml from opensearch.org, but was facing SSL issues, so I thought I'd make this "guide" so everyone can get started with it quickly!
Below, I'm going to outline the simplest set of instructions I've found for getting started with OSB for the first time. Huge thanks to @IanHoang and @rishabh6788 for helping everyone in Slack.

Steps:
This can be reproduced on both Linux and Windows (WSL).

  1. Download the tar.gz from https://opensearch.org/downloads.html. If you are using WSL, I'd recommend downloading this using wget into your /home/ directory instead of /mnt/c.
wget https://artifacts.opensearch.org/releases/bundle/opensearch/2.10.0/opensearch-2.10.0-linux-x64.tar.gz
  1. Extract the folder
tar -xf opensearch-2.10.0-linux-x64.tar.gz
cd opensearch-2.10.0
  1. Add following settings to the opensearch.yml file under the config directory
vim config/opensearch.yml
discovery.type: single-node 
plugins.security.disabled: true 
  1. Run the opensearch-tar-install.sh script.
bash opensearch-tar-install.sh
  1. Check the output of curl.exe "http://localhost:9200/_cluster/health?pretty". Output should be similar to this:
{
  "cluster_name" : "<name>",
  "status" : "green",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "discovered_master" : true,
  "discovered_cluster_manager" : true,
  "active_primary_shards" : 3,
  "active_shards" : 3,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}
  1. Before we move on, make sure to have gone through the DEVELOPER_GUIDE.md and activated your virtual environment. TIP: Just to avoid Pyenv breaking, run the following command before you reach this step ^^
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev git
  1. For the last step, we'd be executing the geonames benchmark which can be found from the workloads repo.
opensearch-benchmark execute-test --pipeline=benchmark-only --workload=geonames --target-host=127.0.0.1:9200 --test-mode --workload-params '{"number_of_shards":"1","number_of_replicas":"0"}'

And we should be done! You should be seeing the performance metrics!
If you are not seeing any results immediately, it should be an indicator that there is an issue with your cluster. Use the command below to view the cluster logs

tail -f ~/.bencmark/logs/bechmark.log
@AkshathRaghav AkshathRaghav added bug Something isn't working untriaged labels Oct 5, 2023
@IanHoang IanHoang added documentation Improvements or additions to documentation enhancement New feature or request and removed untriaged bug Something isn't working labels Oct 5, 2023
@IanHoang IanHoang changed the title Getting started with OpenSearch-Benchmark! [Update Documentation] Getting started with OpenSearch-Benchmark! Oct 5, 2023
@IanHoang IanHoang added the good first issue Good for newcomers label Oct 5, 2023
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 enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants