Configuration

NetScaler Console manages all the NetScaler VPX clusters in Google Cloud. NetScaler Console accesses the Google Cloud resources using the Cloud Access Profile.

The following flow diagram explains the steps involved in creating and configuring an Autoscale group:

Autoscale NetScaler instances workflow

Prerequisites

This section describes the prerequisites that you must complete in Google Cloud and NetScaler Console before you Autoscale NetScaler VPX instances.

This document assumes you possess a Google Cloud account. For more information on how to create an account, see Google Cloud Documentation.

Set up Google Cloud components

Before provisioning NetScaler VPX instances in NetScaler Console, do the following tasks in Google Cloud:

  1. Enable APIs
  2. Create a Service Account
  3. Create a VPC network
  4. Create a firewall

Enable APIs

NetScaler Console requires programmatic access to deploy and provision the required resources in Google Cloud. So, enable the following APIs on your Google Cloud project:

For more information about how to enable APIs in Google Cloud, see Enabling APIs.

Create a Service Account

The NetScaler Console uses a Service Account to access your Google Cloud resources. Do the following to create a service account:

  1. Log in to your Google Cloud account.

  2. Go to IAM & Admin > Service Accounts.

  3. Click +CREATE SERVICE ACCOUNT.

    Create two service accounts, one service account is used for NetScaler Console. And, another is used for NetScaler instances. Do the following steps to create a service account.

    1. Specify the name, ID, and description and click Create.

    2. Assign the following predefined roles:

      • IAM roles required for NetScaler Console

         roles/iam.serviceAccountUser
         roles/compute.instanceAdmin.v1
         roles/compute.networkAdmin
         roles/dns.admin
         <!--NeedCopy-->
        
      • IAM roles required for the NetScaler instances that are created by NetScaler Console:

         roles/compute.instanceAdmin.v1
         roles/compute.networkAdmin
         <!--NeedCopy-->
        

      These roles allow your service account to access Google Cloud resources.

    3. Click Done.

After you create a service account, add a key to it.

  1. Select the service account to which you want to add a key.

  2. Select Add key > Create new key.

  3. Select JSON key type and click Create.

Create a VPC network

Create three subnets in your VPC network - one each for the management, client, and server connections. Select the custom option to create a subnet. Specify an address range for each of the subnets. Specify the region in which you want the subnet to reside.

  • Management: A subnet in your management VPC Network dedicated for management. NetScaler has to contact Google Cloud services and requires internet access.

  • Client: A subnet in your client VPC network dedicated for the client side. Typically, NetScaler receives client traffic for the application via a public subnet from the internet.

  • Server: A subnet where the application servers are provisioned. All your application servers are present in this subnet and receives application traffic from the NetScaler through this subnet. For more information on how to create a subnet in Google Cloud, see VPC network overview.

Create a firewall

The firewall has rules that control the inbound and outbound traffic in the NetScaler VPX instance. You can add as many rules as you want. To Autoscale NetScaler instances, you must create three firewalls:

  • Management: A firewall is dedicated for the management of NetScaler VPX. NetScaler has to contact Google Cloud services and requires internet access. Inbound rules are allowed on the following TCP and UDP ports.

    • TCP: 80, 22, 443, 3008–3011, 4001
    • UDP: 67, 123, 161, 500, 3003, 4500, 7000, 27000, 7279

    Configure Cloud NAT to allow internet access from this subnet. For more information, see Using Cloud NAT.

    Note

    Ensure that the firewall allows the agent to access the VPX.

  • Client: A firewall is dedicated for client-side communication of NetScaler VPX instances. Typically, inbound rules are allowed on the TCP ports 80 and 443. And, the 60000 port is required to monitor the health of NetScaler instances.

  • Server: A firewall is dedicated for server-side communication of NetScaler VPX. For more information on how to create a firewall in Google Cloud, see VPC firewall rules overview.

Set up NetScaler Console components

Before provisioning NetScaler VPX instances in NetScaler Console, do the following tasks in NetScaler Console:

  1. Create a site.

  2. Provision NetScaler agent on Google Cloud.

  3. Attach the site to a NetScaler agent.

Create a site

Create a site in NetScaler Console and add the client VPC details associated with your Google Cloud.

  1. In NetScaler Console, navigate to Infrastructure > Sites.

  2. Click Add.

  3. In the Select Cloud pane,

    1. Select Data Center as a Site type.

    2. Choose Google Cloud from the Type list.

    3. Check the Fetch regions from the Google Cloud check box.

      This option helps you to retrieve the existing regions information from your Google Cloud account.

    4. Click Next.

  4. In the Choose Region pane,

    1. In Cloud Access Profile, select the profile created for your Google Cloud account. If there are no profiles, create a profile.

    2. To create a cloud access profile, click Add.

    3. In Name, specify a name to identify your Google Cloud account in NetScaler Console.

    4. In Key of the Service Account, specify the Service Account JSON created in Google Cloud.

      Access the Google Cloud account from NetScaler Console

    5. Click Create.

      For more information, see Create a Service Account.

    6. In Regions, select the region that contains the VPC network containing NetScaler VPX instances that you want to manage.

    7. Specify a Site Name.

    8. Click Finish.

Provision NetScaler agent on Google Cloud

The agent works as an intermediary between the NetScaler Console and the discovered instances in the data center or on the cloud.

  1. Navigate to Infrastructure > Instances > Agents.

  2. Click Provision.

  3. Select Google Cloud and click Next.

  4. In the Provision Parameters tab, specify the following:

    • Name - specify the agent name.

    • Site - select the site you have created to provision an agent and NetScaler VPX instances.

    • Cloud Access Profile - select the cloud access profile from the list.

    • Zones - Select the zones in which you want to create the Autoscale groups. Depending on the cloud access profile that you have selected, the zones of that profile are populated.

    • Network- Select the VPC network where you want to create Autoscale groups.

    • Subnet - Select the management subnet to provision an agent.

    • Labels - Type the key-value pair for the Autoscale group labels. A tag consists of a case-sensitive key-value pair. These labels enable you to organize and identify the Autoscale groups easily. The labels are applied to both Google Cloud and NetScaler Console.

  5. Click Finish.

Alternatively, you can install the agent from Google Cloud. For more information, see Installing a NetScaler agent on the Google Cloud.

Attach the site to a NetScaler agent

  1. In NetScaler Console, navigate to Infrastructure > Instances > Agents.

  2. Select the agent for which you want to attach a site.

  3. Click Attach Site.

  4. Select the site from the list that you want to attach.

  5. Click Save.

Step 1 - Initialize Autoscale configuration in NetScaler Console

  1. In NetScaler Console, navigate to Infrastructure > Public Cloud > Autoscale Groups.

  2. Click Add to create Autoscale groups.

    The Create AutoScale Group page appears.

  3. Select Google Cloud and click Next.

  4. In Basic Parameters, enter the following details:

    • Name: Type a name for the Autoscale group.

    • Site: Select the site that you have created to Autoscale the NetScaler VPX instances on Google Cloud. If you have not created a site, click Add to create a site.

    • Cloud Access Profile: Select the cloud access profile. You can also add or edit a Cloud Access Profile.

    • NetScaler Profile: Select the NetScaler profile from the list. NetScaler Console uses the device profile when it requires to log on to the NetScaler VPX instance.

    • Traffic Distribution Mode: Google Cloud supports only one traffic distribution, the Load Balancing using Google Network Load Balancer.

    • Enable AutoScale Group: Enable or disable the status of the ASG groups. This option is enabled, by default. If this option is disabled, autoscaling is not triggered.

    • Zone: Select the regions in which you want to create the Autoscale groups. Depending on the cloud access profile that you have selected, regions appear on the list.

    • Labels: Type the key-value pair for the Autoscale group labels. A tag consists of a case-sensitive key-value pair. These labels enable you to organize and identify the Autoscale groups easily. The labels are applied to both Google Cloud and NetScaler Console.

    Basic parameters Autoscale Google Cloud

  5. Click Next.

Step 2: Configure Autoscale parameters

In the AutoScale Parameters tab, enter the following details:

  1. Select one or more than one of the following threshold parameters whose values must be monitored to trigger a scale-out or a scale-in.

    • Enable CPU Usage Threshold: Monitor the metrics based on the CPU usage.

    • Enable Memory Usage Threshold: Monitor the metrics based on the memory usage.

    • Enable Throughput Threshold: Monitor the metrics based on the throughput.

      Note

      • Default minimum threshold limit is 30 and the maximum threshold limit is 70. However, you change to modify the limits.

      • Minimum threshold limit must be equal or less than half of the maximum threshold limit.

      • You can select more than one threshold parameters for monitoring. Scale-out is triggered if at least one of the threshold parameters is above the maximum threshold. However, a scale-in is triggered only if all the threshold parameters are operating below their normal thresholds.

    • Minimum Instances: Select the minimum number of instances that must be provisioned for this Autoscale group.

      The default minimum number of instances is equal to the number of zones selected. You can only increment the minimum instances in the multiples of the specified number of zones.

      For example, if the number of zones is 4, the minimum instances are 4 by default. You can increase the minimum instances by 8, 12, 16.

    • Maximum Instances: Select the maximum number of instances that must be provisioned for this Autoscale group.

      The maximum number of instances must be greater than or equal to the value of the minimum instances. The maximum number of instances cannot exceed the number of zones multiplied by 32.

      Maximum number of instances = number of zones * 32

    • Watch-Time (minutes): Select the watch-time duration. The time for which the scale parameter’s threshold has to stay breached for scaling to happen. If the threshold is breached on all the samples collected in this specified time then a scaling happens.

    • Cooldown period (minutes): Select the cooldown period. During scale-out, the cooldown period is the time for which evaluation of the statistics has to be stopped after a scale-out occurs. This period ensures the organic growing of instances of an Autoscale group. Before triggering the next scaling decision, it waits for the current traffic to stabilize and average out on the current set of instances.

    • Time to wait during Deprovision (minutes): Select the drain connection timeout period. During scale-in action, an instance is identified to de-provision. NetScaler Console restricts the identified instance from processing new connections until the specified time expires before de-provision. In this period, it allows existing connections to this instance to be drained out before it gets de-provisioned.

  2. Click Next.

Step 3 - Configure licenses

NetScaler Console provisions the NetScaler instances with the desired version & license. NetScaler images can either be customer licensed (BYOL) or licensed from Google Cloud.

Select one of the following modes to apply license to a NetScaler instance:

  • Allocate from NetScaler Console: The instance that you want to provision checks out the licenses from the NetScaler Console.

  • Allocate from Google Cloud: The Allocate from Cloud option uses the NetScaler product licenses available in Google Cloud. The instance that you want to provision uses the licenses from the Google Cloud.

    If you choose to use licenses from Google Cloud, specify the product or license in the Provision Parameters tab.

For more information, see Licensing Requirements.

Allocate licenses from NetScaler Console

  1. In the License tab, select Allocate from NetScaler Console.

  2. In License Type, select one of the following options from the list:

    • Bandwidth Licenses: You can select one of the following options from the Bandwidth License Types list:

      • Pooled Capacity: Specify the capacity to allocate to an instance.

        From the common pool, the NetScaler instance checks out one instance license and only as much bandwidth is specified.

      • VPX Licenses: When a NetScaler VPX instance is provisioned, the instance checks out the license from the NetScaler Console.

    • Virtual CPU Licenses: The provisioned NetScaler VPX instance checks out licenses depending on the number of CPUs running in the instance.

    Note

    When the provisioned instances are removed or destroyed, the applied licenses return to the NetScaler Console license pool. These licenses can be reused to provision new instances.

  3. In License Edition, select the license edition. The NetScaler Console uses the specified edition to provision instances.

  4. Click Next.

Step 4: Configure provision parameters

  1. In the Provision Parameters tab, specify the following:

    • NetScaler Service Account: Select the service account that you have created in Google Cloud. The NetScaler Console uses a Service Account to access your Google Cloud resources.

    • Machine types: Select the required machine type from the list.

    • Image: Select the required NetScaler version image. Click Add New to add a NetScaler image.

    • Origin Server CIDR: When application servers and NetScaler instances are situated on different VPC Networks and Subnets, provide the CIDR block of a subnet where you have application servers.

      Important

      Set up VPC network peering and configure firewall rules in the following:

      • NetScaler instance’s VPC network to connect to the application server’s VPC network.
      • Application server’s VPC network to receive connection from NetScaler instance’s VPC network.

      For more information, see VPC Network Peering overview.

    • Configuration Template – Select the configuration template that you want to use to deploy on the NetScaler instances.

    • IPs in Server Subnet per instance – Specify how many SNIP addresses each instance can have in the server subnet.

    Provision parameters for NetScaler instance

    In this tab, you can also specify and configure the required NICs. Each NIC contains a dedicated firewall and subnet.

    For more information, see Create a VPC network and Create a firewall.

    NICs for a NetScaler instance

  2. Click Finish.

Step 5: Configure an application for the Autoscale group

  1. In NetScaler Console, navigate to Infrastructure > Public Cloud > Autoscale groups.

  2. Select the Autoscale group that you created and click Configure.

  3. In Configure Application, specify the following details:

    • Application Name - Specify the name of an application.

    • Access Type - You can use the NetScaler Console autoscaling solution to both external and internal applications. Select the required application access type.

    • FQDN Type - Select a mode of assigning domain and zone names.

      If you want to specify manually, select User-Defined. To automatically assign domain and zone names, select Auto-generated.

    • Domain Name - Specify the domain name of an application. This option is applicable only when you select User-Defined FQDN type.

    • Zone of the Domain - Select the zone name of an application from the list. This option is applicable only when you select User-Defined FQDN type.

      This domain and zone name redirects to the virtual servers in Google Cloud. For example, if you host an application in app.example.com, the app is the domain name and example.com is the zone name.

    • Protocol - Select the protocol type from the list. The configured application receives the traffic depending on the selected protocol type.

    • Port - Specify the port value. The specified port is used to establish a communication between the application and the Autoscale group.

    • Auto Redirect HTTP traffic to HTTPS - Select this option to receive secured traffic to the application. Specify the HTTP port that you want to redirect.

    • NetScaler Configuration mode - Select the mode how you want to configure the application. You can either select StyleBooks or NetScaler CLI commands.

    Configure ASG applications

Note

Change the access type of an application if you want to modify the following details in the future:

  • FQDN Type
  • Domain Name
  • Zone of the domain

For more information to use StyleBooks or CLI commands, see Create an application configuration for the Autoscale group.

Configuration