Skip to main content
Version: 3.11

Deploy Scalar Manager

Scalar Manager is a centralized management and monitoring solution for ScalarDB and ScalarDL in Kubernetes clusters. It enables you to:

  • Monitor the availability of ScalarDB and ScalarDL.
  • Schedule and execute pausing jobs to create transactionally consistent periods in the databases used by ScalarDB and ScalarDL.
  • Monitor ScalarDB and ScalarDL time-series metrics and logs through Grafana dashboards.

This guide explains how to deploy and access Scalar Manager on a Kubernetes cluster using Scalar Helm Charts.

Prerequisites​

Before deploying Scalar Manager, you must do the following:

Deployment architecture diagram​

The following is an architecture diagram for the components deployed in a Kubernetes cluster.

+----------------------------------------------------------------------------------------------------------------------+
| +----------------------------+ |
| | scalar-manager | |
| | | |
| | +------------------+ | ---------------------------------(Manage)--------------------------+ |
| +---+--->| Scalar Manager | | | |
| | | +---+--------------+ | | |
| | | | | | |
| | +--------+-------------------+ | |
| | | | |
| | +----+------------------------------------------+ | |
| | | | | |
| | +--------+------------------------------------------+---------+ | |
| | | | kube-prometheus-stack | | V |
| | | V V | +-----------------+ |
| | | +--------------+ +--------------+ +--------------+ | -----(Monitor)----> | Scalar Products | |
| | | | Prometheus | <---+ | Alertmanager | | Grafana | | | | |
| | | +------+-------+ | +--------------+ +------+-------+ | | +-----------+ | |
| | | | | | | | ScalarDB | | |
| | | +----------------------------+ | | +-----------+ | |
| | | | | | | |
| | +---------------------------------------------------+---------+ | +-----------+ | |
| | | | | ScalarDL | | |
| | +------------------------------------------+ +---------- | +-----------+ | |
| | | | +-----------------+ |
| | +--------+---------------------------+ | |
| | | | loki-stack | | |
| | | V | | |
| | | +--------------+ +--------------+ | <----------------(Log)-----------+ |
| | | | Loki | | Promtail | | |
| | | +--------------+ +--------------+ | |
| | +------------------------------------+ |
| | |
| | Kubernetes |
+----+-----------------------------------------------------------------------------------------------------------------+
|
Expose the environment to localhost (127.0.0.1) or use a load balancer to access it
|
(Access the dashboard through HTTP)
|
+----+----+
| Browser |
+---------+

Step 1. Start minikube​

Open Terminal, and start minikube by running the following command:

minikube start

Step 2. Upgrade kube-prometheus-stack to enable Grafana authentication with auth proxy​

To allow users to access Grafana after logging in to Scalar Manager, you must enable Grafana authentication with auth proxy.

In your custom values file for kube-prometheus-stack (for example, scalar-prometheus-custom-values.yaml), add or revise the following configurations:

kubeStateMetrics:
enabled: true

nodeExporter:
enabled: true

kubelet:
enabled: true

grafana:
grafana.ini:
users:
allow_sign_up: false
auto_assign_org: true
auto_assign_org_role: Editor
auth.proxy:
enabled: true
header_name: X-WEBAUTH-USER
header_property: username
auto_sign_up: true
server:
root_url: "%(protocol)s://%(domain)s:%(http_port)s/grafana"

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 the following environment variables for Scalar Manager, replacing the contents in the 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>

Step 4. Prepare a custom values file​

Prepare a custom values file for Scalar Manager:

  1. Create an empty file named scalar-manager-custom-values.yaml.
  2. Follow the instructions in Configure a custom values file for Scalar Manager.

Step 5. Deploy​

Deploy the scalar-manager Helm Chart by running the following command:

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}

Step 6. Access Scalar Manager​

The method to access Scalar Manager depends on your Kubernetes cluster.

To expose Scalar Manager on localhost (127.0.0.1), open another terminal and run the minikube tunnel command:

minikube tunnel

Then, access Scalar Manager at http://localhost:8000.

Additional details​

This section provides additional details related to configurations and resource discovery.

Upgrade Scalar Manager​

To upgrade Scalar Manager, run the following command:

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:

helm uninstall ${SCALAR_MANAGER_RELEASE_NAME} -n ${SCALAR_MANAGER_NAMESPACE}

Optional Scalar Manager configurations​

For optional configurations that you can set for Scalar Manager, see Optional configurations

Resource discovery​

Scalar Manager discovers the following Kubernetes resources in a cluster by using specific label selectors:

  • Dependencies
    • Prometheus service
  • Targets
    • ScalarDB Cluster deployments
    • ScalarDL Ledger deployments
    • ScalarDL Auditor deployments

The following sections explain how Scalar Manager discovers these resources.

Dependencies​

Scalar Manager searches for the default labels and values set in the kube-prometheus-stack Helm Chart. For more information on the default labels and values that Scalar Manager uses to discover dependencies, see Properties that you can set in api.applicationProperties.

Also, if you customized any values when installing kube-prometheus-stack, you will need to update the label selectors in the Scalar Manager custom value api.applicationProperties.

Targets​

Scalar Manager searches for ScalarDB Cluster, ScalarDL Ledger, and ScalarDL Auditor deployments by using the following labels and values:

  • ScalarDB Cluster: app.kubernetes.io/app=scalardb-cluster
  • ScalarDL Ledger: app.kubernetes.io/app=ledger
  • ScalarDL Auditor: app.kubernetes.io/app=auditor

Scalar Helm Charts use fixed labels and values for ScalarDB Cluster, ScalarDL Ledger, and ScalarDL Auditor deployments so that if you install ScalarDB and ScalarDL by using Scalar Helm Charts, Scalar Manager will automatically discover these deployments.