yashandb
by apecloud
YashanDB is a new database system completely independently designed and developed by SICS. Based on classical database theories, it incorporates original Bounded Evaluation theory, Approximation theory, Parallel Scalability theory and Cross-Modal Fusion Computation theory, supports multiple deployment methods such as stand-alone/primary-standby, shared cluster, and distributed ones, covers OLTP/HTAP/OLAP transactions and analyzes mixed load scenarios, and is fully compatible with privatization and cloud infrastructure, providing clients with one-stop enterprise-level converged data management solutions to meet the needs of key industries such as finance, government, telecommunications and energy for high performance, concurrency and security.
About this chart
Yashandb
YashanDB is a new database system completely independently designed and developed by SICS. Based on classical database theories, it incorporates original Bounded Evaluation theory, Approximation theory, Parallel Scalability theory and Cross-Modal Fusion Computation theory, supports multiple deployment methods such as stand-alone/primary-standby, shared cluster, and distributed ones, covers OLTP/HTAP/OLAP transactions and analyzes mixed load scenarios, and is fully compatible with privatization and cloud infrastructure, providing clients with one-stop enterprise-level converged data management solutions to meet the needs of key industries such as finance, government, telecommunications and energy for high performance, concurrency and security.
Prerequisites
-
Kubernetes cluster >= v1.21
-
kubectlinstalled, refer to K8s Install Tools -
Helm, refer to Installing Helm
-
KubeBlocks installed and running, refer to Install Kubeblocks
-
YashanDB Addon Enabled, refer to Install Addons
-
Create K8s Namespace
demo, to keep resources created in this tutorial isolated:kubectl create ns demo
Examples
Create
Create a yashandb cluster of version 'yashandb-personal:23.1.1.100' with ONE replica.
[!NOTE] This is a personal version of YashanDB, for the enterprise version, please contact the vendor. The personal version is only for testing and development purposes, and it runs in Standalone mode with only one replica.
# cat examples/yashandb/cluster.yaml
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
name: yashandb-cluster
namespace: demo
spec:
terminationPolicy: Delete
componentSpecs:
- name: yashan
componentDef: yashandb
# Only supports Standalone YashanDB at the moment
# Must set replcias to 1.
replicas: 1
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
resources:
limits:
cpu: "1"
memory: "1Gi"
requests:
cpu: "1"
memory: "1Gi"
kubectl apply -f examples/yashandb/cluster.yaml
To login to the YashanDB console, you can
- login to the pod:
kubectl exec -it yashandb-cluster-yashan-0 -- /bin/bash
- login to the YashanDB console:
yasql sys/yasdb_123
To verify whether the database has been initialized successfully, check instance and database status:
- check instance status:
SQL> select status from v$instance;
STATUS
-------------
OPEN
- check database status:
SQL> select status from v$database;
STATUS
---------------------------------
NORMAL
Vertical scaling
Vertical scaling up or down specified components requests and limits cpu or memory resource in the cluster
# cat examples/yashandb/verticalscale.yaml
apiVersion: operations.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
name: yashandb-verticalscaling
namespace: demo
spec:
# Specifies the name of the Cluster resource that this operation is targeting.
clusterName: yashandb-cluster
type: VerticalScaling
# Lists VerticalScaling objects, each specifying a component and its desired compute resources for vertical scaling.
verticalScaling:
- componentName: yashan-comp
# VerticalScaling refers to the process of adjusting the compute resources (e.g., CPU, memory) allocated to a Component. It defines the parameters required for the operation.
requests:
cpu: '1.5'
memory: 1.5Gi
limits:
cpu: '1.5'
memory: 1.5Gi
kubectl apply -f examples/yashandb/verticalscale.yaml
Restart
Restart the specified components in the cluster
# cat examples/yashandb/restart.yaml
apiVersion: operations.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
name: yashandb-restart
namespace: demo
spec:
# Specifies the name of the Cluster resource that this operation is targeting.
clusterName: yashandb-cluster
type: Restart
# Lists Components to be restarted. ComponentOps specifies the Component to be operated on.
restart:
# Specifies the name of the Component.
- componentName: yashan-comp
kubectl apply -f examples/yashandb/restart.yaml
Stop
Stop the cluster and release all the pods of the cluster, but the storage will be reserved
# cat examples/yashandb/stop.yaml
apiVersion: operations.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
name: yashandb-stop
namespace: demo
spec:
# Specifies the name of the Cluster resource that this operation is targeting.
clusterName: yashandb-cluster
type: Stop
kubectl apply -f examples/yashandb/stop.yaml
Start
Start the stopped cluster
# cat examples/yashandb/start.yaml
apiVersion: operations.kubeblocks.io/v1alpha1
kind: OpsRequest
metadata:
name: yashandb-start
namespace: demo
spec:
# Specifies the name of the Cluster resource that this operation is targeting.
clusterName: yashandb-cluster
type: Start
kubectl apply -f examples/yashandb/start.yaml
Delete
If you want to delete the cluster and all its resource, you can modify the termination policy and then delete the cluster
kubectl patch cluster -n demo yashandb-cluster -p '{"spec":{"terminationPolicy":"WipeOut"}}' --type="merge"
kubectl delete cluster -n demo yashandb-cluster
Deploy yashandb with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has yashandb on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartyashandb is pinned at v1.2.0-alpha.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply