From bdf53c9117f149cfea754e7ddab680c664e1f1a8 Mon Sep 17 00:00:00 2001 From: ashwinkumar12345 Date: Mon, 9 Aug 2021 13:53:04 -0700 Subject: [PATCH 1/4] adding helm --- _dashboards/install/helm.md | 169 +++++++++++++++++++++++++++++++++++ _dashboards/install/index.md | 2 +- _opensearch/install/helm.md | 169 +++++++++++++++++++++++++++++++++++ 3 files changed, 339 insertions(+), 1 deletion(-) create mode 100644 _dashboards/install/helm.md create mode 100644 _opensearch/install/helm.md diff --git a/_dashboards/install/helm.md b/_dashboards/install/helm.md new file mode 100644 index 00000000..ff039439 --- /dev/null +++ b/_dashboards/install/helm.md @@ -0,0 +1,169 @@ +--- +layout: default +title: Helm +parent: Install OpenSearch +nav_order: 2 +--- + +# Helm + +Helm is a package manager that allows you to easily install and manage Elasticsearch in a Kubernetes cluster. You can define your Elasticsearch configurations in a YAML file and use Helm to deploy your applications in a version-controlled and reproducible way. + +The Helm chart contains the resources described in the following table. + +Resource | Description +:--- | :--- +`Chart.yaml` | Information about the chart. +`values.yaml` | Default configuration values for the chart. +`templates` | Templates that combine with values to generate the Kubernetes manifest files. + +The specification in the default Helm chart supports many standard use cases and setups. You can modify the default chart to configure your desired specifications and set Transport Layer Security (TLS) and role-based access control (RBAC). + +For information about the default configuration, steps to configure security, and configurable parameters, see the +[README](https://github.com/opensearch-project/opensearch-devops/blob/main/Helm/README.md). + +The instructions here assume you have a Kubernetes cluster with Helm preinstalled. See the [Kubernetes documentation](https://kubernetes.io/docs/setup/) for steps to configure a Kubernetes cluster and the [Helm documentation](https://helm.sh/docs/intro/install/) to install Helm. +{: .note } + +## Install OpenSearch using Helm + +1. Clone the [Helm/opensearch](https://github.com/opensearch-project/opensearch-devops/) repository: + + ```bash + git clone https://github.com/opensearch-project/opensearch-devops.git + ``` + +1. Change to the `opensearch-dashboards` directory: + + ```bash + cd Helm/opensearch-dashboards + ``` + +1. Package the Helm chart: + + ```bash + helm package . + ``` + +1. Deploy Elasticsearch: + + ```bash + helm install --generate-name opensearch-dashboards-1.0.0.tgz + ``` + +The output shows you the specifications instantiated from the install. +To customize the deployment, pass in the values that you want to override with a custom YAML file: + +```bash +helm install --values=customvalues.yaml opensearch-dashboards-1.0.0.tgz +``` + +#### Sample output + +```yaml +NAME: opensearch-dashboards-1-1628184200 +LAST DEPLOYED: Thu Aug 5 13:23:25 2021 +NAMESPACE: default +STATUS: deployed +REVISION: 1 +TEST SUITE: None +``` + +To make sure your Elasticsearch pod is up and running, run the following command: + +```bash +$ kubectl get pods +NAME READY STATUS RESTARTS AGE +opensearch-cluster-master-0 1/1 Running 0 3m56s +opensearch-cluster-master-1 1/1 Running 0 3m56s +opensearch-cluster-master-2 1/1 Running 0 3m56s +opensearch-dashboards-1-1628184109-584ff47c54-gghf2 1/1 Running 0 5m25s +``` + +To access the Elasticsearch shell: + +```bash +$ kubectl exec -it opensearch-cluster-master-0 -- /bin/bash +``` + +You can send requests to the pod to verify that Elasticsearch is up and running: + +```bash +$ curl -XGET https://localhost:9200 -u 'admin:admin' --insecure +``` + +## Install OpenSearch Dashboards using Helm + +1. Clone the [Helm/opensearch-dashboards](https://github.com/opensearch-project/opensearch-devops/tree/main/Helm/opensearch) repository: + + ```bash + git clone https://github.com/opensearch-project/opensearch-devops/tree/main/Helm/opensearch-dashboards + ``` + +1. Change to the `opensearch-dashboards` directory: + + ```bash + cd opensearch-dashboards + ``` + +1. Package the Helm chart: + + ```bash + helm package . + ``` + +1. Deploy Elasticsearch: + + ```bash + helm install --generate-name opensearch-dashboards-1.0.0.tgz + ``` + +The output shows you the specifications instantiated from the install. +To customize the deployment, pass in the values that you want to override with a custom YAML file: + +```bash +helm install --values=customvalues.yaml opensearch-dashboards-1.0.0.tgz +``` + +#### Sample output + +```yaml +NAME: opensearch-dashboards-1-1628184109 +LAST DEPLOYED: Thu Aug 5 13:21:55 2021 +NAMESPACE: default +STATUS: deployed +REVISION: 1 +TEST SUITE: None +``` + +To get the the application URL, run the following commands: + +``` +export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=opensearch-dashboards,app.kubernetes.io/instance=opensearch-dashboards-1-1628184109" -o jsonpath="{.items[0].metadata.name}") + +export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT +``` + +To set up port forwarding to access Kibana, exit the Elasticsearch shell and run the following command: +```bash +$ kubectl port-forward deployment/opensearch-dashboards-1-1628184109 5601 +``` + +You can now access Kibana from your browser at: http://localhost:5601. + +## Uninstall using Helm + +To identify the opendistro-es deployment to be deleted: + +```bash +helm list +``` + +To delete or uninstall this deployment, run the following command: + +```bash +helm delete +``` diff --git a/_dashboards/install/index.md b/_dashboards/install/index.md index e679a780..aa9a9461 100644 --- a/_dashboards/install/index.md +++ b/_dashboards/install/index.md @@ -9,4 +9,4 @@ redirect_from: # Install and configure OpenSearch Dashboards -OpenSearch Dashboards has two installation options at this time: Docker images and tarballs. +OpenSearch Dashboards has three installation options at this time: Docker images, tarballs, and Helm charts. diff --git a/_opensearch/install/helm.md b/_opensearch/install/helm.md new file mode 100644 index 00000000..05167416 --- /dev/null +++ b/_opensearch/install/helm.md @@ -0,0 +1,169 @@ +--- +layout: default +title: Helm +parent: Install OpenSearch +nav_order: 6 +--- + +# Helm + +Helm is a package manager that allows you to easily install and manage Elasticsearch in a Kubernetes cluster. You can define your Elasticsearch configurations in a YAML file and use Helm to deploy your applications in a version-controlled and reproducible way. + +The Helm chart contains the resources described in the following table. + +Resource | Description +:--- | :--- +`Chart.yaml` | Information about the chart. +`values.yaml` | Default configuration values for the chart. +`templates` | Templates that combine with values to generate the Kubernetes manifest files. + +The specification in the default Helm chart supports many standard use cases and setups. You can modify the default chart to configure your desired specifications and set Transport Layer Security (TLS) and role-based access control (RBAC). + +For information about the default configuration, steps to configure security, and configurable parameters, see the +[README](https://github.com/opensearch-project/opensearch-devops/blob/main/Helm/README.md). + +The instructions here assume you have a Kubernetes cluster with Helm preinstalled. See the [Kubernetes documentation](https://kubernetes.io/docs/setup/) for steps to configure a Kubernetes cluster and the [Helm documentation](https://helm.sh/docs/intro/install/) to install Helm. +{: .note } + +## Install OpenSearch using Helm + +1. Clone the [Helm/opensearch](https://github.com/opensearch-project/opensearch-devops/) repository: + + ```bash + git clone https://github.com/opensearch-project/opensearch-devops.git + ``` + +1. Change to the `opensearch` directory: + + ```bash + cd Helm/opensearch + ``` + +1. Package the Helm chart: + + ```bash + helm package . + ``` + +1. Deploy Elasticsearch: + + ```bash + helm install --generate-name opensearch-1.0.0.tgz + ``` + +The output shows you the specifications instantiated from the install. +To customize the deployment, pass in the values that you want to override with a custom YAML file: + +```bash +helm install --values=customvalues.yaml opensearch-1.0.0.tgz +``` + +#### Sample output + +```yaml +NAME: opensearch-1-1628184200 +LAST DEPLOYED: Thu Aug 5 13:23:25 2021 +NAMESPACE: default +STATUS: deployed +REVISION: 1 +TEST SUITE: None +``` + +To make sure your Elasticsearch pod is up and running, run the following command: + +```bash +$ kubectl get pods +NAME READY STATUS RESTARTS AGE +opensearch-cluster-master-0 1/1 Running 0 3m56s +opensearch-cluster-master-1 1/1 Running 0 3m56s +opensearch-cluster-master-2 1/1 Running 0 3m56s +opensearch-dashboards-1-1628184109-584ff47c54-gghf2 1/1 Running 0 5m25s +``` + +To access the Elasticsearch shell: + +```bash +$ kubectl exec -it opensearch-cluster-master-0 -- /bin/bash +``` + +You can send requests to the pod to verify that Elasticsearch is up and running: + +```bash +$ curl -XGET https://localhost:9200 -u 'admin:admin' --insecure +``` + +## Install OpenSearch Dashboards using Helm + +1. Clone the [Helm/opensearch-dashboards](https://github.com/opensearch-project/opensearch-devops/tree/main/Helm/opensearch) repository: + + ```bash + git clone https://github.com/opensearch-project/opensearch-devops/tree/main/Helm/opensearch-dashboards + ``` + +1. Change to the `opensearch-dashboards` directory: + + ```bash + cd opensearch-dashboards + ``` + +1. Package the Helm chart: + + ```bash + helm package . + ``` + +1. Deploy Elasticsearch: + + ```bash + helm install --generate-name opensearch-dashboards-1.0.0.tgz + ``` + +The output shows you the specifications instantiated from the install. +To customize the deployment, pass in the values that you want to override with a custom YAML file: + +```bash +helm install --values=customvalues.yaml opensearch-dashboards-1.0.0.tgz +``` + +#### Sample output + +```yaml +NAME: opensearch-dashboards-1-1628184109 +LAST DEPLOYED: Thu Aug 5 13:21:55 2021 +NAMESPACE: default +STATUS: deployed +REVISION: 1 +TEST SUITE: None +``` + +To get the the application URL, run the following commands: + +``` +export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=opensearch-dashboards,app.kubernetes.io/instance=opensearch-dashboards-1-1628184109" -o jsonpath="{.items[0].metadata.name}") + +export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + +echo "Visit http://127.0.0.1:8080 to use your application" +kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT +``` + +To set up port forwarding to access Kibana, exit the Elasticsearch shell and run the following command: +```bash +$ kubectl port-forward deployment/opensearch-dashboards-1-1628184109 5601 +``` + +You can now access Kibana from your browser at: http://localhost:5601. + +## Uninstall using Helm + +To identify the opendistro-es deployment to be deleted: + +```bash +helm list +``` + +To delete or uninstall this deployment, run the following command: + +```bash +helm delete +``` From b6f61a753ce3df3e5ae6f577c71fb4930576c3db Mon Sep 17 00:00:00 2001 From: ashwinkumar12345 Date: Sun, 15 Aug 2021 12:03:31 -0700 Subject: [PATCH 2/4] minor fixes --- _dashboards/install/helm.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/_dashboards/install/helm.md b/_dashboards/install/helm.md index ff039439..a31add0e 100644 --- a/_dashboards/install/helm.md +++ b/_dashboards/install/helm.md @@ -33,10 +33,10 @@ The instructions here assume you have a Kubernetes cluster with Helm preinstalle git clone https://github.com/opensearch-project/opensearch-devops.git ``` -1. Change to the `opensearch-dashboards` directory: +1. Change to the `opensearch` directory: ```bash - cd Helm/opensearch-dashboards + cd Helm/opensearch ``` 1. Package the Helm chart: @@ -48,36 +48,37 @@ The instructions here assume you have a Kubernetes cluster with Helm preinstalle 1. Deploy Elasticsearch: ```bash - helm install --generate-name opensearch-dashboards-1.0.0.tgz + helm install --generate-name opensearch-1.0.0.tgz ``` The output shows you the specifications instantiated from the install. To customize the deployment, pass in the values that you want to override with a custom YAML file: ```bash -helm install --values=customvalues.yaml opensearch-dashboards-1.0.0.tgz +helm install --values=customvalues.yaml opensearch-1.0.0.tgz ``` #### Sample output ```yaml -NAME: opensearch-dashboards-1-1628184200 -LAST DEPLOYED: Thu Aug 5 13:23:25 2021 +NAME: opensearch-1-1628710514 +LAST DEPLOYED: Wed Aug 11 19:35:15 2021 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None +NOTES: +Watch all cluster members come up. ``` To make sure your Elasticsearch pod is up and running, run the following command: ```bash $ kubectl get pods -NAME READY STATUS RESTARTS AGE -opensearch-cluster-master-0 1/1 Running 0 3m56s -opensearch-cluster-master-1 1/1 Running 0 3m56s -opensearch-cluster-master-2 1/1 Running 0 3m56s -opensearch-dashboards-1-1628184109-584ff47c54-gghf2 1/1 Running 0 5m25s +NAME READY STATUS RESTARTS AGE +opensearch-cluster-master-0 0/1 ContainerCreating 0 34s +opensearch-cluster-master-1 0/1 ContainerCreating 0 34s +opensearch-cluster-master-2 0/1 ContainerCreating 0 34s ``` To access the Elasticsearch shell: From 60da8fa182d0fbee6cab1ada23335cd22fa5200e Mon Sep 17 00:00:00 2001 From: ashwinkumar12345 Date: Wed, 18 Aug 2021 10:49:46 -0700 Subject: [PATCH 3/4] add steps to install OpenSearch and OpenSearch Dashboards --- _dashboards/install/helm.md | 161 ++++++++++++++---------------------- _opensearch/install/helm.md | 142 ++++++++++++------------------- 2 files changed, 116 insertions(+), 187 deletions(-) diff --git a/_dashboards/install/helm.md b/_dashboards/install/helm.md index a31add0e..25936f1d 100644 --- a/_dashboards/install/helm.md +++ b/_dashboards/install/helm.md @@ -1,13 +1,13 @@ --- layout: default title: Helm -parent: Install OpenSearch -nav_order: 2 +parent: Install OpenSearch Dashboards +nav_order: 35 --- -# Helm +# Run OpenSearch Dashboards using Helm -Helm is a package manager that allows you to easily install and manage Elasticsearch in a Kubernetes cluster. You can define your Elasticsearch configurations in a YAML file and use Helm to deploy your applications in a version-controlled and reproducible way. +Helm is a package manager that allows you to easily install and manage OpenSearch Dashboards in a Kubernetes cluster. You can define your OpenSearch configurations in a YAML file and use Helm to deploy your applications in a version-controlled and reproducible way. The Helm chart contains the resources described in the following table. @@ -25,82 +25,35 @@ For information about the default configuration, steps to configure security, an The instructions here assume you have a Kubernetes cluster with Helm preinstalled. See the [Kubernetes documentation](https://kubernetes.io/docs/setup/) for steps to configure a Kubernetes cluster and the [Helm documentation](https://helm.sh/docs/intro/install/) to install Helm. {: .note } -## Install OpenSearch using Helm +## Prerequisites -1. Clone the [Helm/opensearch](https://github.com/opensearch-project/opensearch-devops/) repository: +Before you get started, you must first use [Helm to install OpenSearch]({{site.url}}{{site.baseurl}}/opensearch/install/helm/). - ```bash - git clone https://github.com/opensearch-project/opensearch-devops.git - ``` +Make sure that you can send requests to your OpenSearch pod: -1. Change to the `opensearch` directory: - - ```bash - cd Helm/opensearch - ``` - -1. Package the Helm chart: - - ```bash - helm package . - ``` - -1. Deploy Elasticsearch: - - ```bash - helm install --generate-name opensearch-1.0.0.tgz - ``` - -The output shows you the specifications instantiated from the install. -To customize the deployment, pass in the values that you want to override with a custom YAML file: - -```bash -helm install --values=customvalues.yaml opensearch-1.0.0.tgz -``` - -#### Sample output - -```yaml -NAME: opensearch-1-1628710514 -LAST DEPLOYED: Wed Aug 11 19:35:15 2021 -NAMESPACE: default -STATUS: deployed -REVISION: 1 -TEST SUITE: None -NOTES: -Watch all cluster members come up. -``` - -To make sure your Elasticsearch pod is up and running, run the following command: - -```bash -$ kubectl get pods -NAME READY STATUS RESTARTS AGE -opensearch-cluster-master-0 0/1 ContainerCreating 0 34s -opensearch-cluster-master-1 0/1 ContainerCreating 0 34s -opensearch-cluster-master-2 0/1 ContainerCreating 0 34s -``` - -To access the Elasticsearch shell: - -```bash -$ kubectl exec -it opensearch-cluster-master-0 -- /bin/bash -``` - -You can send requests to the pod to verify that Elasticsearch is up and running: - -```bash +```json $ curl -XGET https://localhost:9200 -u 'admin:admin' --insecure +{ + "name" : "opensearch-cluster-master-1", + "cluster_name" : "opensearch-cluster", + "cluster_uuid" : "hP2gq5bPS3SLp8Z7wXm8YQ", + "version" : { + "distribution" : "opensearch", + "number" : "1.0.0", + "build_type" : "tar", + "build_hash" : "34550c5b17124ddc59458ef774f6b43a086522e3", + "build_date" : "2021-07-02T23:22:21.383695Z", + "build_snapshot" : false, + "lucene_version" : "8.8.2", + "minimum_wire_compatibility_version" : "6.8.0", + "minimum_index_compatibility_version" : "6.0.0-beta1" + }, + "tagline" : "The OpenSearch Project: https://opensearch.org/" +} ``` ## Install OpenSearch Dashboards using Helm -1. Clone the [Helm/opensearch-dashboards](https://github.com/opensearch-project/opensearch-devops/tree/main/Helm/opensearch) repository: - - ```bash - git clone https://github.com/opensearch-project/opensearch-devops/tree/main/Helm/opensearch-dashboards - ``` - 1. Change to the `opensearch-dashboards` directory: ```bash @@ -113,58 +66,70 @@ $ curl -XGET https://localhost:9200 -u 'admin:admin' --insecure helm package . ``` -1. Deploy Elasticsearch: +1. Deploy OpenSearch Dashboards: ```bash helm install --generate-name opensearch-dashboards-1.0.0.tgz ``` + The output shows you the specifications instantiated from the install. + To customize the deployment, pass in the values that you want to override with a custom YAML file: -The output shows you the specifications instantiated from the install. -To customize the deployment, pass in the values that you want to override with a custom YAML file: - -```bash -helm install --values=customvalues.yaml opensearch-dashboards-1.0.0.tgz -``` + ```bash + helm install --values=customvalues.yaml opensearch-dashboards-1.0.0.tgz + ``` #### Sample output ```yaml -NAME: opensearch-dashboards-1-1628184109 -LAST DEPLOYED: Thu Aug 5 13:21:55 2021 +NAME: opensearch-dashboards-1-1629223356 +LAST DEPLOYED: Tue Aug 17 18:02:37 2021 NAMESPACE: default STATUS: deployed REVISION: 1 TEST SUITE: None +NOTES: +1. Get the application URL by running these commands: + export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=opensearch-dashboards,app.kubernetes.io/instance=op +ensearch-dashboards-1-1629223356" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT ``` -To get the the application URL, run the following commands: +To make sure your OpenSearch Dashboards pod is up and running, run the following command: -``` -export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=opensearch-dashboards,app.kubernetes.io/instance=opensearch-dashboards-1-1628184109" -o jsonpath="{.items[0].metadata.name}") - -export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - -echo "Visit http://127.0.0.1:8080 to use your application" -kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT -``` - -To set up port forwarding to access Kibana, exit the Elasticsearch shell and run the following command: ```bash -$ kubectl port-forward deployment/opensearch-dashboards-1-1628184109 5601 +$ kubectl get pods +NAME READY STATUS RESTARTS AGE +opensearch-cluster-master-0 1/1 Running 0 4m35s +opensearch-cluster-master-1 1/1 Running 0 4m35s +opensearch-cluster-master-2 1/1 Running 0 4m35s +opensearch-dashboards-1-1629223356-758bd8747f-8www5 1/1 Running 0 66s ``` -You can now access Kibana from your browser at: http://localhost:5601. +To set up port forwarding to access OpenSearch Dashboards, exit the OpenSearch shell and run the following command: + +```bash +$ kubectl port-forward deployment/opensearch-dashboards-1-1629223356 5601 +``` + +You can now access OpenSearch Dashboards from your browser at: http://localhost:5601. + ## Uninstall using Helm -To identify the opendistro-es deployment to be deleted: +To identify the OpenSearch Dashboards deployment that you want to delete: ```bash -helm list +$ helm list +NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION +opensearch-1-1629223146 default 1 2021-08-17 17:59:07.664498239 +0000 UTCdeployedopensearch-1.0.0 1.0.0 +opensearch-dashboards-1-1629223356 default 1 2021-08-17 18:02:37.600796946 +0000 UTCdepl +oyedopensearch-dashboards-1.0.0 1.0.0 ``` -To delete or uninstall this deployment, run the following command: +To delete or uninstall a deployment, run the following command: ```bash -helm delete +helm delete opensearch-dashboards-1-1629223356 ``` diff --git a/_opensearch/install/helm.md b/_opensearch/install/helm.md index 05167416..a61eb2fb 100644 --- a/_opensearch/install/helm.md +++ b/_opensearch/install/helm.md @@ -5,9 +5,9 @@ parent: Install OpenSearch nav_order: 6 --- -# Helm +# Run OpenSearch using Helm -Helm is a package manager that allows you to easily install and manage Elasticsearch in a Kubernetes cluster. You can define your Elasticsearch configurations in a YAML file and use Helm to deploy your applications in a version-controlled and reproducible way. +Helm is a package manager that allows you to easily install and manage OpenSearch in a Kubernetes cluster. You can define your OpenSearch configurations in a YAML file and use Helm to deploy your applications in a version-controlled and reproducible way. The Helm chart contains the resources described in the following table. @@ -25,9 +25,13 @@ For information about the default configuration, steps to configure security, an The instructions here assume you have a Kubernetes cluster with Helm preinstalled. See the [Kubernetes documentation](https://kubernetes.io/docs/setup/) for steps to configure a Kubernetes cluster and the [Helm documentation](https://helm.sh/docs/intro/install/) to install Helm. {: .note } +## Prerequisites + +The default Helm chart deploys a 3-node cluster. We recommend that you have 8 GiB of memory available for this deployment. You can expect the deployment to fail if, say, you have less than 4 GiB of memory available. + ## Install OpenSearch using Helm -1. Clone the [Helm/opensearch](https://github.com/opensearch-project/opensearch-devops/) repository: +1. Clone the [opensearch-devops](https://github.com/opensearch-project/opensearch-devops/) repository: ```bash git clone https://github.com/opensearch-project/opensearch-devops.git @@ -45,31 +49,33 @@ The instructions here assume you have a Kubernetes cluster with Helm preinstalle helm package . ``` -1. Deploy Elasticsearch: +1. Deploy OpenSearch: ```bash helm install --generate-name opensearch-1.0.0.tgz ``` + The output shows you the specifications instantiated from the install. + To customize the deployment, pass in the values that you want to override with a custom YAML file: -The output shows you the specifications instantiated from the install. -To customize the deployment, pass in the values that you want to override with a custom YAML file: - -```bash -helm install --values=customvalues.yaml opensearch-1.0.0.tgz -``` + ```bash + helm install --values=customvalues.yaml opensearch-1.0.0.tgz + ``` #### Sample output -```yaml -NAME: opensearch-1-1628184200 -LAST DEPLOYED: Thu Aug 5 13:23:25 2021 -NAMESPACE: default -STATUS: deployed -REVISION: 1 -TEST SUITE: None -``` + ```yaml + NAME: opensearch-1-1629223146 + LAST DEPLOYED: Tue Aug 17 17:59:07 2021 + NAMESPACE: default + STATUS: deployed + REVISION: 1 + TEST SUITE: None + NOTES: + Watch all cluster members come up. + $ kubectl get pods --namespace=default -l app=opensearch-cluster-master -w + ``` -To make sure your Elasticsearch pod is up and running, run the following command: +To make sure your OpenSearch pod is up and running, run the following command: ```bash $ kubectl get pods @@ -77,93 +83,51 @@ NAME READY STATUS RESTARTS opensearch-cluster-master-0 1/1 Running 0 3m56s opensearch-cluster-master-1 1/1 Running 0 3m56s opensearch-cluster-master-2 1/1 Running 0 3m56s -opensearch-dashboards-1-1628184109-584ff47c54-gghf2 1/1 Running 0 5m25s ``` -To access the Elasticsearch shell: +To access the OpenSearch shell: ```bash $ kubectl exec -it opensearch-cluster-master-0 -- /bin/bash ``` -You can send requests to the pod to verify that Elasticsearch is up and running: +You can send requests to the pod to verify that OpenSearch is up and running: -```bash +```json $ curl -XGET https://localhost:9200 -u 'admin:admin' --insecure +{ + "name" : "opensearch-cluster-master-1", + "cluster_name" : "opensearch-cluster", + "cluster_uuid" : "hP2gq5bPS3SLp8Z7wXm8YQ", + "version" : { + "distribution" : "opensearch", + "number" : "1.0.0", + "build_type" : "tar", + "build_hash" : "34550c5b17124ddc59458ef774f6b43a086522e3", + "build_date" : "2021-07-02T23:22:21.383695Z", + "build_snapshot" : false, + "lucene_version" : "8.8.2", + "minimum_wire_compatibility_version" : "6.8.0", + "minimum_index_compatibility_version" : "6.0.0-beta1" + }, + "tagline" : "The OpenSearch Project: https://opensearch.org/" +} ``` -## Install OpenSearch Dashboards using Helm - -1. Clone the [Helm/opensearch-dashboards](https://github.com/opensearch-project/opensearch-devops/tree/main/Helm/opensearch) repository: - - ```bash - git clone https://github.com/opensearch-project/opensearch-devops/tree/main/Helm/opensearch-dashboards - ``` - -1. Change to the `opensearch-dashboards` directory: - - ```bash - cd opensearch-dashboards - ``` - -1. Package the Helm chart: - - ```bash - helm package . - ``` - -1. Deploy Elasticsearch: - - ```bash - helm install --generate-name opensearch-dashboards-1.0.0.tgz - ``` - -The output shows you the specifications instantiated from the install. -To customize the deployment, pass in the values that you want to override with a custom YAML file: - -```bash -helm install --values=customvalues.yaml opensearch-dashboards-1.0.0.tgz -``` - -#### Sample output - -```yaml -NAME: opensearch-dashboards-1-1628184109 -LAST DEPLOYED: Thu Aug 5 13:21:55 2021 -NAMESPACE: default -STATUS: deployed -REVISION: 1 -TEST SUITE: None -``` - -To get the the application URL, run the following commands: - -``` -export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=opensearch-dashboards,app.kubernetes.io/instance=opensearch-dashboards-1-1628184109" -o jsonpath="{.items[0].metadata.name}") - -export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - -echo "Visit http://127.0.0.1:8080 to use your application" -kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT -``` - -To set up port forwarding to access Kibana, exit the Elasticsearch shell and run the following command: -```bash -$ kubectl port-forward deployment/opensearch-dashboards-1-1628184109 5601 -``` - -You can now access Kibana from your browser at: http://localhost:5601. - ## Uninstall using Helm -To identify the opendistro-es deployment to be deleted: +To identify the OpenSearch deployment that you want to delete: ```bash -helm list +$ helm list +NAME NAMESPACEREVISIONUPDATED STATUS CHART APP VERSION +opensearch-1-1629223146 default 1 2021-08-17 17:59:07.664498239 +0000 UTCdeployedopensearch-1.0.0 1.0.0 ``` -To delete or uninstall this deployment, run the following command: +To delete or uninstall a deployment, run the following command: ```bash -helm delete +helm delete opensearch-1-1629223146 ``` + +For steps to install OpenSearch Dashboards, see [Helm to install OpenSearch Dashboards]({{site.url}}{{site.baseurl}}/dashboards/install/helm/). From 3901ea23c1f91929190e6e0e3d46beb935d58fd2 Mon Sep 17 00:00:00 2001 From: ashwinkumar12345 Date: Wed, 18 Aug 2021 23:03:48 -0700 Subject: [PATCH 4/4] incorporated feedback --- _opensearch/install/helm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_opensearch/install/helm.md b/_opensearch/install/helm.md index a61eb2fb..a5bc7d50 100644 --- a/_opensearch/install/helm.md +++ b/_opensearch/install/helm.md @@ -27,7 +27,7 @@ The instructions here assume you have a Kubernetes cluster with Helm preinstalle ## Prerequisites -The default Helm chart deploys a 3-node cluster. We recommend that you have 8 GiB of memory available for this deployment. You can expect the deployment to fail if, say, you have less than 4 GiB of memory available. +The default Helm chart deploys a three-node cluster. We recommend that you have at least 8 GiB of memory available for this deployment. You can expect the deployment to fail if, say, you have less than 4 GiB of memory available. ## Install OpenSearch using Helm