|
1 | | -# msyql_sdk_plugin |
| 1 | +## |
| 2 | +## What Does a Delphix Plugin Do? |
| 3 | +Delphix is a data management platform that provides the ability to securely copy and share datasets. Using virtualization, you will ingest your data sources and create virtual data copies, which are full read-write capable database instances that use a small fraction of the resources a normal database copy would require. The Delphix engine has built-in support for interfacing with certain types of datasets, such as Oracle, SQL Server and ASE. |
| 4 | + |
| 5 | +The Delphix virtualization SDK (https://github.com/delphix/virtualization-sdk) provides an interface for building custom data source integrations for the Delphix Dynamic Data Platform. The end users can design/implement a custom plugin which enable them to use custom data source like MySQL, MongoDB, Cassandra, MySQL or something else similar to as if they are using a built-in dataset type with Delphix Engine. |
| 6 | + |
| 7 | +## MySQL Plugin |
| 8 | +MySQL plugin is developed to virtualize MySQL data source leveraging the following built-in MySQL technologies: |
| 9 | + - Replication: Allows staging MySQL instance to be kept in sync with teh source database. |
| 10 | + - Ingest Backup: Dsource can be created by ingesting a MySQL backup. |
| 11 | + - Subsetting: Allows to create a dSource using a specific list of tables from source database. |
| 12 | + - Environment Discovery: MySQL plugin can discover environments where MySQL server is installed. |
| 13 | + - VDB Creation: Single node MySQL VDB can be provisioned from the dsource snapshot. |
| 14 | + |
| 15 | + |
| 16 | +### Table of Contents |
| 17 | +1. [Prerequisites](#requirements-plugin) |
| 18 | +2. [Build and Upload Plugin](#upload-plugin) |
| 19 | +3. [Download logs](#run_unit_test_case) |
| 20 | +4. [Tested Versions](#tested-versions) |
| 21 | +5. [Supported Features](#support-features) |
| 22 | +6. [Unsupported Features](#unsupported-features) |
| 23 | +7. [How to Contribute](#contribute) |
| 24 | +8. [Statement of Support](#statement-of-support) |
| 25 | +9. [License](#license) |
| 26 | + |
| 27 | + |
| 28 | +### <a id="requirements-plugin"></a>Prerequisites |
| 29 | +**MySQL instance requirements** |
| 30 | +1. Binary logging must be enabled on MySQL source instance. |
| 31 | +2. Server ID for the source must be greater than 0. |
| 32 | + |
| 33 | +**MySQL database user with following privileges** |
| 34 | +1. delphixdb |
| 35 | +This MySQL user must be configured to have following privilege from the Delphix Engine IP as well as the staging host IP. |
| 36 | +To grant the privilege for this user, use the following command: |
| 37 | + |
| 38 | +```js |
| 39 | +SQL> GRANT SELECT, RELOAD, REPLICATION CLIENT,REPLICATION SLAVE,SHOW VIEW, EVENT, TRIGGER on *.* to 'delphix'@'%'; |
| 40 | +``` |
| 41 | + |
| 42 | +OR |
| 43 | + |
| 44 | +```js |
| 45 | +SQL> GRANT ALL PRIVILEGES ON *.* TO '<delphix>'@'%'; |
| 46 | +``` |
| 47 | + |
| 48 | +#### _Staging Requirements_ |
| 49 | + |
| 50 | +**O/S user with following privileges** |
| 51 | + |
| 52 | +1. Same version as Source MySQL Binaries installed. |
| 53 | +2. A MySQL config file (my.cnf) to be used for the Staging DB instance must be available under Delphix Toolkit Directory. |
| 54 | +3. Regular o/s user. should be able to ps all processes. |
| 55 | +4. Execute access on mysqldump, mysqld, mysql binary |
| 56 | +5. Empty folder on host to hold delphix toolkit [ approximate 2GB free space ] |
| 57 | +6. Empty folder on host to mount nfs filesystem. This is just and empty folder with no space requirements and act as base folder for nfs mounts. |
| 58 | +7. sudo privileges for mount, umount. See sample below assuming `delphix_os` is used as delphix user. |
| 59 | + |
| 60 | +```shell |
| 61 | +Defaults:delphix_os !requiretty |
| 62 | +delphix_os ALL=NOPASSWD: \ |
| 63 | +/bin/mount, /bin/umount |
| 64 | +``` |
| 65 | + |
| 66 | +#### _Target Requirements_ |
| 67 | + |
| 68 | +**O/S user with following privileges** |
| 69 | + |
| 70 | +1. Same version as Source MySQL Binaries installed. |
| 71 | +2. A MySQL config file (my.cnf) to be used for the Staging DB instance must be available under Delphix Toolkit Directory. |
| 72 | +3. Regular o/s user. should be able to ps all processes. |
| 73 | +4. Execute access on mysqldump, mysqld, mysql binary |
| 74 | +5. Empty folder on host to hold delphix toolkit [ approximate 2GB free space ] |
| 75 | +6. Empty folder on host to mount nfs filesystem. This is just and empty folder with no space requirements and act as base folder for nfs mounts. |
| 76 | +7. sudo privileges for mount, umount. See sample below assuming `delphix_os` is used as delphix user. |
| 77 | + |
| 78 | +```shell |
| 79 | +Defaults:delphix_os !requiretty |
| 80 | +delphix_os ALL=NOPASSWD: \ |
| 81 | +/bin/mount, /bin/umount |
| 82 | +``` |
| 83 | + |
| 84 | + |
| 85 | +### <a id="upload-plugin"></a>Steps to build, upload and run unit tests for plugin |
| 86 | + |
| 87 | + 1. Build the source code. It generates the build with name `artifacts.json`: |
| 88 | +```bash |
| 89 | + dvp build |
| 90 | +``` |
| 91 | + |
| 92 | + 2. Upload the `artifacts.json` ( generated in step 3 ) on Delphix Engine: |
| 93 | +```bash |
| 94 | + dvp upload -e <Delphix_Engine_Name> -u <username> --password <password> |
| 95 | +``` |
| 96 | + |
| 97 | + |
| 98 | +### <a id="run_unit_test_case"></a>Download plugin logs |
| 99 | +#### Plugin Logs: |
| 100 | +Download the plugin logs using below command: |
| 101 | + |
| 102 | +```dvp download-logs -c plugin_config.yml -e <Delphix_Engine_Name> -u admin --password <password>``` |
| 103 | + |
| 104 | + |
| 105 | +### <a id="tested-versions"></a>Tested Versions |
| 106 | +- Delphix Engine: 6.0.2 and above |
| 107 | +- MySQL Version: 5.7.7, 5.7.9, 5.7.10, 5.7.12 |
| 108 | +- Linux Version: RHEL 6.x |
| 109 | + |
| 110 | +### <a id="support-features"></a>Supported Features |
| 111 | +- MySQL Replication |
| 112 | +- MySQL Tablespace Hotbackup |
| 113 | + |
| 114 | +### <a id="unsupported-features"></a>Unsupported Features |
| 115 | +- MySQL Clusters |
| 116 | +- Sharded MySQL Databases |
| 117 | + |
| 118 | + |
| 119 | +### <a id="contribute"></a>How to Contribute |
| 120 | + |
| 121 | +Please read [CONTRIBUTING.md](./CONTRIBUTING.md) to understand the pull requests process. |
| 122 | + |
| 123 | +### <a id="statement-of-support"></a>Statement of Support |
| 124 | + |
| 125 | +This software is provided as-is, without warranty of any kind or commercial support through Delphix. See the associated license for additional details. Questions, issues, feature requests, and contributions should be directed to the community as outlined in the [Delphix Community Guidelines](https://delphix.github.io/community-guidelines.html). |
| 126 | + |
| 127 | +### <a id="license"></a>License |
| 128 | + |
| 129 | +This is code is licensed under the Apache License 2.0. Full license is available [here](./LICENSE). |
2 | 130 |
|
3 | | -Description: Delphix Virtualization SDK based plugin for MySQL datasources. |
|
0 commit comments