Skip to content

Latest commit

 

History

History
114 lines (88 loc) · 7.32 KB

terraform-config-step-by-step.md

File metadata and controls

114 lines (88 loc) · 7.32 KB

Terraform Configuration

Before a deployment terraform.tfvars must be completed. This file contains different input variables for a deployment. In this example, we show the Anyware Manager SaaS with Load Balancer.

Note: Uncommented lines show required variables, while commented lines show optional variables with their default or sample values.

  1. Clone the repository into your Azure Cloud Shell (ACS) environment.

    • git clone https://github.com/teradici/Azure_Deployments clone repo in ACS
  2. Change directory into: Azure_Deployments/terraform-deployments/deployments/load-balancer-one-ip.

    • cd Azure_Deployments/terraform-deployments/deployments/load-balancer-one-ip change directory
  3. Save terraform.tfvars.sample as terraform.tfvars, and fill out the required variables. Use one of the following:

    • cp terraform.tfvars.sample terraform.tfvars (this will create a copy under a new name)
    • mv terraform.tfvars.sample terraform.tfvars (this will rename the file) copy tfvars file
  4. Configure the terraform.tfvarsfile.

    • Edit files inside ACS by doing: code terraform.tfvars. code terraform.tfvars
    • To include optional variables, uncomment the line by removing preceding #.
    • Make sure the locations of the connectors and work stations are identical.

    terraform.tfvars variables:

    1. workstation configuration:

      • prefix: prefix added to workstation machines. e.g.: 'tera0' will name a standard Linux VM tera0-scent-0
        • Must be a max of 5 characters to avoid name cropping. Can be left blank.
      • location: location of the workstation. westus machines will be placed in the West US region.
        • Possible values: Regions.
        • e.g. West US 2 will be inputted as westus2. Central US as centralus.
      • workstation_os: Operating system of the workstation.
        • Possible values: windows or linux
      • vm_size: Size of the virtual machine.
      • disk_type: Type of storage for the workstation.
        • Possible values: Standard_LRS, StandardSSD_LRS or Premium_LRS
      • count: Number of workstations to deploy under the specific settings.
      • isGFXHost: Determines if a Graphics Agent will be installed. Graphics agents require NV-series VMs or NCasT4_v3-series VMs. The default size in .tfvars is Standard_NV12s_v3. Additional VM sizes can be seen in the Appendix
        • Possible values: true or false
    2. cac_configuration:

      • cac_token: token obtained from Anyware Manager. This will be used when installing the Cloud Access Connector. obtaining a token
      • location: location of the CAC. Ensure this is identical to the workstations' location.
    3. resource_group_name:

      • The name of the resource group that Azure resources will be placed under. If left commented, the resource group will be called load_balancer_deployment_[random_id]
    4. prefix:

      • Prefix added to Domain Controller and CAC machines.
      • Must be a max of 5 characters to avoid name cropping.
      • e.g.: prefix of 'tera0' will name these VMS tera0-dc-vm and tera0-cac-vm-0
    5. create_debug_rdp_access:

      • Setting this to true gives users RDP access into the Domain Controller VM. This can be configured after deployment completion to allow or deny access.
    6. ad_domain_users_list_file:

      • The full path to the .csv file that contains domain users to be added to the deployment.
    7. ad_admin_username:

      • The username for the active directory administrator.
    8. active_directory_netbios_name:

      • The Active Directory NetBIOS name.
      • e.g.: 'tera' will create the domain 'tera.dns.internal'
    9. SSL configuration (optional):

    10. Azure key vault secrets (optional):

  5. (Optional) To add domain users save domain_users_list.csv.sample as domain_users_list.csv and edit this file accordingly.

    • Note: To add users successfully, passwords must have at least 3 of the following requirements:
      • 1 UPPERCASE letter
      • 1 lowercase letter
      • 1 number
      • 1 special character. e.g.: !@#$%^&*(*))_+
  6. Run terraform init to initialize a working directory containing Terraform configuration files.

  7. Run terraform apply | tee -a installer.log to display resources that will be created by Terraform.

    • | tee -a installer.log stores a local log of the script output which can be referred to later to help diagnose any problems. terraform apply prompt
  8. Answer yes to start provisioning the load balancer infrastructure.

    • To skip this extra step, you may also provide the additional option using the command terraform apply --auto-approve.
  9. After completion, click here and start at section 7 for instructions to add workstations in the Anyware Manager admin console.

A typical deployment should take around 30-40 minutes. Upon a successful deployment, the output will display information such as important IP addresses and names. At the end of the deployment, the resources may still take a few minutes to start up completely. It takes a few minutes for a connector to sync with Anyware Manager so Health statuses may temporarily show as Unhealthy.

Completed deployment output:

completed deployment

Directory structure

deployments/

The top level terraform scripts that create specific deployments.

docs/

Description and instructions for different deployments and architectures.

modules/

The building blocks of deployments, e.g. a Domain Controller, an Anyware Connector, a Workstation, etc.

tools/

Various scripts to help with Terraform deployments. e.g. a Python script to generate random users for an Active Directory in a CSV file.

Maintainer

If any security issues or bugs are found, or if there are feature requests, please contact support at support@teradici.com

Appendix

Current VM sizes supported by PCoIP Graphics Agents