Provisioning a CockroachDB virtual database
To provision a virtual database (VDB), you can either use an existing dSource snapshot or use another VDB snapshot for VDB to VDB provisioning. A snapshot is a specific point in time on the timeflow.
Prerequisites
Must have linked a dSource from a staging instance following the instructions in "Linking a CockroachDB dSource," or have already created a VDB from which you intend to provision another VDB.
A CockroachDB target environment must be set-up with the necessary requirements as described in CockroachDB support and requirements.
A CockroachDB binary with the same version as the source database must be installed on the Target.
Procedure
Navigate to Manage, and select Datasets.
Select the dataset and the snapshot that you want provision from. Click the provision VDB icon to open the provision VDB wizard.
Select a target environment from the left pane, and an Installation to use from the dropdown list of available CockroachDB instances on that environment.
Set the Environment User to be the Instance Owner.
You can only select instance owners if you have multiple environment users set on that host.
![cockroach15.png](../../__attachments/205332430/cockroach15.png?inst-v=9f5cd9ef-94fe-4677-b3c4-6c5d1617af5c)
Next, You will see the Target Configuration section where you need to enter VDB specific parameters.
Mount Path Mount Path for VDB CockroachDB Cluster datafiles
IP Address / Hostname of the Primary Target Host IP Address / Hostname of the interface for Primary Target Host
Target CockroachDB Port Number Target DB port for cluster’s inter-node communication
Target CockroachDB Console Port Number Target Console port for HTTP requests
CockroachDB VDB Cluster Name VDB Cluster Name to be configured on Target Host
Secure Mode Option to run the CockroachDB server in secure mode
Certificate directory path The absolute path to the certificate directory, it must have valid certificates containing the IP address or hostname for the CockroachDB server
CockroachDB Parameters Additional CockroachDB configuration parameters to start the CockroachDB cluster
Parameter Name CockroachDB Cluster configuration parameter name
Parameter Value CockroachDB Cluster configuration parameter value
On the configuration page, select the Additional Nodes (+Add) button for adding new nodes to CockroachDB target cluster.
Environment Select the target environment from drop-down to add the new CockroachDB node to cluster.
Environment User Select the target environment user to add the new CockroachDB node to cluster.
IP Address / Hostname of the Additional Node Target Host IP Address / Hostname of the interface for Secondary Target Host.
Target CockroachDB Port Number Target DB port for cluster’s inter-node communication.
Target CockroachDB Console Port Number Target Console port for HTTP requests.
Certificate directory path The absolute path to the certificate directory, it must have valid certificates containing the IP address or hostname for the CockroachDB server.
Append CRDB Parameters Option to append the existing primary node CRDB parameters to additional node.
Next, select Additional Node CRDB Parameters to overwrite additional node CockroachDB parameters configured in Target CockroachDB cluster. Click on (+Add) button to add CRDB parameters.
Parameter Name CockroachDB Cluster configuration parameter name.
Parameter Value CockroachDB Cluster configuration parameter value.
Then click Next to proceed further.
On the Configuration page, Select the VDB Name and Target Group for the VDB.
Add a new group, if required.
Select a Snapshot Policy for the VDB.
Click Next.
10. Specify any desired hook operations.
11. Click Next.
12. Review the Provisioning Configuration and Data Management information.
13. Click Submit.
When provisioning starts, you can review the progress of the job in the Databases panel, or in the Job History panel of the Dashboard.
When the provisioning completes a new VDB timeflow will be created. Once the VDB is created successfully, you can review the datasets on the Manage > Datasets screen in the left hand panel. You have now provisioned a CockroachDB VDB. Moreover, the VDB will be included in the group you designated and listed in the Databases panel. If you select the VDB in the Databases panel and click the Open icon, you can view its card, which contains information about the database and its Data Management settings.