T4K QuickStart Plugin
This page describes how to install and use the T4K Quick-Start Plugin.
Deprecated Documentation
This document is deprecated and no longer supported. For accurate, up-to-date information, please refer to the documentation for the latest version of Trilio.
# T4K QuickStart Plugin
Introduction
The tvk-quickstart kubectl plugin is used primarily to get users up and running quickly. It is tested with OCP, RKE, GKE, and DO Kubernetes clusters.
What Does the Plugin Achieve?
Preflight check: Performs prerequisite checks for all T4K requirements.
T4K Installation: Installs T4K, TVM (UI), and free trial license.
T4K Management Console Configuration: Configures control access to the UI. Users can choose either Loadbalancer, Nodeport, or PortForwarding.
Target Creation: Creates and validates the target storage for storing backup images. Users can create an S3 (DigitalOCean Spaces / AWS S3) or an NFS-based target.
Run Backup and Restore of Sample Applications: Run sample tests for a label, namespace, operator, and helm-based applications. By default, backups and restores are performed against:
Label-based MySQL Database application
Namespace-based WordPress application
Operator-based MySQL Database
Helm-based MongoDB based application
Pre-requisites:
All pre-requisites for the T4K installation can be found here.
Install S3cmd. from here.
yq must be version 4 or above. Refer to here for further information.
oc is required if running against OCP cluster - Install oc from here.
Linux or macOS are supported. Windows is not supported at this time.
Installation, Upgrade, and Removal of tvk-quickstart kubectl Plugin
Krew is the plugin manager for kubectl
command-line tool. The tvk-quickstart installation can be executed with or without krew installed, but installion with krew is recommended. However, if there are any issues with your installation of krew, then you may still install the tvk-quickstart kubectl plugin without krew.
Using krew
Action | Command |
---|---|
Add the T4K custom plugin index of krew |
|
Perform the installation |
|
Upgrade the tvk-quickstart plugin |
|
Uninstall the tvk-quickstart plugin |
|
Without krew
If the krew plugin manager is not an option, you may still install the tvk-quickstart kubectl plugin without krew using the following steps.
List of available releases: https://github.com/trilioData/tvk-interop-plugins/releases.
Choose a version of the tvk-quickstart plugin to install and check if release assets have a tvk-quickstart plugins package[tvk-quickstart.tar.gz].
Set env variable
version=[TVK_QS_VERSION]
. If theversion
is not exported, then thelatest
tagged version will be considered.Run this Bash or ZSH shells command to download and install tvk-quickstart without krew
Verify installation using the command:
kubectl tvk-quickstart --help
Modes of Operation
There are two modes to use the tvk-quickstart plugin:
Interactive
Non-interactive
Interactive
For interactive installation of T4K operator and manager, configure the T4K UI, create a target and run a sample backup restore, using the command:
kubectl tvk-quickstart [options]
During interactive execution, the user is prompted for input for various options that enable the plugin to perform installation and deployment operations. Use the information provided in the following table to guide you in these options:
Parameter | Description |
---|---|
-i, --install_tvk | Installs T4K and its free trial license. T4K will be installed as upstream operator. A cluster scope TVM custom resource triliovault-manager is also created. |
-c, --configure_ui | Configures the T4K UI. This option will only work if the cluster has TVM application installed. |
-t, --target | Creates target for backup and restore jobs. |
-s, --sample_test | Creates sample backup and restore jobs. |
-p, --preflight | Checks if all the T4K pre-requisites are satisfied |
A user may specify more than one option with each tvk-quickstart execution. For example, to install, configure, create a target and run samples quickly, execute the following single command:_ kubectl tvk-quickstart -i -c -t -s
Non-interactive
In non-interactive mode, tvk-quickstart performs all operations; preflight checks, installation, UI configuration, and runs sample backup and restore tests. However, all the user input is provided in a configuration file. Use the following steps to invoke tvk-quickstart in the non-interactive mode:
Create an
input_config
file, using the sample input_config file as a template. The non-interactive mode leverages values in theinput_config
file.Edit any variables in the configuration file. Each variable description and the possible values of the variable is described in the following table.
Run the following command to execute the plugin in a non-interactive method:
kubectl tvk-quickstart -n
The user is now prompted to provide the path of the
input_config
file.
Parameters For input_config
input_config
input-config Parameter | Description |
---|---|
PREFLIGHT | This parameter checks whether or not preflight should be executed. It accepts one of the following values: [True, False]. More info around this can be found here |
proceed_even_PREFLIGHT_fail | This option is dependent of PREFLIGHT execution. If the user wishes to proceed despite checks failing in preflight execution, this variable must be set to y/Y. This variable accepts one of the following values [Y,y,n,N]. |
T4K_INSTALL | Set this option to True to install T4K and TVM. Otherwise, set this value to False. |
CONFIGURE_UI | This parameter is to check whether or not T4K UI should be configured. It accepts one of the value from [True, False] |
TARGET | This parameter is to check whether or not T4K Target should be created. It accepts one of the value from [True, False]. Note: Target type "Readymade_Minio" requires 4GB per node, else the target creation will fail. |
SAMPLE_TEST | This parameter is to check whether or not sample test should be executed. It accepts one of the value from [True, False] |
storage_class | This parameter expects storage_class name which should be used across plugin execution. If kept empty, the storage_class annoted with 'default' label would be considered. If there is no such class, the plugin would likely fail. |
operator_version | This parameter requires the user to specify the T4K operator version to install as a part of tvk installation process. The compatibility/version can be found here. If this parameter is empty, by default Trilio operator version 2.1.0 will get installed. |
triliovault_manager_version | This parameter requires the user to specify the T4K manager version to install as a part of tvk installation process. The compatibility/version can be found here. If this parameter is empty, by default Trilio operator version 2.1.0 will get installed. |
tvk_ns | This parameter requires the user to specify the namespace in which tvk is to be installed. |
if_resource_exists_still_proceed | This parameter is to check whether the plugin should proceed for other operations, even if resources exists. It accepts one of the value from [Y,y,n,N] |
ui_access_type | Specify the way in which T4K UI should be configured. It accepts one of the value from ['Loadbalancer','Nodeport','PortForwarding'] |
domain | The value of this parameter is required when 'ui_access_type == Loadbalancer'. Specify the domain name which has been registered with a registrar and in which you wish to create a record. More information about this parameter can be found here. |
tvkhost_name | The value of this parameter is required when 'ui_access_type == Loadbalancer OR ui_access_type == Nodeport'. The value of this parameter is the hostname via which the T4K management console will be accessible using a web browser. |
cluster_name | The value of this parameter is required when 'ui_access_type == Loadbalancer OR ui_access_type == Nodeport'. If kept blank, the active cluster name will be used. |
vendor_type | The value of this parameter is required to create a target. Specify the vendor name under which the target must be created. Currently supported value is for ['Digital_Ocean','Amazon_AWS']. |
doctl_token | Digital Ocean API token, which the user can generate in the control panel here for user authentication. |
target_type | Target is a location where Trilio stores backup. Specify the type of target to create. It accepts one of the values from ['NFS','S3']. More information can be found here. |
access_key | This parameter is required when 'target_type == S3'. This is used for bucket S3 access/creation. The value should be consistent with the vendor_type that you select. |
secret_key | This parameter is required when 'target_type == S3'. This is used for bucket S3 access/creation. The value should be consistent with the vendor_type that you select. |
host_base | This parameter is required when 'target_type == S3'. Specify the s3 endpoint for the region that your Spaces/Buckets are in. More information can be found here. |
host_bucket | The value of this parameter should be a URL template to access s3 bucket/spaces. This parameter is required when 'target_type == S3'. Generally its value is '%(bucket)s.' . This is the URL to access the bucket/space. |
gpg_passphrase | This parameter is for an optional encryption password. Unlike HTTPS, which protects files only while in transit, GPG encryption prevents others from reading files both in transit and when they are stored. More information can be found @here. |
bucket_location | Specify the location where the s3 bucket for the target should be created. This parameter is specific to AWS vendor_type. The value can be one of the follwing: ['us-east-1', 'us-west-1', 'us-west-2', 'eu-west-1', 'eu-central-1', 'ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'sa-east-1']. |
bucket_name | The name that a user wants to give to a bucket for target creation. |
target_name | Specify the name for the target that needs to be created. |
target_namespace | Specify the name of the namespace in which the target should be created in. The user must have permission to create, modify, and access the namespace. |
nfs_server | The server IP address or the fully qualified nfs server name for NFS target creation. |
nfs_path | Specify the exported path which can be mounted for target creation. This parameter is required when 'target_type == NFS'. |
nfs_options | Specify if any other NFS option needs to be set. Additional values for the nfsOptions field can be found here. |
thresholdCapacity | Capacity at which the IO operations are performed on the target. Units supported - [Mi,Gi,Ti] |
bk_plan_name | Specify the name for backup plan creation for the sample application. Default value is 'trilio-test-backup'. |
bk_plan_namespace | Specify the namespace in which the application should be installed and in which the backup plan will be created. The default value is 'trilio-test-backup'. |
backup_name | Specify the name for the backup which will be created for the sample application. The default value is 'trilio-test-backup'. |
backup_namespace | Specify the namespace in which the backup should be created. The default value is 'trilio-test-backup'. |
backup_way | Specify the way in which the backup should be taken. Supported values are as follows: ['Label_based','Namespace_based','Operator_based','Helm_based']. For Label_based, the MySQL application is installed and the sample backup/restore will be showcased. For Namespace_based, the WordPress application is installed and the sample backup/restore will be showcased. For Operator_based, MySQL operator is installed and the sample backup/restore will be showcased. For Helm_based, the MongoDB application is installed and the sample backup/restore will be showcased. |
restore | Specify whether or not restore should be executed. Valid values are [True, False]. |
restore_name | Specify the name for the restore. The default value is 'tvk-restore'. |
restore_namespace | Specify the namespace in which the backup should be restored. The default value is 'tvk-restore'. |
Last updated