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.
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 MongoDB, Cassandra, Couchbase or something else similar to as if they are using a built-in dataset type with Delphix Engine.
Couchbase plugin is developed to virtualize couchbase data source leveraging the following built-in couchbase technologies:
- Cross Data Center Replication (XDCR) allows data to be replicated across clusters that are potentially located in different data centers.
- Cbbackupmgr allows data to be restored on staging host of Couchbase Server.
- Ingest Couchbase: Dsource can be created from a Couchbase cluster/single instance using (XDCR ingestion mechanism) or : Dsource can be created by restoring from a Couchbase backup peice using (CBBACKUPMGR ingestion mechanism) - Zero Touch Production.
- Environment Discovery: Couchbase plugin can discover environments where Couchbase server is installed.
- VDB Creation: Single node Couchbase VDB can be provisioned from the dsource snapshot.
- Prerequisites
- Build and Upload Plugin
- Virtualizing Couchbase
- Download logs
- Tested Versions
- Supported Features
- Unsupported Features
- Known Issues
- How to Contribute
- Statement of Support
- License
Source Requirements: Couchbase database user with following privileges
- XDCR_ADMIN
- DATA_MONITOR
Staging Requirements: O/S user with following privileges
-
Regular o/s user.
-
Execute access on couchbase binaries [ chmod -R 775 /opt/couchbase ]
-
Empty folder on host to hold delphix toolkit [ approximate 2GB free space ]
-
Empty folder on host to mount nfs filesystem. This is just an empty folder with no space requirements and act as base folder for nfs mounts.
-
sudo privileges for mount, umount. See sample below assuming
delphix_os
is used as delphix user.Defaults:delphixos !requiretty delphixos ALL=NOPASSWD: \ /bin/mount, /bin/umount
-
Customers who intends to use CBBACKUPMGR (Couchbase backup manager ingestion) must follow the instructions to avoid source/production server dependency.
-
Provide all source server buckets related information( using below command ) in a file and place at
<Toolkit-Directory-Path>/couchbase_src_bucket_info.cfg
:/opt/couchbase/bin/couchbase-cli bucket-list --cluster <sourcehost>:8091 --username $username --password $password
-
Create config file using below command. This file will be required at the time of dSource creation using CBBACKUPMGR.
/opt/couchbase/bin/cbbackupmgr config --archive /u01/couchbase_backup --repo delphix
-
Get data from source host in backup directory of staging host
/opt/couchbase/bin/cbbackupmgr backup -a /u01/couchbase_backup -r delphix -c couchbase://<hostname> -u user -p password
-
Target Requirements: O/S user with following privileges
- Regular o/s user.
- Execute access on couchbase binaries [ chmod -R 775 /opt/couchbase ]
- Empty folder on host to hold delphix toolkit [ approximate 2GB free space ]
- 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.
- sudo privileges for mount, umount. See sample below assuming
delphix_os
is used as delphix user.Defaults:delphixos !requiretty delphixos ALL=NOPASSWD: \ /bin/mount, /bin/umount
- Create a virtual environment and install required libraries(dvp, pytest, pytest-html & pytest-cov) using script
virtualEnvSetup.sh
.
cd <complete path of project directory till `couchbase-plugin` directory>
./test/virtualEnvSetup.sh <virtual enviornment name>
For example:
cd /Users/<your-user-name>/Desktop/Plugins/OpenSourceCouchbase/couchbase-plugin
./test/virtualEnvSetup.sh "MyLocalEnv"
- Run this command to activate the virtual environment created in step 1:
. test/MyLocalEnv/bin/activate
- Build the source code. It generates the build with name
artifacts.json
:
dvp build
- Upload the
artifacts.json
( generated in step 3 ) on Delphix Engine:
dvp upload -e <Delphix_Engine_Name> -u <username> --password <password>
- Unit test run: Make sure to build the source code( using
dvp build
) before running unit tests
pytest test/
The following document provides details on how to virtualize couchbase dataset, step-by-step information on how to link, provision couchbase dataset: CouchbaseUserDocumentation.md
Download the plugin logs using below command:
dvp download-logs -c plugin_config.yml -e <Delphix_Engine_Name> -u admin --password <password>
A report with name Report.html
gets generated in test
directory which contains the summary of test passed vs failed. If any test case fails then complete stack trace can be seen in that test case section.
There is a report folder CodeCoverage
(can change the folder name in config file pytest.ini
) generated in test
directory, which contains html files. These files help in source code coverage visualization, in which we can see statements processed and missed in each module of source code.
- Delphix Engine: 5.3.x and 6.0.x
- Couchbase Version: 5.5 and 6.0
- Linux Version: RHEL 7.x
- XDCR (Cross Data Center Replication)
- Couchbase Backup Manager
- Backup documents as compressed
- Incremental Backup Restore
- Unable to build indexes during VDB provision
Please read CONTRIBUTING.md to understand the pull requests process.
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.
This is code is licensed under the Apache License 2.0. Full license is available here.