NetBackup™ Terraform Azure Guide
NetBackup™ Terraform Azure Guide
Technology Deployment
Guide Using Terraform for
Microsoft Azure
Release 10.5
Veritas Cloud Scale Technology deployment guide
using Terraform for Azure cloud
Last updated: 2024-09-23
Legal Notice
Copyright © 2024 Veritas Technologies LLC. All rights reserved.
Veritas, the Veritas Logo, Veritas Alta, and NetBackup are trademarks or registered trademarks
of Veritas Technologies LLC or its affiliates in the U.S. and other countries. Other names may
be trademarks of their respective owners.
This product may contain third-party software for which Veritas is required to provide attribution
to the third party (“Third-party Programs”). Some of the Third-party Programs are available
under open source or free software licenses. The License Agreement accompanying the
Software does not alter any rights or obligations you may have under those open source or
free software licenses. Refer to the Third-party Legal Notices document accompanying this
Veritas product or available at:
https://www.veritas.com/about/legal/license-agreements
The product described in this document is distributed under licenses restricting its use, copying,
distribution, and decompilation/reverse engineering. No part of this document may be
reproduced in any form by any means without prior written authorization of Veritas Technologies
LLC and its licensors, if any.
The Licensed Software and Documentation are deemed to be commercial computer software
as defined in FAR 12.212 and subject to restricted rights as defined in FAR Section 52.227-19
"Commercial Computer Software - Restricted Rights" and DFARS 227.7202, et seq.
"Commercial Computer Software and Commercial Computer Software Documentation," as
applicable, and any successor regulations, whether delivered by Veritas as on premises or
hosted services. Any use, modification, reproduction release, performance, display or disclosure
of the Licensed Software and Documentation by the U.S. Government shall be solely in
accordance with the terms of this Agreement.
Technical Support
Technical Support maintains support centers globally. All support services will be delivered
in accordance with your support agreement and the then-current enterprise technical support
policies. For information about our support offerings and how to contact Technical Support,
visit our website:
https://www.veritas.com/support
You can manage your Veritas account information at the following URL:
https://my.veritas.com
If you have questions regarding an existing support agreement, please email the support
agreement administration team for your region as follows:
Japan [email protected]
Documentation
Make sure that you have the current version of the documentation. Each document displays
the date of the last update on page 2. The latest documentation is available on the Veritas
website:
https://sort.veritas.com/documents
Documentation feedback
Your feedback is important to us. Suggest improvements or report errors or omissions to the
documentation. Include the document title, document version, chapter title, and section title
of the text on which you are reporting. Send feedback to:
You can also see documentation information or ask a question on the Veritas community site:
http://www.veritas.com/community/
https://sort.veritas.com/data/support/SORT_Data_Sheet.pdf
Contents
■ About Terraform
Required terminology
The table describes the important terms used in this guide for deploying Veritas
Cloud Scale Technology on Azure.
Term Description
Azure Virtual Azure Virtual Network provides secure, private networking for your
Network Azure and on-premises resources.
ACR Azure Container Registry allows you to build, store, and manage
container images and artifacts in a private registry for all types of
container deployments.
AKS cluster Azure Kubernetes Service (AKS) offers the quickest way to start
developing and deploying cloud-native apps in Azure, datacenters,
or at the edge with built-in code-to-cloud pipelines and guardrails.
About Terraform
Terraform is an open source "Infrastructure as Code" tool created by HashiCorp.
It manages resources (such as cloud infrastructure, network appliances, Software
as a Service, and Platform as a Service) with the providers.
Using Terraform, you can create and manage resources on cloud platforms and
other services through their application programming interfaces (APIs). Service
providers enable Terraform to work virtually with any platform or service with an
accessible API.
Here are some advantages of Terraform:
■ Manage any infrastructure: Terraform uses immutable approach which reduces
the complexity of upgrading or modifying your services and infrastructure.
■ Tracks infrastructure status: A state file keeps track of your environment and
suggests changes to your infrastructure to match the configuration.
■ Standardize configurations: Terraform supports reusable configuration
components called modules that define configurable collections of infrastructure.
Terraform supports several cloud infrastructure providers such as Microsoft Azure,
Amazon Web Services (AWS), Cloudflare, IBM Cloud, Google Cloud Platform, and
Oracle Cloud Infrastructure.
The table describes you about the high-level steps involved in the deployment.
Introduction 9
About Terraform
Table 1-2 Getting started using Terraform scripts for deploying Veritas
Cloud Scale Technology on Azure
Steps
1. Ensure that the prerequisites for creating the Terraform Management Server are met.
5b. Installation instructions for deploying the Veritas Cloud Scale Technology.
Table 2-1 Getting started using Terraform scripts for deploying Veritas
Cloud Scale Technology on Azure
Steps Description
1. Ensure the prerequisites for Ensure that the Terraform Management Server
creating Terraform Management prerequisites and networking requirements are met.
Server are met.
Refer See “Terraform Management Server
requirements” on page 16.
3. Authentication with Azure User / role which you will be using for deployment
should have minimum permissions. Refer
Table 2-1 Getting started using Terraform scripts for deploying Veritas
Cloud Scale Technology on Azure (continued)
Steps Description
4. Execute the PreFlight checker This checklist is executed to verify the environment
script. readiness before deploying theVeritas Cloud Scale
Technology. Refer to the section See “About PreFlight
checker (checklist) script” on page 22.
5a. Learn about the stages involved See “Stages of deploying Terraform scripts on Azure”
in the Terraform deployment on page 23.
5b. Installation instructions for See “Installation instructions for deploying the Veritas
deploying the Veritas Cloud Scale Cloud Scale Technology on Azure” on page 35.
Technology
6. Access Veritas Cloud Scale See “Accessing the Veritas Cloud Scale Technology
Technology UI after deployment environment after deployment” on page 41.
Chapter 3
Prerequisites for setting up
Azure environment
This chapter includes the following topics:
Microsoft.ContainerService/managedClusters/read
Microsoft.ContainerService/managedClusters/write
Microsoft.ContainerService/managedClusters/delete
Microsoft.ContainerService/managedClusters/start/action
Microsoft.ContainerService/managedClusters/stop/action
Microsoft.ContainerService/managedClusters/listClusterAdminCredential/action
Microsoft.ContainerService/managedClusters/listClusterUserCredential/action
Microsoft.ContainerService/managedClusters/listClusterMonitoringUserCredential/action
Microsoft.ContainerService/managedClusters/privateEndpointConnectionsApproval/action
Microsoft.ContainerService/managedClusters/runCommand/action
Microsoft.ContainerService/managedClusters/agentPools/read
Microsoft.ContainerService/managedClusters/agentPools/write
Microsoft.ContainerService/managedClusters/agentPools/delete
Microsoft.ContainerService/managedClusters/resolvePrivateLinkServiceId/action
Microsoft.ContainerService/managedClusters/agentPools/upgradeNodeImageVersion/write
Microsoft.ContainerService/managedClusters/extensionaddons/read
Microsoft.ContainerService/managedClusters/extensionaddons/write
Microsoft.ContainerService/managedClusters/privateEndpointConnections/read
Microsoft.ContainerService/managedClusters/privateEndpointConnections/write
Prerequisites for setting up Azure environment 15
Azure subscription permission requirements
Microsoft.ContainerService/managedClusters/privateEndpointConnections/delete
Microsoft.ContainerService/managedclustersnapshots/read
Microsoft.ContainerService/managedclustersnapshots/write
Microsoft.ContainerService/managedclustersnapshots/delete
Microsoft.Authorization/permissions/read
Microsoft.ContainerRegistry/registries/write
Microsoft.ContainerRegistry/registries/delete
Microsoft.ContainerRegistry/registries/read
Microsoft.ContainerRegistry/registries/listCredentials/action
Microsoft.ContainerRegistry/registries/privateEndpointConnections/read
Microsoft.ContainerRegistry/registries/privateEndpointConnections/delete
Microsoft.ContainerRegistry/registries/privateEndpointConnections/write
Microsoft.ContainerRegistry/registries/pull/read
Microsoft.ContainerRegistry/registries/push/write
Microsoft.Authorization/roleAssignments/read
Microsoft.Authorization/roleAssignments/write
Microsoft.Authorization/roleAssignments/delete
Microsoft.Authorization/roleDefinitions/read
Microsoft.Authorization/roleDefinitions/write
Microsoft.Authorization/roleDefinitions/delete
Microsoft.ManagedIdentity/userAssignedIdentities/assign/action
Microsoft.ManagedIdentity/userAssignedIdentities/delete
Microsoft.ManagedIdentity/userAssignedIdentities/read
Microsoft.ManagedIdentity/userAssignedIdentities/write
Microsoft.ManagedIdentity/userAssignedIdentities/listAssociatedResources/action
Microsoft.ManagedIdentity/identities/read
Microsoft.Network/privateDnsZones/write
Microsoft.Network/privateDnsZones/delete
Microsoft.Network/privateDnsZones/virtualNetworkLinks/write
Microsoft.Network/privateDnsZones/virtualNetworkLinks/delete
Microsoft.Network/privateLinkServices/privateEndpointConnections/write
Microsoft.Network/privateLinkServices/privateEndpointConnections/delete
Microsoft.Network/privateLinkServices/write
Microsoft.Network/privateLinkServices/delete
Microsoft.Network/privateEndpoints/privateDnsZoneGroups/write
Microsoft.Network/privateEndpoints/privateDnsZoneGroups/delete
Microsoft.Network/privateEndpoints/delete
Microsoft.Network/privateEndpoints/write
Microsoft.Network/*/read
Chapter 4
Prerequisities for
Terraform scripts
This chapter includes the following topics:
2. Once the virtual machine is created, log in into the system using SSH client.
ssh -i example.pem [email protected]
3. Ensure you have min 30 GB free space in /var folder. Use the below command
to verify:
~$ df -h
d. Install the Docker files using the next two commands one by one.
apt update
b. Download and install Terraform repository .Ensure that the below command
is to be pasted as single shell.
echo deb
[signed-by=/etc/apt/keyrings/hashicorp-archive-keyring.gpg]
https://apt.releases.hashicorp.com $(lsb_release -cs) main | tee
/etc/apt/sources.list.d/hashicorp.list
7 Copy over the Veritas binary file bundle and Terraform script bundle. This is a
large file which may take sometime.
8 Unzip the file downloaded on the location : /var/terraform folder.
■ 2. To install the Terraform on RHEL, use the command: sudo dnf install -y
dnf-plugins-core
2. Addons stage
■ Installs Cert Manager
■ Installs Trust Manager
3. Deployment stage
■ Loads the Cloud Scale container images to local repository.
■ Tag and push the container images and Helm chart to ACR.
■ Deploys Veritas Cloud Scale Technology using Helm chart.
Note: Refer the sample.tfvars file which is placed in the base directory which
has a format for passing the input parameters. Ensure you follow the parameter
order.
Parameters Description
enable_role_base false
d_access_control_for_aks
Deploying Veritas Cloud Scale Technology using Terraform scripts 25
Stages of deploying Terraform scripts on Azure
Parameters Description
private_dns_zone_rg_name The resource group name where the private DNS zone
resides.
dns_to_vnet_link_name Name for the DNS zone virtual network link used for
Veritas Cloud Scale Technology cluster. Required if
creating a new private DNS zone.
Parameters Description
node_instance_size_media_pool The node virtual machine size of the media nodes. Use
Azure virtual machine skus.
node_instance_size_msdp_pool The node virtual machine size of the msdp nodes. Use
Azure virtual machine skus.
Deploying Veritas Cloud Scale Technology using Terraform scripts 27
Stages of deploying Terraform scripts on Azure
Parameters Description
node_instance_size_cpdata_pool The node virtual machine size of the cpdata nodes. Use
Azure virtual machine skus.
Parameters Description
private_dns_zone_name The name of the private DNS Zone resource used for
cloud scale. Needs to be a unique name in the Azure
Subscription. This is not required in case of Hybrid DNS
environment.
DBaaS configuration.
The db_* variables are not required while using internal database (db_create = false)
Parameters Description
Refer to the section Configuring permissions on Microsoft Azure from the guide
NetBackup™ Snapshot Manager Install and Upgrade Guide to get more details
about permissions for the listed features and add new permissions in case you want
to use features which are not listed here.
Parameters Description
Parameters Description
storage_server_kms_key_group Provide the name of KMS Key Group for storage server.
The storage_server_kms_key_group must be of
1-64 characters long with at least one lowercase
alphabet, other characters include alphanumeric
characters and hyphens.
storage_server_kms_ Provide the KMS key name for storage server. The
key_secret_name storage_server_kms_key_secret_name must be
of 1-32 characters long, must contain only lowercase
alphanumeric characters, hyphens or underscores.
storage_server_kms_ Provide the KMS key password for storage server. The
key_secret_password storage_server_kms_key_secret_password
must be at least 12 characters long and must have at
least a number, a lower case, an upper case and a
special character (@$%!*?&.).
Parameters Description
primary_server_log_size_in_gi Provide the size for primary server log volume. It must
be at least 30 Gi.
primary_server_data_size_in_gi Provide the size for primary server data volume. It must
be at least 30 Gi.
media_server_log_size_in_gi Provide the size for media server log volume. It must
be at least 30 Gi.
media_server_data_size_in_gi Provide the size for media server data volume. It must
be at least 50 Gi.
storage_server_log_size_in_gi Provide the size for storage server log volume. It must
be at least 5 Gi.
storage_server_data_size_in_gi Provide the size for storage server data volume. It must
be at least 5 Gi.
Parameters Description
snapshot_manager_vx_http_proxy Provide the value to be used as the HTTP proxy for all
connections for snapshot manager. This is optional
field.
"smtp=smtpServerName:port\\
,ssl-verify=ignore\\,smtp-use-starttls"
For example:
primary_server_timezone="/usr/share/zoneinfo/Asia/Kolkata"
Deploying Veritas Cloud Scale Technology using Terraform scripts 35
Installation instructions for deploying the Veritas Cloud Scale Technology on Azure
Note: Terraform stores the state about your managed infrastructure and
configuration. This state is used by Terraform to map real world resources to your
configuration, keep track of metadata, and improve performance for large
infrastructures. This state is stored by default in a local file named
terraform.tfstate in 3 respective directories. Terraform uses state to determine
what changes to make to your infrastructure. Hence, the terraform.tfstate is
very crucial and we recommend taking backup of whole terraform source code
along with terraform.tfstate files by creating zip file and uploading it into the
storage account after completing the deployment successfully.
Before proceeding to execute the scripts, you need to execute the PreFlight checker
script twice. To know about the PreFlight checker, refer to the section See “About
PreFlight checker (checklist) script” on page 22.
Deploying Veritas Cloud Scale Technology using Terraform scripts 36
Installation instructions for deploying the Veritas Cloud Scale Technology on Azure
■ Create a new .tfvars based on the sample .tfvars with the appropriate
values and execute the commands below:
terraform init
terraform plan -var-file <vars-file>.tfvars
terraform apply -var-file <vars-file>.tfvars
4 Again execute the PreFlight script after the Addons step using the command:
./cloudscale-preflight-check.sh -p azure -t postInfra
You will have to provide the Base input .tfvars file and Deployment input .tfvars
file path for validation. Before running the postInfra script you will have to
modfiy the of deployment.tfvars file.
5 Execute the Deployment steps given in the next procedure.
■ Change the directory using the command:
cd azure/deployment
■ Create new .tfvars file based on the sample .tfvars with the appropriate
values.
■ terraform init
6 Execute the steps mentioned in the section See “Change the PostgreSQL
database server password” on page 37.. Terraform stores input values in the
state file and to improve the security reset the db password after deployment.
Note: When setting the PostgreSQL password in DBaaS, ensure that the password
does not contain the following special characters: equal (=), double quote ("), single
quote ('), percentage (%), at sign (@), ampersand (&), question mark (?), underscore
(_), and hash (#)
3 From the Azure CLI pod, log in into the Azure account:
$ az login --scope https://graph.microsoft.com//.default
4 (Optional step) Create a Key Vault policy to allow the current user to retrieve
the database credential. Keep a note of your resource group, key vault, and
ID of the current user by using the following respective commands:
■ Resource group name:
$ RESOURCE_GROUP=<resource_group_name>
Note: You also have an option to reset the flexible server password using the
command. az postgres flexible-server update -g $RESOURCE_GROUP
-n $DBSERVER --admin-password <password> This command can be run
outside of the Azure CLI (az-cli) container.
Deploying Veritas Cloud Scale Technology using Terraform scripts 39
Installation instructions for deploying the Veritas Cloud Scale Technology on Azure
+---------------------------+-----------+
| rolename | authtype |
|---------------------------+-----------|
| azuresu | NOLOGIN |
| pg_database_owner | NOLOGIN |
| pg_read_all_data | NOLOGIN |
| pg_write_all_data | NOLOGIN |
| pg_monitor | NOLOGIN |
| pg_read_all_settings | NOLOGIN |
| pg_read_all_stats | NOLOGIN |
| pg_stat_scan_tables | NOLOGIN |
| pg_read_server_files | NOLOGIN |
| pg_write_server_files | NOLOGIN |
| pg_execute_server_program | NOLOGIN |
| pg_signal_backend | NOLOGIN |
| azure_pg_admin | NOLOGIN |
| replication | NOLOGIN |
| nbdbadmin | SCRAM-256 |
+---------------------------+-----------+
SELECT 15
Time: 0.009s
10 To store the updated password in the key vault using the command:
$ az keyvault secret set --vault-name $KEY_VAULT_NAME --name
dbadminpassword --value "<new_password>"
11 (Optional step) To delete the Key Vault access policy that is created in step 4:
$ az keyvault delete-policy -n $KEYVAULT --upn $USER_ID
14 To restart the primary pod using the command Applicable only for an existing
Veritas Cloud Scale deployment:
$ kubectl rollout restart "statefulset/${PRIMARY}" --namespace
"${NAMESPACE}"
In the command:
■ NAMESPACE is the namespace containing your NetBackup deployment.
■ PRIMARY is the name of the primary pod's stateful set.
To obtain the NAMESPACE and PRIMARY, use the command:
$ kubectl get --namespace "${NAMESPACE}" primaryserver -o
jsonpath='{.items[0].status.attributes.resourceName}'
For resetting the password for a containerized PostgreSQL database, refer to the
section Changing database server password in DBaaS from the guide.
NetBackup™ Deployment Guide for Kubernetes Clusters
Chapter 6
Accessing the Veritas
Cloud Scale environment
This chapter includes the following topics:
After executing the above command, you will get list of namespaces created.
You can also view by navigating through UI under Kubernetes resources.
2. To view the Veritas Cloud Scale Technology deployment environment, execute
the below command and refer the table for output:
kubectl get --namespace netbackup
all,environments,primaryservers,mediaservers,msdpscaleouts,cpservers
3. Output:
Running 0 11m
pod/dedupe1-uss-agent-6jnff 1/1
Running 0 11m
pod/dedupe1-uss-agent-bbsmn 1/1
Running 0 11m
pod/dedupe1-uss-agent-lrktl 1/1
Running 0 11m
pod/dedupe1-uss-controller-0 1/1
Running 0 11m
pod/dedupe1-uss-mds-1 1/1
Running 0 12m
pod/flexsnap-agent-59fb7f957b-5t5vj 1/1
Running 0 2m20s
pod/flexsnap-api-gateway-7b89c8957d-vlj5j 1/1
Running 0 2m21s
pod/flexsnap-certauth-65944c6797-vvspm 1/1
Running 0 3m45s
pod/flexsnap-coordinator-84ccfd95c5-59ztr 1/1
Running 0 2m20s
pod/flexsnap-fluentd-9b22l 1/1
Running 0 3m8s
pod/flexsnap-fluentd-collector-85fbc6677b-k2b56 1/1
Running 0 3m7s
pod/flexsnap-fluentd-rqqkd 1/1
Running 0 3m8s
pod/flexsnap-listener-8654fb56d9-4ltrs 1/1
Running 0 2m18s
pod/flexsnap-nginx-787878dfb6-j6m6r 1/1
Running 2 2m21s
pod/flexsnap-notification-548bf5fdb6-tdwm6 1/1
Running 0 2m19s
pod/flexsnap-rabbitmq-0 1/1
Running 0 2m57s
pod/flexsnap-scheduler-578d4646fd-z8fcv 1/1
Running 0 2m19s
pod/flexsnap-workflow-general-1709012159-12c95675-tpnqw 1/1
Running 0 78s
pod/media1-media-0 1/1
Running 0 6m58s
pod/nb-postgresql-0 1/1
Running 0 39m
pod/nucleus-env-primary-0 1/1
Running 0 34m
Accessing the Veritas Cloud Scale environment 43
Accessing the Veritas Cloud Scale Technology environment after deployment
NAME
COMPLETIONS DURATION AGE
job.batch/flexsnap-workflow-general-1709012159-12c95675 0/1
79s 79s
■ Troubleshooting issues
■ Cleanup steps
Troubleshooting issues
The following table lists some of the issues that you may come across while
deploying Terraform on Azure.
2 The Terraform supports the Resolution: The Podman does not support
podman-based Veritas Cloud Scale engineering binary installation as the nbbuilder
Technology deployments which will script supports only docker installation.
not support the docker implemented
nbbuilder script for engineering binary
installations.
3 Even after executing the destroy If you want to delete the entire infrastructure,
command, execute the manual steps using the Azure Portal:
provided in the resolution if there are
■ Delete resource group
any folders that are not removed from
the en4vironment. For the clean deployment next time, ensure
that you have also deleted the following:
■ .tfstate
■ .tfstate.backup
■ .terraform.lock.hcl file
■ terraform folder from base, addons, and
deployment
4 Error: Azure API returned the Resolution: Retry the base deployment.
following
Cleanup steps
These steps are to be followed if you wish to cleanup the resource which are created
during the deployment including infrastructure and product deployment.
Terraform destroy command can be used destroy the resources created during
the deployment. The destroy operation is perform in reverse order from that of
creation. It is used instead of deleting the assets individually.
Note: Before executing the terraform destroy command, execute the following
command:
"TOKEN=$(az acr login --name acr_name --expose-token --output tsv
--query accessToken);helm registry login acr_name --username
00000000-0000-0000-0000-000000000000 --password $TOKEN""
Note: It may happen that even after executing the destroy command, the
environment is not cleaned. Execute the manual steps to cleanup the remains.
Refer to the pt.3 from theSee “Troubleshooting issues” on page 44.
■ 2. Addons
cd azure/addons
terraform destroy
■ 3. Base
cd azure/base
terraform destroy -var-file <vars-file>.tfvars
■ 4. destroy deployment
■ 5. Execute following commands:
kubectl delete pvc --all -n netbackup
kubectl delete pvc --all -n netbackup-operator-system
kubectl delete pv --all
■ 6. destroy addons