Generating a custom resource from an existing Eon Mode database
To simplify OpenText™ Analytics Database on Kubernetes adoption, the vdb-gen migration tool revives an existing Eon Mode database as a StatefulSet in Kubernetes. vdb-gen generates a custom resource (CR) from an existing Eon Mode database by connecting to the database and writing to standard output.
Use the -h flag to view a full list of the available vdb-gen options, including options for debugging and working with environment variables. The following steps generate a CR using basic commands:
-
Execute
vdb-genand redirect the output to a YAML-formatted file:$ vdb-gen --password secret --name mydb --user mysuperuser --license /path/to/license_file --https-tls-dir /path/to/https_certs --https-tls-mode try_verify --server-tls-dir /path/to/server_certs --server-tls-mode try_verify 10.20.30.40 vertdb > vdb.yamlThe previous command uses the following flags and values:
-
password: The existing database superuser secret password.
-
name: The name of the new custom resource object.
-
user: The existing database super user (default is
dbadmin). -
license: The path to the license file to use with the VerticaDB manifest. This file is included in a secret that is printed with the other manifests. If omitted, no license is set in VerticaDB.
-
https-tls-dir : The path to the directory containing HTTPS/NMA TLS certificates. Required files are
ca.crt,tls.crt, andtls.key. -
https-tls-mode: The TLS mode to use for HTTPS/NMA TLS certificates. Valid values are
enable,try_verify,verify_ca, andverify_full(default istry_verify). -
server-tls-dir : The path to the directory containing server TLS certificates. Required files are
ca.crt,tls.crt, andtls.key. -
server-tls-mode:The TLS mode to use for server TLS certificates. Valid values are
enable,try_verify,verify_ca, andverify_full(default istry_verify). -
10.20.30.40: The IP address of the existing database.
-
vertdb: The name of the existing Eon Mode database.
-
vdb.yaml: The YAML formatted file that contains the custom resource definition generated by the vdb-gen tool.
-
-
Use the admintools stop_db command to stop the existing database:
$ /opt/vertica/bin/admintools -t stop_db -d vertdbWait for the cluster lease to expire before continuing. For details, see Revive with communal storage.
-
Apply the YAML-formatted manifest that was generated by the vdb-gen tool:
$ kubectl apply -f vdb.yaml verticadb.vertica.com/mydb createdNote
For performance purposes, do not apply the manifest to resources that already contain a OpenText™ Analytics Database on Kubernetes install. -
The operator creates the StatefulSet, installs the database on each pod, and runs revive. To view the events generated for the new database, use
kubectl describe:$ kubectl describe vdb mydb
vdb-gen tool configuration parameters
The following table describes all the available configuration parameters for the vdb-gen tool:
| Parameter | Type | Description |
|---|---|---|
| account-name | string | The Azure account name for communal access credentials. This is required if more than one credential is configured. If only one credential exists, the tool uses it by default. |
| cacert-name | string | Specifies the secret name that stores the CA bundle. Use this when a specific certificate name is required. |
| cafile | string | Path to a certificate authority (CA) bundle used for HTTPS authentication. Required only when connecting to the communal endpoint with a CA file. |
| deployment-method | value |
Specifies the cluster deployment method for the operator. Allowed values are admintools or vclusterops. If not set, the deployment method is automatically determined based on the live database server version. |
| depot-volume | string |
Type of volume to use for the depot. Allowed values are EmptyDir or PersistentVolume. Default: PersistentVolume. |
| hadoop-config | string | Path to the directory containing the Hadoop configuration. All files in the directory are included in a ConfigMap. |
| https-tls-dir | string |
Path to a directory containing HTTPS/NMA TLS certificates. Required files are ca.crt, tls.crt, and tls.key. |
| https-tls-mode | string |
TLS mode for HTTPS/NMA TLS certificates. Default: try_verify. |
| https-tls-secret | string | Name of an existing Secret containing HTTPS/NMA TLS certificates. Use when the certificates are already stored in a secret. The secret can be a local Kubernetes secret or a remote secret, such as AWS Secrets Manager. |
| ignore-cluster-lease |
Sets the NoteThis option can cause data corruption and is intended for testing purposes only. | |
| image | string | The OpenText™ Analytics Databaseimage to use in the cluster. If omitted, the default image is used when applying the manifest. |
| krb5-conf | string |
Use this parameter to provide the contents of the krb5.conf file when the communal backend is authenticated with Kerberos. |
| krb5-keytab | string |
Use this parameter to provide the contents of the krb5.keytab file when the communal backend is authenticated with Kerberos. |
| license | string | Absolute path to the license file for the VerticaDB manifest. The file is included in a secret along with other manifests. If omitted, no license is applied in VerticaDB. |
| name | string |
Name of the VerticaDB object to create. Default: vert. |
| password | string |
Password for the --user option. |
| port | int |
Port number of the host to connect to. Default: 5433. |
| server-tls-dir | string |
Path to a directory containing server TLS certificates. Required files are ca.crt, tls.crt, and tls.key. |
| server-tls-mode | string |
TLS mode for server TLS certificates. Default: try_verify. |
| server-tls-secret | string | Name of an existing secret containing server TLS certificates. Use when the certificates are already stored in a secret. The secret can be a local Kubernetes secret or a remote secret, such as AWS Secrets Manager. |
| tls-mode | string |
The TLS mode to use when connecting. Valid values are none, server, and server-strict (default: none). |
| user | string |
Database user to connect with. Must have sufficient privileges to inspect the database structure. Default: dbadmin. |