Deploy Scalar Manager
Scalar Manager is a centralized management and monitoring solution for ScalarDB and ScalarDL within Kubernetes cluster environments that allows you to:
- 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 explains how to deploy and access Scalar Manager on a Kubernetes cluster by using Scalar Helm Charts.
Prerequisites​
Before you deploy Scalar Manager, you must do the following:
- Install the tools mentioned in Getting Started with Scalar Helm Charts.
- Deploy
kube-prometheus-stack
according to the instructions in Getting Started with Helm Charts (Monitoring using Prometheus Operator). - Deploy
loki-stack
according to the instructions in Getting Started with Helm Charts (Logging using Loki Stack).
Deployment architecture diagram​
The following is an architecture diagram for the components deployed in a Kubernetes cluster.
+--------------------------------------------------------------------------------------------------+
| +----------------------+ |
| | scalar-manager | |
| | | |
| | +------------------+ | --------------------------(Manage)--------------------------+ |
| | | Scalar Manager | | | |
| | +------------------+ | | |
| +--+-------------------+ | |
| | | |
| +------------------------------------+ | |
| | loki-stack | V |
| | | +-----------------+ |
| | +--------------+ +--------------+ | <----------------(Log)--------------- | Scalar Products | |
| | | Loki | | Promtail | | | | |
| | +--------------+ +--------------+ | | +-----------+ | |
| +------------------------------------+ | | ScalarDB | | |
| | | +-----------+ | |
| +------------------------------------------------------+ | | |
| | kube-prometheus-stack | | +-----------+ | |
| | | | | ScalarDL | | |
| | +--------------+ +--------------+ +--------------+ | -----(Monitor)----> | +-----------+ | |
| | | Prometheus | | Alertmanager | | Grafana | | +-----------------+ |
| | +-------+------+ +------+-------+ +------+-------+ | |
| | | | | | |
| | +----------------+-----------------+ | |
| | | | |
| +--------------------------+---------------------------+ |
| | | |
| | | Kubernetes |
+----+-----------------------+---------------------------------------------------------------------+
| |
Expose the environment to localhost (127.0.0.1) or use a load balancer to access it
| |
(Access the dashboard through HTTP)
| |
+----+----+ +----+----+
| Browser | <-(Embed)-- + Browser |
+---------+ +---------+
Step 1. Start minikube​
Open Terminal, and start minikube by running the following command:
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:
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:
helm upgrade scalar-monitoring prometheus-community/kube-prometheus-stack -n monitoring -f scalar-prometheus-custom-values.yaml
Step 3. Set environment variables​
Set environment variables for Scalar Manager by running the following commands, replacing the contents in angle brackets as described:
SCALAR_MANAGER_RELEASE_NAME=<ADD_RELEASE_NAME>
SCALAR_MANAGER_NAMESPACE=<ADD_NAMESPACE>
SCALAR_MANAGER_CUSTOM_VALUES_FILE=<ADD_PATH_TO_CUSTOM_VALUES_FILE>
SCALAR_MANAGER_CHART_VERSION=<ADD_CHART_VERSION>