|
3 | 3 | - Enterprise Option |
4 | 4 | --- |
5 | 5 |
|
6 | | -# Getting Started with Helm Charts (Scalar Manager) |
| 6 | +# Deploy Scalar Manager |
7 | 7 |
|
8 | | -Scalar Manager is a centralized management and monitoring solution for ScalarDB and ScalarDL within Kubernetes cluster environments that allows you to: |
| 8 | +import Tabs from '@theme/Tabs'; |
| 9 | +import TabItem from '@theme/TabItem'; |
9 | 10 |
|
10 | | -* Check the availability of ScalarDB or ScalarDL. |
11 | | -* Schedule or execute pausing jobs that create transactionally consistent periods in the databases used by ScalarDB or ScalarDL. |
12 | | -* Check the time-series metrics and logs of ScalarDB or ScalarDL through Grafana dashboards. |
| 11 | +[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: |
13 | 12 |
|
14 | | -For more details, refer to [Scalar Manager Overview](../scalar-manager/overview.mdx). |
| 13 | +- Check the availability of ScalarDB or ScalarDL. |
| 14 | +- Schedule or execute pausing jobs that create transactionally consistent periods in the databases used by ScalarDB or ScalarDL. |
| 15 | +- Check the time-series metrics and logs of ScalarDB or ScalarDL through Grafana dashboards. |
15 | 16 |
|
16 | | -This guide will show you how to deploy and access Scalar Manager on a Kubernetes cluster. |
| 17 | +This guide explains how to deploy and access Scalar Manager on a Kubernetes cluster by using Scalar Helm Charts. |
17 | 18 |
|
18 | | -## Assumption |
| 19 | +## Prerequisites |
19 | 20 |
|
20 | | -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. |
| 21 | +Before you deploy Scalar Manager, you must do the following: |
21 | 22 |
|
22 | | -## Requirement |
| 23 | +- Install the tools mentioned in [Getting Started with Scalar Helm Charts](getting-started-scalar-helm-charts.mdx). |
| 24 | +- Deploy `kube-prometheus-stack` according to the instructions in [Getting Started with Helm Charts (Monitoring using Prometheus Operator)](getting-started-monitoring.mdx). |
| 25 | +- Deploy `loki-stack` according to the instructions in [Getting Started with Helm Charts (Logging using Loki Stack)](getting-started-logging.mdx). |
23 | 26 |
|
24 | | -* You must deploy `kube-prometheus-stack` according to the instructions in [Getting Started with Helm Charts (Monitoring using Prometheus Operator)](getting-started-monitoring.mdx). |
25 | | -* You must deploy `loki-stack` according to the instructions in [Getting Started with Helm Charts (Logging using Loki Stack)](getting-started-logging.mdx). |
| 27 | +## Deployment architecture diagram |
26 | 28 |
|
27 | | -## What we create |
28 | | - |
29 | | -We will deploy the following components on a Kubernetes cluster as follows. |
| 29 | +The following is an architecture diagram for the components deployed in a Kubernetes cluster. |
30 | 30 |
|
31 | 31 | ``` |
32 | 32 | +--------------------------------------------------------------------------------------------------+ |
@@ -60,94 +60,129 @@ We will deploy the following components on a Kubernetes cluster as follows. |
60 | 60 | | | | Kubernetes | |
61 | 61 | +----+-----------------------+---------------------------------------------------------------------+ |
62 | 62 | | | |
63 | | - expose to localhost (127.0.0.1) or use load balancer etc to access |
| 63 | + Expose the environment to localhost (127.0.0.1) or use a load balancer to access it |
64 | 64 | | | |
65 | | - (Access Dashboard through HTTP) |
| 65 | + (Access the dashboard through HTTP) |
66 | 66 | | | |
67 | 67 | +----+----+ +----+----+ |
68 | 68 | | Browser | <-(Embed)-- + Browser | |
69 | 69 | +---------+ +---------+ |
70 | 70 | ``` |
71 | 71 |
|
72 | | -## Step 1. Upgrade the `kube-prometheus-stack` to allow Grafana to be embedded |
| 72 | +## Step 1. Start minikube |
| 73 | + |
| 74 | +Open **Terminal**, and start minikube by running the following command: |
| 75 | + |
| 76 | +```console |
| 77 | +minikube start |
| 78 | +``` |
| 79 | + |
| 80 | +## Step 2. Upgrade the `kube-prometheus-stack` to allow Grafana to be embedded |
| 81 | + |
| 82 | +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: |
| 83 | + |
| 84 | +```yaml |
| 85 | +kubeStateMetrics: |
| 86 | + enabled: true |
| 87 | + |
| 88 | +nodeExporter: |
| 89 | + enabled: true |
| 90 | + |
| 91 | +kubelet: |
| 92 | + enabled: true |
| 93 | + |
| 94 | +grafana: |
| 95 | + grafana.ini: |
| 96 | + users: |
| 97 | + default_theme: light |
| 98 | + security: |
| 99 | + allow_embedding: true |
| 100 | + auth.anonymous: |
| 101 | + enabled: true |
| 102 | + org_name: "Main Org." |
| 103 | + org_role: Editor |
| 104 | +``` |
| 105 | +
|
| 106 | +Then, upgrade the Helm installation by running the following command: |
| 107 | +
|
| 108 | +```console |
| 109 | +helm upgrade scalar-monitoring prometheus-community/kube-prometheus-stack -n monitoring -f scalar-prometheus-custom-values.yaml |
| 110 | +``` |
| 111 | + |
| 112 | +## Step 3. Set environment variables |
73 | 113 |
|
74 | | -1. Add or revise this value to the custom values file (e.g. scalar-prometheus-custom-values.yaml) of the `kube-prometheus-stack` |
75 | | - ```yaml |
76 | | - kubeStateMetrics: |
77 | | - enabled: true |
78 | | - nodeExporter: |
79 | | - enabled: true |
80 | | - kubelet: |
81 | | - enabled: true |
82 | | - grafana: |
83 | | - grafana.ini: |
84 | | - users: |
85 | | - default_theme: light |
86 | | - security: |
87 | | - allow_embedding: true |
88 | | - auth.anonymous: |
89 | | - enabled: true |
90 | | - org_name: "Main Org." |
91 | | - org_role: Editor |
92 | | - ``` |
| 114 | +Set environment variables for Scalar Manager by running the following commands, replacing the contents in angle brackets as described: |
93 | 115 |
|
94 | | -1. Upgrade the Helm installation |
95 | | - ```console |
96 | | - helm upgrade scalar-monitoring prometheus-community/kube-prometheus-stack -n monitoring -f scalar-prometheus-custom-values.yaml |
97 | | - ``` |
| 116 | +```console |
| 117 | +SCALAR_MANAGER_RELEASE_NAME=<ADD_RELEASE_NAME> |
| 118 | +SCALAR_MANAGER_NAMESPACE=<ADD_NAMESPACE> |
| 119 | +SCALAR_MANAGER_CUSTOM_VALUES_FILE=<ADD_PATH_TO_CUSTOM_VALUES_FILE> |
| 120 | +SCALAR_MANAGER_CHART_VERSION=<ADD_CHART_VERSION> |
| 121 | +``` |
98 | 122 |
|
99 | | -## Step 2. Prepare a custom values file for Scalar Manager |
| 123 | +## Step 4. Prepare a custom values file for Scalar Manager |
100 | 124 |
|
101 | | -1. Create an empty .yaml file named `scalar-manager-custom-values.yaml` for `scalar-manager`. |
| 125 | +Prepare a custom values file for Scalar Manager by doing the following: |
102 | 126 |
|
103 | | -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`. |
104 | | - ```yaml |
105 | | - service: |
106 | | - type: LoadBalancer |
107 | | - port: 8000 |
108 | | - ``` |
| 127 | +1. Create an empty file named `scalar-manager-custom-values.yaml`. |
| 128 | +1. Follow the instructions in [Configure a custom values file for Scalar Manager](configure-custom-values-scalar-manager.mdx). |
109 | 129 |
|
110 | | -## Step 3. Deploy `scalar-manager` |
| 130 | +## Step 5. Install and deploy `scalar-manager` |
111 | 131 |
|
112 | | -1. Deploy the `scalar-manager` Helm Chart. |
113 | | - ```console |
114 | | - helm install scalar-manager scalar-labs/scalar-manager -f scalar-manager-custom-values.yaml |
115 | | - ``` |
| 132 | +Install and deploy the `scalar-manager` Helm Chart by running the following command: |
116 | 133 |
|
117 | | -## Step 4. Access Scalar Manager |
| 134 | +```console |
| 135 | +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} |
| 136 | +``` |
118 | 137 |
|
119 | | -### If you use minikube |
| 138 | +## Step 6. Access Scalar Manager |
120 | 139 |
|
121 | | -1. To expose Scalar Manager's service resource as your `localhost (127.0.0.1)`, open another terminal, and run the `minikube tunnel` command. |
122 | | - ```console |
123 | | - minikube tunnel |
124 | | - ``` |
| 140 | +How you access Scalar Manager depends on the tool that you're using for Kubernetes clusters. |
125 | 141 |
|
126 | | -1. Open the browser with URL `http://localhost:8000` |
| 142 | +<Tabs groupId="kubernetes-tools" queryString> |
| 143 | + <TabItem value="minikube" label="minikube" default> |
| 144 | + To expose Scalar Manager's service resource as your localhost (127.0.0.1), open another terminal, and run the `minikube tunnel` command. |
127 | 145 |
|
128 | | -### If you use other Kubernetes than minikube |
| 146 | + ```console |
| 147 | + minikube tunnel |
| 148 | + ``` |
129 | 149 |
|
130 | | -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. |
| 150 | + Then, access Scalar Manager by going to http://localhost:8000. |
| 151 | + </TabItem> |
| 152 | + <TabItem value="other-kubernetes-clustering-tools" label="Other Kubernetes clustering tools"> |
| 153 | + 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. |
131 | 154 |
|
132 | 155 | :::note |
133 | 156 |
|
134 | | -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. |
| 157 | +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. |
135 | 158 |
|
136 | 159 | ::: |
137 | | - |
138 | | -## Step 5. Delete Scalar Manager |
139 | | -1. Uninstall `scalar-manager` |
140 | | - ```console |
141 | | - helm uninstall scalar-manager |
142 | | - ``` |
| 160 | + </TabItem> |
| 161 | +</Tabs> |
143 | 162 |
|
144 | 163 | ## Additional details |
145 | 164 |
|
146 | 165 | This section provides additional details related to configurations and resource discovery. |
147 | 166 |
|
148 | | -### Configurations |
| 167 | +### Upgrade the Scalar Manager deployment |
| 168 | + |
| 169 | +To upgrade the deployment of Scalar Manager, run the following command: |
| 170 | + |
| 171 | +```console |
| 172 | +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} |
| 173 | +``` |
| 174 | + |
| 175 | +### Uninstall Scalar Manager |
| 176 | + |
| 177 | +To uninstall Scalar Manager, run the following command: |
| 178 | + |
| 179 | +```console |
| 180 | +helm uninstall ${SCALAR_MANAGER_RELEASE_NAME} -n ${SCALAR_MANAGER_NAMESPACE} |
| 181 | +``` |
| 182 | + |
| 183 | +### Optional Scalar Manager configurations |
149 | 184 |
|
150 | | -You can see configurations for Scalar Manager in [Configure a custom values file for Scalar Manager](./configure-custom-values-scalar-manager.mdx) |
| 185 | +For optional configurations that you can set for Scalar Manager, see [Optional configurations](./configure-custom-values-scalar-manager.mdx#optional-configurations) |
151 | 186 |
|
152 | 187 | ### Resource discovery |
153 | 188 |
|
|
0 commit comments