============================== DBaaS ============================== ************ Introduction ************ E2E's DBaaS provides a selection of node types optimized to fit different relational database use cases consisting of different database engines. Node Cluster configuration comprises varying combinations of CPU, memory, storage and gives you the flexibility to choose the appropriate mix of resources for your database. E2E's Relational DBaaS Service makes it easier for us to set up and operate Relational Databases in the cloud, providing us with Cost-efficient service and automating time-consuming administrator tasks such as Provisioning, Patching, and Setups. ******** Benefits ******** Easy Administration =================== Database makes it easier to deploy the nodes, Using the Myaccount portal with just a click away from providing necessary details you will be able to provision the node. There will not be any administrative task of installing or maintaining the database software. Scalability and Failover ======================== Database with only a few clicks helps you setup a slave which allows you to launch one or more Read Replicas to offload read traffic from your primary database nodes. Speed ===== Database Supports the most demanding application. You can choose between different cluster configurations based on your usage which are optimized for high performance. Secure ====== Database is highly secure restricting access to the external environment with Firewall. It Provides the necessary option for you to optimize the setting so that only a known and existing host will be able to connect with your database. ************************************* Getting Started with Database ************************************* E2E's DBaaS is a service that makes it easier to set up, operate, and scale a relational database in the cloud. MyAccount Portal provides you a web-based interface for accessing and managing all your Database resources. How to Create a Database Cluster in Myaccount Portal ==================================================== This section will show you how to create a database cluster from the Myaccount portal. The tutorial that is mentioned below are the basic steps of getting started with the Relational Database cluster in Myaccount Portal Login into MyAccount Portal =========================== Please Login to Myaccount Portal using your credentials set up at the time of creating and activating the E2E Networks ‘My Account’. Navigate to Database Page ================================= Once you have logged in to Myaccount Portal, You can navigate to the database page from the sidebar menu .. image:: images/dbs.jpeg Create Database =============== On the top right section of the manage database dashboard, You need to click on the “Create Database” Button which will prompt you to the cluster page where you will be selecting the configuration and entering the details of your database .. image:: images/dbs2.jpeg Database Configuration and Setting ================================== After creating the database, You need to select the required configuration and setting for your database which are mentioned below. .. image:: images/dbs3.jpeg **Database Engine** - Database has various database engines available. You need to select the required database engine which you prefer, Below are the list of database engine which we currently support * Mariadb - 10.4 * Mysql 5.6 * Mysql 5.7 * Mysql 8.0 **Cluster Configuration** - Node Cluster configuration comprises varying combinations of CPU, memory, storage and gives you the flexibility to choose the appropriate mix of resources for your database. **Cluster Name** - You need to Provide the Cluster name which you want for your cluster. This name will be visible on the Database page **Database Setting** - We need to update the database name, user and provide a secure password for our database. You will be using these credentials to log in to the database server. With strong password authentication, your database controls and authenticates user accounts. If a DB engine has strong password management features, they can enhance security. Once you have entered the required details, click on create a database. Your database might take a few minutes to Launch. The database node will be in a setting up state until its ready to use and when the status will change to running. *********************************** Connecting to your database Cluster *********************************** After E2E’s database (DBS) provision your nodes, you can use any standard SQL client application to connect to a database on the DB instance. In this example, you connect to a database on a Maria DB instance using the MySQL command-line tool. To connect to your database node using MySQL command line ========================================================= Once your database has been provisioned and its running status, You can get the database connectivity information on the dashboard. * Usernames * Host Details * Port * SSL Mode .. image:: images/dbs4.jpeg Enter the following command at a command prompt on your local or client desktop to connect to a Mariadb or mysql database. :: mysql -h -P 3306 -u <’username’> -p <’password’> After you enter the password for the user, you should see output similar to the following. :: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 272 Server version: 5.5.5-10.0.17-MariaDB-log MariaDB Server Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql > *************************** Managing Your Database Node *************************** In this section, you can find instructions and details to Manage and Maintain your database. To manage, Click on Action and Select Manage option for your database Node .. image:: images/dbs5.jpeg Database and Connectivity Details ================================= In the database page,at the top section, You can find the details of your database configurations. .. image:: images/dbs6.jpeg To check the connectivity details of your database,Click on connectivity details. Here you can have two options for your database connectivity. .. image:: images/dbs7.jpeg Use Different Read/Write Port: ------------------------------ This option will have different read and write port (3306 and 3307) binded for your database connection Use Same Read/Write Port: ------------------------- This option will have same port binded for both read and write operation for your database connection .. image:: images/dbs8.jpeg Host Information ================ To check the host information, Click on Information tab below to get the host details like IP’s and port details. .. image:: images/dbs9.jpeg Security Setting ================ Allowed Host This setting control the access of Allowed host that can be able to connect your Database node. If No trusted host selected. Anyone can connect using credentials. Slave Configuration =================== Slave configuration for your database cluster allows you to easily maintain having multiple copies of data by copying it from your master database to a slave database. This can be helpful for many reasons including facilitating a backup for the data,a way to analyze it without using the main database, or simply as a means to scale out. To create a new read-only node to your cluster, Click on Add New slave button. Once the slave node is configured, you can connect your cluster and verify it using below command. .. image:: images/dbs10.jpeg User and Database Details ========================= In this section, You will be able to check User credentials and Software details of your database. .. image:: images/dbs11.png Stopping your Database ============================== If you are using your DB Node for temporary testing or for any other daily development activity and want to test out your database by stopping it which will close all the connections in your database. You can perform this action by clicking on Action and selecting stop button. .. image:: images/dbs11.jpeg Resume your Database ============================ You can resume your database which was stopped earlier by clicking on Resume button in the Action menu. Resuming your database will retain the same IP and credentials for your database and there will not be any changes at configuration level. .. image:: images/dbs12.jpeg Restart your Database ============================= If you are testing out your DB nodes, restarting your database to reset connections or for any troubleshooting purpose, You can restart your database by clicking on Restart button on action menu. .. image:: images/dbs13.jpeg Delete your Database ============================ To delete your database, click on delete option. Please note that once you have deleted your database you will not be able to recover your database. .. image:: images/dbs14.jpeg Take Manual Snapshot of Database ======================================== E2E’s Database creates a snapshot of your database node, backing up the entire DB node and not just individual databases. To create a snapshot of your database, Click on Action and select Manual Snapshot option. A pop up menu will appear prompting you to enter the snapshot name. Enter the snapshot name and click on create snapshot. The amount of time it takes to create a snapshot varies with the size your databases .. image:: images/dbs15.jpeg Restore Snapshot of Database ==================================== To restore the database snapshot,click on Action and select Restore Snapshot option.The amount of time it takes to restore a snapshot varies with the size your databases. As soon as the restore is complete your database will be in running state. .. image:: images/dbs16.jpeg Monitoring ========== After you launch your database node, you can view the monitoring graphs for your node on the Monitoring tab. Each graph is based on one of the different metrics. This information is collected from your node and processes raw data into readable graphs. Monitoring is an important part of maintaining the reliability, availability, and performance of your database Slow Log queries ================ The slow query log feature in MySQL allows you to log all queries that take longer than a given threshold of execution time. The queries in the slow query log are good candidates to start optimizing and eliminating the bottlenecks. To configure slow log queries, Click on configure view and select the appropriate time duration to log the queries that will be displayed on the dashboard. .. image:: images/dbs18.jpeg .. image:: images/dbs19.png Alert Configuration =================== You can set up new alerts by defining trigger parameters as per your use case for your database. The alerting system works by sending automatic response notifications to your defined email list. .. image:: images/dbs19.jpeg