Installing Shared RDBMS
This topic describes how to install the Shared RDMBS feature for HPE Ezmeral Runtime Enterprise. The Shared RDBMS feature is a common backend database service for application components across Kubernetes compute clusters.
- Required access rights: Kubernetes Administrator
- Kubernetes cluster software requirements:
- Host OS is a minimum of RHEL 8 or SUSE 15 (SP2 or SP3)
- Storage Class is configured (Data Fabric or any other CSI)
- Helm 3
About Shared RDBMS
The Shared RDBMS feature provides common storage for ML components to manage metadata, and is accessible across Kubernetes clusters within HPE Ezmeral Runtime Enterprise.
- Secure Model Management
- EzSQL
Installing Shared RDBMS
- On a Kubernetes cluster master node, download the MySQL application
bundle:
# wget https://ezml-release.s3.amazonaws.com/5.6.0/mysql-cluster-ere560.tar.gz # tar xvzf mysql-cluster.tar.gz && cd mysql-cluster
- (Optional): Before installing the Shared RDBMS feature, you can customize
parameters for your InnoDB cluster. You can perform customization based on
factors such as size of Kubernetes cluster, number of applications, or load of
read/write operations.
To customize parameters, review and update
values.yaml
under the InnoDB chart. See Customizing InnoDB Values. - On a HPE Ezmeral Runtime Enterprise Kubernetes cluster master node, run
the
ezmysql
installation script:
The script prompts you to enter a password. Make a note of the password that you use.# ./ezmysql_install.sh
The script performs the following:- Creates a namespace
ezmysql
- Installs MySQL Operator
- Installs MySQL InnoDB Cluster
- Configures the router for HA
- Configures HPA for auto-scaling
- Provides a Gateway endpoint of MySQL instance for connectivity
- Creates a namespace
- To check that the MySQL server is accessible after successful install, you can
verify MySQL cluster connectivity. To verify connectivity, use one of the
following options:
- Option 1: Use the MySQL endpoint details provided from the step 3
output and the same password given during installation in step
3:
For example:mysql -u <user-name> -p -h <host> -P <port>
# mysql -u root -p -h example.hpecorp.net -P 10022
- Option 2: Use a different client or application with
root
as the username and password.
- Option 1: Use the MySQL endpoint details provided from the step 3
output and the same password given during installation in step
3:
- (Optional) You can upgrade the MySQL version for
your Shared RDBMS installation. Proceed as follows to upgrade the MySQL version
from version 8.0.30 to version 8.0.31:
- Download and extract the latest MySQL
version:
# wget https://ezml-release.s3.amazonaws.com/5.6.0/mysql-cluster-ere560.tar.gz;tar -zxvf mysql-cluster-ere560.tar.gz;cd mysql-cluster;chmod +x ezmysql_upgrade.sh
- Start the MySQL version
upgrade:
The upgrade completes in about 10 minutes.# sh ezmysql_upgrade.sh
- Download and extract the latest MySQL
version:
Customizing InnoDB Values
./mysql-innodbcluster/values.yaml
: - User name: The default value is
root
.credentials: root: user: root
- Instances: You can change server and router instances.
- Server instances refers to the number of MySQL servers required.
- Routers are used to control the communication between MySQL servers for load balancing.
serverInstances: 3 routerInstances: 1
- Storage size: You can update the storage size for MySQL InnoDB
clusters. Data volume is used for persistent storage of application data.
The default value is
40Gi
.datadirVolumeClaimTemplate: accessModes: ReadWriteOnce resources: requests: storage: 40Gi
- Resource limits: You can update resource parameters such as CPU and
memory according to your requirements.
The default value for memory is
3G
and the default value for CPU is400m
.resource: request: memory: "2G" cpu: "200m" limits: memory: "3G" cpu: "400m"
- Replicas: You can increase the number of replicas in case of high
load.
The default setting is
minReplicas: 3
andmaxReplicas: 5
.hpa: spec: maxReplicas: 5 minReplicas: 3 metricsCpuAverageUtilization: 70 metricsMemoryAverageUtilization: 70
For best performance, do not change the values for
metricsCpuAverageUtilization
andmetricsMemoryAverageUtilization
.
Creating Backups and a Backup Schedule
100Gi
and default backup frequency is one time per day.
For example:backup:
schedule: "0 1 * * *"
pvcSize: 100Gi
- If you want to stop the backup scheduler or change the backup frequency, you
can edit
cronjob.batch/sqlapp-backup-job
with the following command:#kubectl edit cronjob.batch/sqlapp-backup-job -n ezmysql
- To suspend the backup scheduler, look for the
suspend
key and set it toTrue
. - To change the frequency of backup, edit the
schedule
key values.
schedule: "0 2 * * *"
suspend: false
# ./ezmysql_restore.sh
This script restores the MySQL
database from the backup taken on the PVC. You can fetch the full backup from the
following tenant share
path:path: /opt/bluedata/mapr/mnt/<df-cluster>/<pvc-volume-path>/<backup-dump>
For
example:/opt/bluedata/mapr/mnt/df01/844d9e48-k8s-6--sklyrckwmf/EZML_14102022_06_40/
Uninstalling MySQL Operator and MySQL InnoDB Cluster
ezmysql
namespaces
only. Namespaces are cleaned after each uninstall, and PVCs are deleted.To uninstall MySQL Operator and MySQL InnoDB Cluster, proceed as follows:
- Run the uninstallation
script:
The following actions are performed:# ./ezmysql_uninstall.sh
- Uninstalls MySQL InnoDB Cluster
- Uninstalls MySQL Operator
- Deletes PVCs
- On successful uninstallation, the following message
appears:
No resources found in ezmysql namespace.