From 35134971f8b8c717ff11efa15896e402936ebb34 Mon Sep 17 00:00:00 2001 From: josh-wong Date: Fri, 8 Nov 2024 06:07:53 +0000 Subject: [PATCH 1/3] AUTO: Sync Helm Charts docs to ScalarDB Enterprise docs site repo --- .../getting-started-scalar-manager.mdx | 179 +++++++++++------- .../how-to-deploy-scalar-products.mdx | 2 +- 2 files changed, 108 insertions(+), 73 deletions(-) diff --git a/docs/helm-charts/getting-started-scalar-manager.mdx b/docs/helm-charts/getting-started-scalar-manager.mdx index a09fb0b9..9ee9f941 100644 --- a/docs/helm-charts/getting-started-scalar-manager.mdx +++ b/docs/helm-charts/getting-started-scalar-manager.mdx @@ -3,30 +3,30 @@ tags: - Enterprise Option --- -# Getting Started with Helm Charts (Scalar Manager) +# Deploy Scalar Manager -Scalar Manager is a centralized management and monitoring solution for ScalarDB and ScalarDL within Kubernetes cluster environments that allows you to: +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; -* Check the availability of ScalarDB or ScalarDL. -* Schedule or execute pausing jobs that create transactionally consistent periods in the databases used by ScalarDB or ScalarDL. -* Check the time-series metrics and logs of ScalarDB or ScalarDL through Grafana dashboards. +[Scalar Manager](../scalar-manager/overview.mdx) is a centralized management and monitoring solution for ScalarDB and ScalarDL within Kubernetes cluster environments that allows you to: -For more details, refer to [Scalar Manager Overview](../scalar-manager/overview.mdx). +- Check the availability of ScalarDB or ScalarDL. +- Schedule or execute pausing jobs that create transactionally consistent periods in the databases used by ScalarDB or ScalarDL. +- Check the time-series metrics and logs of ScalarDB or ScalarDL through Grafana dashboards. -This guide will show you how to deploy and access Scalar Manager on a Kubernetes cluster. +This guide explains how to deploy and access Scalar Manager on a Kubernetes cluster by using Scalar Helm Charts. -## Assumption +## Prerequisites -This guide assumes that you are aware of how to deploy ScalarDB or ScalarDL with the [monitoring](getting-started-monitoring.mdx) and [logging](getting-started-logging.mdx) tools to a Kubernetes cluster. +Before you deploy Scalar Manager, you must do the following: -## Requirement +- Install the tools mentioned in [Getting Started with Scalar Helm Charts](getting-started-scalar-helm-charts.mdx). +- Deploy `kube-prometheus-stack` according to the instructions in [Getting Started with Helm Charts (Monitoring using Prometheus Operator)](getting-started-monitoring.mdx). +- Deploy `loki-stack` according to the instructions in [Getting Started with Helm Charts (Logging using Loki Stack)](getting-started-logging.mdx). -* You must deploy `kube-prometheus-stack` according to the instructions in [Getting Started with Helm Charts (Monitoring using Prometheus Operator)](getting-started-monitoring.mdx). -* You must deploy `loki-stack` according to the instructions in [Getting Started with Helm Charts (Logging using Loki Stack)](getting-started-logging.mdx). +## Deployment architecture diagram -## What we create - -We will deploy the following components on a Kubernetes cluster as follows. +The following is an architecture diagram for the components deployed in a Kubernetes cluster. ``` +--------------------------------------------------------------------------------------------------+ @@ -60,94 +60,129 @@ We will deploy the following components on a Kubernetes cluster as follows. | | | Kubernetes | +----+-----------------------+---------------------------------------------------------------------+ | | - expose to localhost (127.0.0.1) or use load balancer etc to access + Expose the environment to localhost (127.0.0.1) or use a load balancer to access it | | - (Access Dashboard through HTTP) + (Access the dashboard through HTTP) | | +----+----+ +----+----+ | Browser | <-(Embed)-- + Browser | +---------+ +---------+ ``` -## Step 1. Upgrade the `kube-prometheus-stack` to allow Grafana to be embedded +## Step 1. Start minikube + +Open **Terminal**, and start minikube by running the following command: + +```console +minikube start +``` + +## Step 2. Upgrade the `kube-prometheus-stack` to allow Grafana to be embedded + +In your custom values file for `kube-prometheus-stack` (for example, `scalar-prometheus-custom-values.yaml`), add the following configurations or revise them if they already exist: + +```yaml +kubeStateMetrics: + enabled: true + +nodeExporter: + enabled: true + +kubelet: + enabled: true + +grafana: + grafana.ini: + users: + default_theme: light + security: + allow_embedding: true + auth.anonymous: + enabled: true + org_name: "Main Org." + org_role: Editor +``` + +Then, upgrade the Helm installation by running the following command: + +```console +helm upgrade scalar-monitoring prometheus-community/kube-prometheus-stack -n monitoring -f scalar-prometheus-custom-values.yaml +``` + +## Step 3. Set environment variables -1. Add or revise this value to the custom values file (e.g. scalar-prometheus-custom-values.yaml) of the `kube-prometheus-stack` - ```yaml - kubeStateMetrics: - enabled: true - nodeExporter: - enabled: true - kubelet: - enabled: true - grafana: - grafana.ini: - users: - default_theme: light - security: - allow_embedding: true - auth.anonymous: - enabled: true - org_name: "Main Org." - org_role: Editor - ``` +Set environment variables for Scalar Manager by running the following commands, replacing the contents in angle brackets as described: -1. Upgrade the Helm installation - ```console - helm upgrade scalar-monitoring prometheus-community/kube-prometheus-stack -n monitoring -f scalar-prometheus-custom-values.yaml - ``` +```console +SCALAR_MANAGER_RELEASE_NAME= +SCALAR_MANAGER_NAMESPACE= +SCALAR_MANAGER_CUSTOM_VALUES_FILE= +SCALAR_MANAGER_CHART_VERSION= +``` -## Step 2. Prepare a custom values file for Scalar Manager +## Step 4. Prepare a custom values file for Scalar Manager -1. Create an empty .yaml file named `scalar-manager-custom-values.yaml` for `scalar-manager`. +Prepare a custom values file for Scalar Manager by doing the following: -1. Set the service type to access Scalar Manager. The default value is `ClusterIP`, but if we access using the `minikube tunnel` command or some load balancer, we can set it as `LoadBalancer`. - ```yaml - service: - type: LoadBalancer - port: 8000 - ``` +1. Create an empty file named `scalar-manager-custom-values.yaml`. +1. Follow the instructions in [Configure a custom values file for Scalar Manager](configure-custom-values-scalar-manager.mdx). -## Step 3. Deploy `scalar-manager` +## Step 5. Install and deploy `scalar-manager` -1. Deploy the `scalar-manager` Helm Chart. - ```console - helm install scalar-manager scalar-labs/scalar-manager -f scalar-manager-custom-values.yaml - ``` +Install and deploy the `scalar-manager` Helm Chart by running the following command: -## Step 4. Access Scalar Manager +```console +helm install ${SCALAR_MANAGER_RELEASE_NAME} scalar-labs/scalar-manager -n ${SCALAR_MANAGER_NAMESPACE} -f ${SCALAR_MANAGER_CUSTOM_VALUES_FILE} --version ${SCALAR_MANAGER_CHART_VERSION} +``` -### If you use minikube +## Step 6. Access Scalar Manager -1. To expose Scalar Manager's service resource as your `localhost (127.0.0.1)`, open another terminal, and run the `minikube tunnel` command. - ```console - minikube tunnel - ``` +How you access Scalar Manager depends on the tool that you're using for Kubernetes clusters. -1. Open the browser with URL `http://localhost:8000` + + + To expose Scalar Manager's service resource as your localhost (127.0.0.1), open another terminal, and run the `minikube tunnel` command. -### If you use other Kubernetes than minikube + ```console + minikube tunnel + ``` -If you're using a Kubernetes cluster other than minikube, you'll need to access the `LoadBalancer` service according to the manner of each Kubernetes cluster. For example, you'll need to use a load balancer provided by your cloud services provider or use the `kubectl port-forward` command. + Then, access Scalar Manager by going to http://localhost:8000. + + + If you're using a Kubernetes cluster other than minikube, you'll need to access the `LoadBalancer` service according to the manner of each Kubernetes cluster. For example, you'll need to use a load balancer provided by your cloud services provider or use the `kubectl port-forward` command. :::note -Scalar Manager will try to detect the external IP of Grafana and then embed Grafana based on the IP. Therefore, you must configure the Grafana service type as `LoadBalancer`, and the external IP must be accessible from your browser. +Scalar Manager will try to detect the external IP address for Grafana and then embed Grafana based on that IP address. Therefore, you must configure the Grafana service type as `LoadBalancer`, and the external IP address must be accessible from your browser. ::: - -## Step 5. Delete Scalar Manager -1. Uninstall `scalar-manager` - ```console - helm uninstall scalar-manager - ``` + + ## Additional details This section provides additional details related to configurations and resource discovery. -### Configurations +### Upgrade the Scalar Manager deployment + +To upgrade the deployment of Scalar Manager, run the following command: + +```console +helm upgrade ${SCALAR_MANAGER_RELEASE_NAME} scalar-labs/scalar-manager -n ${SCALAR_MANAGER_NAMESPACE} -f ${SCALAR_MANAGER_CUSTOM_VALUES_FILE} --version ${SCALAR_MANAGER_CHART_VERSION} +``` + +### Uninstall Scalar Manager + +To uninstall Scalar Manager, run the following command: + +```console +helm uninstall ${SCALAR_MANAGER_RELEASE_NAME} -n ${SCALAR_MANAGER_NAMESPACE} +``` + +### Optional Scalar Manager configurations -You can see configurations for Scalar Manager in [Configure a custom values file for Scalar Manager](./configure-custom-values-scalar-manager.mdx) +For optional configurations that you can set for Scalar Manager, see [Optional configurations](./configure-custom-values-scalar-manager.mdx#optional-configurations) ### Resource discovery diff --git a/docs/helm-charts/how-to-deploy-scalar-products.mdx b/docs/helm-charts/how-to-deploy-scalar-products.mdx index e2eb2781..82874307 100644 --- a/docs/helm-charts/how-to-deploy-scalar-products.mdx +++ b/docs/helm-charts/how-to-deploy-scalar-products.mdx @@ -66,6 +66,6 @@ Please refer to the following documents for more details on how to deploy each p * [ScalarDL Ledger](how-to-deploy-scalardl-ledger.mdx) * [ScalarDL Auditor](how-to-deploy-scalardl-auditor.mdx) * [Scalar Admin for Kubernetes](how-to-deploy-scalar-admin-for-kubernetes.mdx) -* [Scalar Manager](how-to-deploy-scalar-manager.mdx) +* [Scalar Manager](getting-started-scalar-manager.mdx) * [[Deprecated] ScalarDB Server](how-to-deploy-scalardb.mdx) * [[Deprecated] ScalarDB GraphQL](how-to-deploy-scalardb-graphql.mdx) From aa106c62bc32c1ea38fc198af048895315c30325 Mon Sep 17 00:00:00 2001 From: Josh Wong <23216828+josh-wong@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:33:19 +0900 Subject: [PATCH 2/3] Delete unnecessary doc --- .../how-to-deploy-scalar-manager.mdx | 62 ------------------- sidebars.js | 5 -- .../how-to-deploy-scalar-manager.mdx | 62 ------------------- .../how-to-deploy-scalar-manager.mdx | 62 ------------------- .../how-to-deploy-scalar-manager.mdx | 62 ------------------- versioned_sidebars/version-3.10-sidebars.json | 1 - versioned_sidebars/version-3.11-sidebars.json | 1 - versioned_sidebars/version-3.12-sidebars.json | 5 -- 8 files changed, 260 deletions(-) delete mode 100644 docs/helm-charts/how-to-deploy-scalar-manager.mdx delete mode 100644 versioned_docs/version-3.10/helm-charts/how-to-deploy-scalar-manager.mdx delete mode 100644 versioned_docs/version-3.11/helm-charts/how-to-deploy-scalar-manager.mdx delete mode 100644 versioned_docs/version-3.12/helm-charts/how-to-deploy-scalar-manager.mdx diff --git a/docs/helm-charts/how-to-deploy-scalar-manager.mdx b/docs/helm-charts/how-to-deploy-scalar-manager.mdx deleted file mode 100644 index 5795f265..00000000 --- a/docs/helm-charts/how-to-deploy-scalar-manager.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -tags: - - Enterprise Option ---- - -# How to deploy Scalar Manager - -This document explains how to deploy Scalar Manager using Scalar Helm Charts. You must prepare your custom values file. Please refer to the following document for more details on the custom values file for Scalar Manager. - -* [Configure a custom values file for Scalar Manager](configure-custom-values-scalar-manager.mdx) - -## Deploy kube-prometheus-stack and loki-stack - -When you use Scalar Manager, you must deploy kube-prometheus-stack and loki-stack. Please refer to the following documents for more details on how to deploy them. - -* [Getting Started with Helm Charts (Monitoring using Prometheus Operator)](getting-started-monitoring.mdx) -* [Getting Started with Helm Charts (Logging using Loki Stack)](getting-started-logging.mdx) - -When you deploy kube-prometheus-stack, you must set the following configuration in the custom values file for kube-prometheus-stack. - -```yaml -kubeStateMetrics: - enabled: true -nodeExporter: - enabled: true -kubelet: - enabled: true -grafana: - grafana.ini: - users: - default_theme: light - security: - allow_embedding: true - auth.anonymous: - enabled: true - org_name: "Main Org." - org_role: Editor -``` - -If you already have a deployment of kube-prometheus-stack, please upgrade the configuration using the following command. - -```console -helm upgrade prometheus-community/kube-prometheus-stack -n -f / --version -``` - -## Deploy Scalar Manager - -```console -helm install scalar-labs/scalar-manager -n -f / --version -``` - -## Upgrade the deployment of Scalar Manager - -```console -helm upgrade scalar-labs/scalar-manager -n -f / --version -``` - -## Delete the deployment of Scalar Manager - -```console -helm uninstall -n -``` diff --git a/sidebars.js b/sidebars.js index f69a079a..b73a4548 100644 --- a/sidebars.js +++ b/sidebars.js @@ -748,11 +748,6 @@ const sidebars = { id: 'scalar-manager/overview', label: 'Scalar Manager Overview', }, - { - type: 'doc', - id: 'helm-charts/how-to-deploy-scalar-manager', - label: 'Deploy Scalar Manager', - }, { type: 'doc', id: 'helm-charts/how-to-deploy-scalar-admin-for-kubernetes', diff --git a/versioned_docs/version-3.10/helm-charts/how-to-deploy-scalar-manager.mdx b/versioned_docs/version-3.10/helm-charts/how-to-deploy-scalar-manager.mdx deleted file mode 100644 index 5795f265..00000000 --- a/versioned_docs/version-3.10/helm-charts/how-to-deploy-scalar-manager.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -tags: - - Enterprise Option ---- - -# How to deploy Scalar Manager - -This document explains how to deploy Scalar Manager using Scalar Helm Charts. You must prepare your custom values file. Please refer to the following document for more details on the custom values file for Scalar Manager. - -* [Configure a custom values file for Scalar Manager](configure-custom-values-scalar-manager.mdx) - -## Deploy kube-prometheus-stack and loki-stack - -When you use Scalar Manager, you must deploy kube-prometheus-stack and loki-stack. Please refer to the following documents for more details on how to deploy them. - -* [Getting Started with Helm Charts (Monitoring using Prometheus Operator)](getting-started-monitoring.mdx) -* [Getting Started with Helm Charts (Logging using Loki Stack)](getting-started-logging.mdx) - -When you deploy kube-prometheus-stack, you must set the following configuration in the custom values file for kube-prometheus-stack. - -```yaml -kubeStateMetrics: - enabled: true -nodeExporter: - enabled: true -kubelet: - enabled: true -grafana: - grafana.ini: - users: - default_theme: light - security: - allow_embedding: true - auth.anonymous: - enabled: true - org_name: "Main Org." - org_role: Editor -``` - -If you already have a deployment of kube-prometheus-stack, please upgrade the configuration using the following command. - -```console -helm upgrade prometheus-community/kube-prometheus-stack -n -f / --version -``` - -## Deploy Scalar Manager - -```console -helm install scalar-labs/scalar-manager -n -f / --version -``` - -## Upgrade the deployment of Scalar Manager - -```console -helm upgrade scalar-labs/scalar-manager -n -f / --version -``` - -## Delete the deployment of Scalar Manager - -```console -helm uninstall -n -``` diff --git a/versioned_docs/version-3.11/helm-charts/how-to-deploy-scalar-manager.mdx b/versioned_docs/version-3.11/helm-charts/how-to-deploy-scalar-manager.mdx deleted file mode 100644 index 5795f265..00000000 --- a/versioned_docs/version-3.11/helm-charts/how-to-deploy-scalar-manager.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -tags: - - Enterprise Option ---- - -# How to deploy Scalar Manager - -This document explains how to deploy Scalar Manager using Scalar Helm Charts. You must prepare your custom values file. Please refer to the following document for more details on the custom values file for Scalar Manager. - -* [Configure a custom values file for Scalar Manager](configure-custom-values-scalar-manager.mdx) - -## Deploy kube-prometheus-stack and loki-stack - -When you use Scalar Manager, you must deploy kube-prometheus-stack and loki-stack. Please refer to the following documents for more details on how to deploy them. - -* [Getting Started with Helm Charts (Monitoring using Prometheus Operator)](getting-started-monitoring.mdx) -* [Getting Started with Helm Charts (Logging using Loki Stack)](getting-started-logging.mdx) - -When you deploy kube-prometheus-stack, you must set the following configuration in the custom values file for kube-prometheus-stack. - -```yaml -kubeStateMetrics: - enabled: true -nodeExporter: - enabled: true -kubelet: - enabled: true -grafana: - grafana.ini: - users: - default_theme: light - security: - allow_embedding: true - auth.anonymous: - enabled: true - org_name: "Main Org." - org_role: Editor -``` - -If you already have a deployment of kube-prometheus-stack, please upgrade the configuration using the following command. - -```console -helm upgrade prometheus-community/kube-prometheus-stack -n -f / --version -``` - -## Deploy Scalar Manager - -```console -helm install scalar-labs/scalar-manager -n -f / --version -``` - -## Upgrade the deployment of Scalar Manager - -```console -helm upgrade scalar-labs/scalar-manager -n -f / --version -``` - -## Delete the deployment of Scalar Manager - -```console -helm uninstall -n -``` diff --git a/versioned_docs/version-3.12/helm-charts/how-to-deploy-scalar-manager.mdx b/versioned_docs/version-3.12/helm-charts/how-to-deploy-scalar-manager.mdx deleted file mode 100644 index 5795f265..00000000 --- a/versioned_docs/version-3.12/helm-charts/how-to-deploy-scalar-manager.mdx +++ /dev/null @@ -1,62 +0,0 @@ ---- -tags: - - Enterprise Option ---- - -# How to deploy Scalar Manager - -This document explains how to deploy Scalar Manager using Scalar Helm Charts. You must prepare your custom values file. Please refer to the following document for more details on the custom values file for Scalar Manager. - -* [Configure a custom values file for Scalar Manager](configure-custom-values-scalar-manager.mdx) - -## Deploy kube-prometheus-stack and loki-stack - -When you use Scalar Manager, you must deploy kube-prometheus-stack and loki-stack. Please refer to the following documents for more details on how to deploy them. - -* [Getting Started with Helm Charts (Monitoring using Prometheus Operator)](getting-started-monitoring.mdx) -* [Getting Started with Helm Charts (Logging using Loki Stack)](getting-started-logging.mdx) - -When you deploy kube-prometheus-stack, you must set the following configuration in the custom values file for kube-prometheus-stack. - -```yaml -kubeStateMetrics: - enabled: true -nodeExporter: - enabled: true -kubelet: - enabled: true -grafana: - grafana.ini: - users: - default_theme: light - security: - allow_embedding: true - auth.anonymous: - enabled: true - org_name: "Main Org." - org_role: Editor -``` - -If you already have a deployment of kube-prometheus-stack, please upgrade the configuration using the following command. - -```console -helm upgrade prometheus-community/kube-prometheus-stack -n -f / --version -``` - -## Deploy Scalar Manager - -```console -helm install scalar-labs/scalar-manager -n -f / --version -``` - -## Upgrade the deployment of Scalar Manager - -```console -helm upgrade scalar-labs/scalar-manager -n -f / --version -``` - -## Delete the deployment of Scalar Manager - -```console -helm uninstall -n -``` diff --git a/versioned_sidebars/version-3.10-sidebars.json b/versioned_sidebars/version-3.10-sidebars.json index 782b4a52..60c268e4 100644 --- a/versioned_sidebars/version-3.10-sidebars.json +++ b/versioned_sidebars/version-3.10-sidebars.json @@ -191,7 +191,6 @@ "helm-charts/how-to-deploy-scalar-products", "helm-charts/how-to-deploy-scalardb-cluster", "helm-charts/how-to-deploy-scalardb-analytics-postgresql", - "helm-charts/how-to-deploy-scalar-manager", "helm-charts/how-to-deploy-scalar-admin-for-kubernetes", "helm-charts/mount-files-or-volumes-on-scalar-pods", "helm-charts/use-secret-for-credentials" diff --git a/versioned_sidebars/version-3.11-sidebars.json b/versioned_sidebars/version-3.11-sidebars.json index 9885e043..9efd8a38 100644 --- a/versioned_sidebars/version-3.11-sidebars.json +++ b/versioned_sidebars/version-3.11-sidebars.json @@ -210,7 +210,6 @@ "helm-charts/how-to-deploy-scalar-products", "helm-charts/how-to-deploy-scalardb-cluster", "helm-charts/how-to-deploy-scalardb-analytics-postgresql", - "helm-charts/how-to-deploy-scalar-manager", "helm-charts/how-to-deploy-scalar-admin-for-kubernetes", "helm-charts/mount-files-or-volumes-on-scalar-pods", "helm-charts/use-secret-for-credentials" diff --git a/versioned_sidebars/version-3.12-sidebars.json b/versioned_sidebars/version-3.12-sidebars.json index 1b27eaf5..2f59a6ad 100644 --- a/versioned_sidebars/version-3.12-sidebars.json +++ b/versioned_sidebars/version-3.12-sidebars.json @@ -719,11 +719,6 @@ "id": "scalar-manager/overview", "label": "Scalar Manager Overview" }, - { - "type": "doc", - "id": "helm-charts/how-to-deploy-scalar-manager", - "label": "Deploy Scalar Manager" - }, { "type": "doc", "id": "helm-charts/how-to-deploy-scalar-admin-for-kubernetes", From d17710d118b7da235c4ace8d420c6566fba710b6 Mon Sep 17 00:00:00 2001 From: Josh Wong <23216828+josh-wong@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:33:31 +0900 Subject: [PATCH 3/3] Add redirects for Scalar Manager deployment doc --- docusaurus.config.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docusaurus.config.js b/docusaurus.config.js index 77aa27de..e6c08395 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -201,6 +201,22 @@ const config = { to: '/docs/3.12/requirements#databases', from: '/docs/3.12/scalardb-supported-databases', }, + { + to: '/docs/latest/helm-charts/getting-started-scalar-manager', + from: '/docs/latest/helm-charts/how-to-deploy-scalar-manager', + }, + { + to: '/docs/3.12/helm-charts/getting-started-scalar-manager', + from: '/docs/3.12/helm-charts/how-to-deploy-scalar-manager', + }, + { + to: '/docs/3.11/helm-charts/getting-started-scalar-manager', + from: '/docs/3.11/helm-charts/how-to-deploy-scalar-manager', + }, + { + to: '/docs/3.10/helm-charts/getting-started-scalar-manager', + from: '/docs/3.10/helm-charts/how-to-deploy-scalar-manager', + }, ], }, ],