-
-
Notifications
You must be signed in to change notification settings - Fork 0
Document the OpenSearch operator #14
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
496194c
Copy the docs from the superset-operator
siegfriedweber d42cc25
Adapt docs/modules/opensearch/pages/index.adoc
siegfriedweber 25cb677
Merge branch 'main' into docs
siegfriedweber f8c2fea
Run pre-commit
siegfriedweber 4abaa11
Adapt the getting started guide
siegfriedweber bddc7b0
doc: Remove usage guides with unimplemented features
siegfriedweber 3f63f60
doc: Adapt resource page
siegfriedweber e29da66
doc: Adapt overrides page
siegfriedweber 5167263
doc: Adapt the operations pages
siegfriedweber 5334059
doc: Adapt the reference pages
siegfriedweber ca016a1
doc: Add the node roles page
siegfriedweber 3327c55
feat: Add node role coordinating_only
siegfriedweber ce184d2
doc: Fix typos and improve style
siegfriedweber a9b79a2
Merge branch 'main' into docs
siegfriedweber 7a6dbd5
doc: Fix typo
siegfriedweber 3254e23
doc: Fix typo
siegfriedweber c63f5e5
doc: Fix typo
siegfriedweber bf8004e
doc: Fix typo
siegfriedweber dcac90f
doc: Increase timeout
siegfriedweber d4690ff
Merge branch 'docs' of github.com:stackabletech/opensearch-operator i…
siegfriedweber f0511ad
doc: Clarify the term "role"
siegfriedweber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| version: 0.1.0 | ||
| spec: | ||
| units: [] | ||
| properties: [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| --- | ||
| name: home | ||
| version: "nightly" |
109 changes: 109 additions & 0 deletions
109
docs/modules/opensearch/examples/getting_started/getting_started.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| #! /usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # DO NOT EDIT THE SCRIPT | ||
| # Instead, update the j2 template, and regenerate it for dev with `make render-docs`. | ||
|
|
||
| # This script contains all the code snippets from the guide, as well as some assert tests | ||
| # to test if the instructions in the guide work. The user *could* use it, but it is intended | ||
| # for testing only. | ||
| # The script will install the operators, create a OpenSearch instance and briefly open a port | ||
| # forward and connect to the OpenSearch instance to make sure it is up and running. | ||
| # No running processes are left behind (i.e. the port-forwarding is closed at the end) | ||
|
|
||
| if [ $# -eq 0 ] | ||
| then | ||
| echo "Installation method argument ('helm' or 'stackablectl') required." | ||
| exit 1 | ||
| fi | ||
|
|
||
| cd "$(dirname "$0")" | ||
|
|
||
| case "$1" in | ||
| "helm") | ||
| echo "Installing Operators with Helm" | ||
| # tag::helm-install-operators[] | ||
| helm install --wait commons-operator oci://oci.stackable.tech/sdp-charts/commons-operator --version 0.0.0-dev | ||
| helm install --wait secret-operator oci://oci.stackable.tech/sdp-charts/secret-operator --version 0.0.0-dev | ||
| helm install --wait listener-operator oci://oci.stackable.tech/sdp-charts/listener-operator --version 0.0.0-dev | ||
| helm install --wait opensearch-operator oci://oci.stackable.tech/sdp-charts/opensearch-operator --version 0.0.0-dev | ||
| # end::helm-install-operators[] | ||
| ;; | ||
| "stackablectl") | ||
| echo "installing Operators with stackablectl" | ||
| # tag::stackablectl-install-operators[] | ||
| stackablectl operator install \ | ||
| commons=0.0.0-dev \ | ||
| secret=0.0.0-dev \ | ||
| listener=0.0.0-dev \ | ||
| opensearch=0.0.0-dev | ||
| # end::stackablectl-install-operators[] | ||
| ;; | ||
| *) | ||
| echo "Need to give 'helm' or 'stackablectl' as an argument for which installation method to use!" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| echo "Creating OpenSearch security plugin configuration" | ||
| # tag::apply-security-config[] | ||
| kubectl apply -f opensearch-security-config.yaml | ||
| # end::apply-security-config[] | ||
|
|
||
| echo "Creating OpenSearch cluster" | ||
| # tag::apply-cluster[] | ||
| kubectl apply -f opensearch.yaml | ||
| # end::apply-cluster[] | ||
|
|
||
| sleep 5 | ||
|
|
||
| for (( i=1; i<=15; i++ )) | ||
| do | ||
| echo "Waiting for OpenSearchCluster to appear ..." | ||
| if eval kubectl get statefulset simple-opensearch-nodes-default; then | ||
| break | ||
| fi | ||
|
|
||
| sleep 1 | ||
| done | ||
|
|
||
| echo "Waiting on OpenSearch StatefulSet ..." | ||
| # tag::await-cluster[] | ||
| kubectl rollout status --watch statefulset/simple-opensearch-nodes-default --timeout 300s | ||
| # end::await-cluster[] | ||
|
|
||
| # wait a bit for the port to open | ||
| sleep 10 | ||
|
|
||
| echo "Starting port-forwarding of port 9200" | ||
| # tag::port-forwarding[] | ||
| kubectl port-forward services/simple-opensearch 9200 > /dev/null 2>&1 & | ||
| # end::port-forwarding[] | ||
| PORT_FORWARD_PID=$! | ||
| # shellcheck disable=2064 # we want the PID evaluated now, not at the time the trap is | ||
| trap "kill $PORT_FORWARD_PID" EXIT | ||
| sleep 5 | ||
|
|
||
| echo "Using the REST API" | ||
| # tag::rest-api[] | ||
| export CREDENTIALS=admin:AJVFsGJBbpT6mChn | ||
|
|
||
| curl \ | ||
| --insecure \ | ||
| --user $CREDENTIALS \ | ||
| --request PUT \ | ||
| --json '{"name": "Stackable"}' \ | ||
| https://localhost:9200/sample_index/_doc/1 | ||
|
|
||
| # Output: | ||
| # {"_index":"sample_index","_id":"1","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":0,"_primary_term":1} | ||
|
|
||
| curl \ | ||
| --insecure \ | ||
| --user $CREDENTIALS \ | ||
| --request GET \ | ||
| https://localhost:9200/sample_index/_doc/1 | ||
|
|
||
| # Output: | ||
| # {"_index":"sample_index","_id":"1","_version":1,"_seq_no":0,"_primary_term":1,"found":true,"_source":{"name": "Stackable"}} | ||
| # end::rest-api[] |
109 changes: 109 additions & 0 deletions
109
docs/modules/opensearch/examples/getting_started/getting_started.sh.j2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| #! /usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| # DO NOT EDIT THE SCRIPT | ||
| # Instead, update the j2 template, and regenerate it for dev with `make render-docs`. | ||
|
|
||
| # This script contains all the code snippets from the guide, as well as some assert tests | ||
| # to test if the instructions in the guide work. The user *could* use it, but it is intended | ||
| # for testing only. | ||
| # The script will install the operators, create a OpenSearch instance and briefly open a port | ||
| # forward and connect to the OpenSearch instance to make sure it is up and running. | ||
| # No running processes are left behind (i.e. the port-forwarding is closed at the end) | ||
|
|
||
| if [ $# -eq 0 ] | ||
| then | ||
| echo "Installation method argument ('helm' or 'stackablectl') required." | ||
| exit 1 | ||
| fi | ||
|
|
||
| cd "$(dirname "$0")" | ||
|
|
||
| case "$1" in | ||
| "helm") | ||
| echo "Installing Operators with Helm" | ||
| # tag::helm-install-operators[] | ||
| helm install --wait commons-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/commons-operator --version {{ versions.commons }} | ||
| helm install --wait secret-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/secret-operator --version {{ versions.secret }} | ||
| helm install --wait listener-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/listener-operator --version {{ versions.listener }} | ||
| helm install --wait opensearch-operator oci://{{ helm.repo_url }}/{{ helm.repo_name }}/opensearch-operator --version {{ versions.opensearch }} | ||
| # end::helm-install-operators[] | ||
| ;; | ||
| "stackablectl") | ||
| echo "installing Operators with stackablectl" | ||
| # tag::stackablectl-install-operators[] | ||
| stackablectl operator install \ | ||
| commons={{ versions.commons }} \ | ||
| secret={{ versions.secret }} \ | ||
| listener={{ versions.listener }} \ | ||
| opensearch={{ versions.opensearch }} | ||
| # end::stackablectl-install-operators[] | ||
| ;; | ||
| *) | ||
| echo "Need to give 'helm' or 'stackablectl' as an argument for which installation method to use!" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| echo "Creating OpenSearch security plugin configuration" | ||
| # tag::apply-security-config[] | ||
| kubectl apply -f opensearch-security-config.yaml | ||
| # end::apply-security-config[] | ||
|
|
||
| echo "Creating OpenSearch cluster" | ||
| # tag::apply-cluster[] | ||
| kubectl apply -f opensearch.yaml | ||
| # end::apply-cluster[] | ||
|
|
||
| sleep 5 | ||
|
|
||
| for (( i=1; i<=15; i++ )) | ||
| do | ||
| echo "Waiting for OpenSearchCluster to appear ..." | ||
| if eval kubectl get statefulset simple-opensearch-nodes-default; then | ||
| break | ||
| fi | ||
|
|
||
| sleep 1 | ||
| done | ||
|
|
||
| echo "Waiting on OpenSearch StatefulSet ..." | ||
| # tag::await-cluster[] | ||
| kubectl rollout status --watch statefulset/simple-opensearch-nodes-default --timeout 300s | ||
| # end::await-cluster[] | ||
|
|
||
| # wait a bit for the port to open | ||
| sleep 10 | ||
|
|
||
| echo "Starting port-forwarding of port 9200" | ||
| # tag::port-forwarding[] | ||
| kubectl port-forward services/simple-opensearch 9200 > /dev/null 2>&1 & | ||
| # end::port-forwarding[] | ||
| PORT_FORWARD_PID=$! | ||
| # shellcheck disable=2064 # we want the PID evaluated now, not at the time the trap is | ||
| trap "kill $PORT_FORWARD_PID" EXIT | ||
| sleep 5 | ||
|
|
||
| echo "Using the REST API" | ||
| # tag::rest-api[] | ||
| export CREDENTIALS=admin:AJVFsGJBbpT6mChn | ||
|
|
||
| curl \ | ||
| --insecure \ | ||
| --user $CREDENTIALS \ | ||
| --request PUT \ | ||
| --json '{"name": "Stackable"}' \ | ||
| https://localhost:9200/sample_index/_doc/1 | ||
|
|
||
| # Output: | ||
| # {"_index":"sample_index","_id":"1","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":0,"_primary_term":1} | ||
|
|
||
| curl \ | ||
| --insecure \ | ||
| --user $CREDENTIALS \ | ||
| --request GET \ | ||
| https://localhost:9200/sample_index/_doc/1 | ||
|
|
||
| # Output: | ||
| # {"_index":"sample_index","_id":"1","_version":1,"_seq_no":0,"_primary_term":1,"found":true,"_source":{"name": "Stackable"}} | ||
| # end::rest-api[] | ||
4 changes: 4 additions & 0 deletions
4
docs/modules/opensearch/examples/getting_started/install_output.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Installed commons=0.0.0-dev operator | ||
| Installed secret=0.0.0-dev operator | ||
| Installed listener=0.0.0-dev operator | ||
| Installed opensearch=0.0.0-dev operator |
4 changes: 4 additions & 0 deletions
4
docs/modules/opensearch/examples/getting_started/install_output.txt.j2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Installed commons={{ versions.commons }} operator | ||
| Installed secret={{ versions.secret }} operator | ||
| Installed listener={{ versions.listener }} operator | ||
| Installed opensearch={{ versions.opensearch }} operator |
94 changes: 94 additions & 0 deletions
94
docs/modules/opensearch/examples/getting_started/opensearch-security-config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: opensearch-security-config | ||
| stringData: | ||
| action_groups.yml: | | ||
| --- | ||
| _meta: | ||
| type: actiongroups | ||
| config_version: 2 | ||
| allowlist.yml: | | ||
| --- | ||
| _meta: | ||
| type: allowlist | ||
| config_version: 2 | ||
|
|
||
| config: | ||
| enabled: false | ||
| audit.yml: | | ||
| --- | ||
| _meta: | ||
| type: audit | ||
| config_version: 2 | ||
|
|
||
| config: | ||
| enabled: false | ||
| config.yml: | | ||
| --- | ||
| _meta: | ||
| type: config | ||
| config_version: 2 | ||
|
|
||
| config: | ||
| dynamic: | ||
| authc: | ||
| basic_internal_auth_domain: | ||
| description: Authenticate via HTTP Basic against internal users database | ||
| http_enabled: true | ||
| transport_enabled: true | ||
| order: 1 | ||
| http_authenticator: | ||
| type: basic | ||
| challenge: true | ||
| authentication_backend: | ||
| type: intern | ||
| authz: {} | ||
| internal_users.yml: | | ||
| --- | ||
| _meta: | ||
| type: internalusers | ||
| config_version: 2 | ||
|
|
||
| admin: | ||
| hash: $2y$10$xRtHZFJ9QhG9GcYhRpAGpufCZYsk//nxsuel5URh0GWEBgmiI4Q/e | ||
| reserved: true | ||
| backend_roles: | ||
| - admin | ||
| description: OpenSearch admin user | ||
|
|
||
| kibanaserver: | ||
| hash: $2y$10$vPgQ/6ilKDM5utawBqxoR.7euhVQ0qeGl8mPTeKhmFT475WUDrfQS | ||
| reserved: true | ||
| description: OpenSearch Dashboards user | ||
| nodes_dn.yml: | | ||
| --- | ||
| _meta: | ||
| type: nodesdn | ||
| config_version: 2 | ||
| roles.yml: | | ||
| --- | ||
| _meta: | ||
| type: roles | ||
| config_version: 2 | ||
| roles_mapping.yml: | | ||
| --- | ||
| _meta: | ||
| type: rolesmapping | ||
| config_version: 2 | ||
|
|
||
| all_access: | ||
| reserved: false | ||
| backend_roles: | ||
| - admin | ||
|
|
||
| kibana_server: | ||
| reserved: true | ||
| users: | ||
| - kibanaserver | ||
| tenants.yml: | | ||
| --- | ||
| _meta: | ||
| type: tenants | ||
| config_version: 2 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.