Database Plus’s Embracing the Cloud: ShardingSphere-on-Cloud Solution Released · ShardingSphere - Blog

Database Plus’s Embracing the Cloud: ShardingSphere-on-Cloud Solution Released

As a follower of the Database Plus development concept, ShardingSphere has successfully passed production environment tests across multiple industries and gained popularity among community enthusiasts.

As Kubernetes has become the de facto standard for container orchestration, the cloud-native concept has gone viral in the tech world. Apache ShardingSphere, as a database enhancement engine with an open ecosystem, has many similarities with Kubernetes in its design concept. So SphereEx took the lead in launching ShardingSphere-on-Cloud, its cloud solution for ShardingSphere. Database Plus’ trip to the Cloud has officially begun.

The ShardingSphere-on-Cloud repository will release its best practices including configuration templates, automation scripts, deployment tools, and Kubernetes Operator for Apache ShardingSphere on the cloud. Currently, ShardingSphere-on-Cloud has released V0.1.0, which contains the smallest available version of ShardingSphere Operator.

ShardingSphere Operator

One of the key reasons Kubernetes has become the de facto standard for cloud-native orchestration tools is its great extensibility, enabling developers to quickly build platforms on top of other platforms.

For all kinds of software trying to run on Kubernetes, the Kubernetes Operator mode can be used to work with the CustomResourceDefinition framework to quickly build automatic maintenance capabilities.

Last month, Apache ShardingSphere v5.1.2 released Helm Charts-based package management capability. Helm Charts helps us deal with the first step, that is, how to describe and deploy ShardingSphere in Kubernetes.

The second step focuses on how to manage a stateful or complex workload in Kubernetes, for which a customized management tool is needed. In this case, SphereEx’s cloud team developed the ShardingSphere Operator to further enhance ShardingSphere’s deployment and maintenance capabilities on top of Kubernetes. Image description

ShardingSphere made the following improvements in response to challenges faced when Apache ShardingSphere migrates to the Kubernetes environment.

Helm Deployment

ShardingSphere-Operator Chart

ShardingSphere-Cluster Chart

Use Github Pages to host Charts and add repositories using helm repo add

New Features

Quick Start

You can run the following commands:

kubectl create ns sharding
helm repo add shardingspherecloud https://sphereex.github.io/shardingsphere-on-cloud/ 
helm install operator shardingspherecloud/shardingsphere-operator -n sharding
helm install cluster shardingspherecloud/shardingsphere-cluster -n sharding

The above command will install ShardingSphere Operator, ShardingSphere-Proxy cluster, and ZooKeeper cluster in the sharding Namespace according to the default configuration.

ShardingSphere-Proxy can be accessed in a cluster through Service. Then through the MySQL client, create the logical database using DistSQL, add the data source and create the corresponding rule table. Then you can start to use ShardingSphere-Proxy running on Kubernetes.

Future Plan

ShardingSphere Operator will gradually optimize the deployment mode of ShardingSphere-Proxy, improve its automatic maintenance capabilities, and constantly polish its performance in terms of high availability and disaster recovery scenarios, striving to give users an ultimate cloud-native experience.

The ShardingSphere-on-Cloud repository will continue to take in various cloud practices from the community, to build an open ecosystem solution that is oriented to the cloud, benefits from the cloud, and can enhance database capabilities on the cloud.

If you have anything to share with us, please feel free to contact us through GitHub Issue or Apache ShardingSphere Slack.

ShardingSphere Operator GitHub

ShardingSphere Github

ShardingSphere Twitter ShardingSphere Slack

Contributor Guide

GitHub Issues

Contributor Guide

SphereEx Official Website

Author

SphereEx Cloud & ShardingSphere contributor team. Focus on the R&D of Cloud solutions of ShardingSphere, the Database Mesh open source community, and the SphereEx Cloud business.