Flexible policy-based device allotment
NetScaler Console assigns NetScaler virtual instances to tenants, based on the SLAs agreed with the tenants. The assignment of virtual instances to tenants creates a one-to-one relation between the instance and the tenant, where a tenant can be assigned to only one service package in the data center.
In some situations, tenants might require more than one instance, or the assignment of instances might not be based on tenants as a criterion, but on other factors such as network ID, or application. In such cases, NetScaler Console allows you to precisely define placement policies based on user-defined expressions in order to assign a load balancer configuration to one of the managed instances.
Placement policies provide the flexibility to decide on the NetScaler instance that is used in each load balancer configuration created by users. Flexible placement policies in NetScaler Console provide an added option to the existing method of assigning NetScaler instances based on tenants.
Note
You can assign instances to tenants manually or use placement policies to assign instances based on the expressions created. You cannot use both these methods simultaneously on a single service package.
Placement policies are based on Boolean expressions defined over properties of the main LBaaS configuration objects, such as pools and load balancers. The placement policy user interface in NetScaler Console provides pre-defined expressions that you can choose from, to define a customized policy. You can create multiple placement policies for different expressions. So, each tenant can have multiple devices that are defined by the tenant’s requirement.
You have to first select an expression to match a root object that has to be configured later. The root object can be a pool object in case of LBaaS V1, and a load balancer object in case of LBaaS V2. So, the NetScaler Console policy based placements are supported for both LBaaS V1 and V2 APIs. These placement policies are then associated with service packages. Once the root object is placed in an instance, the successive objects in the model are added in the instance.
For example, the pool configuration object can have the following properties:
-
tenant_id
-
name
-
description
-
protocol
-
lb_method
-
subnet_id
-
subname_name
-
admin_state_up
-
status
-
network_id
-
network_type
-
segmentation_id
-
subnet_cidr
-
subnet_gateway_ip
The following are examples that show some of the expressions that uses pool properties to define an expression for the policy:
-
Pool Name based policy expression
config["pools"]["name"] =="high-end-pool" <!--NeedCopy-->
-
Pool Subnet Name based policy expression
config ["pools"]["subnet_name"] == "us-west-payment-subnet1" <!--NeedCopy-->
-
Load Balancer Subnet Name based policy expression
config["loadbalancers"]["subnet_name"] == "mas-subnet" <!--NeedCopy-->
Adding Placement Policy
-
From the NetScaler Console home page, navigate to Orchestration > Cloud Orchestration > Placement Policy, and then click Add.
-
On the Add Placement Policy page, set the following parameters:
-
Name - type a name for the placement policy
-
Frequently Used Expressions - select an expression from the drop-down list.
-
Expression - a logical (Boolean) expression is populated in this field based on the expression you have selected in the earlier field. Edit the field names as required.
Note
When creating multiple policies, make sure that the policies are exclusive to one another.
-
-
Click OK.
-
Navigate to Orchestration > Cloud Orchestration > OpenStack > Service Packages, and then click Add.
-
On the Service Package page, set the following parameters:
-
Name - type a name for the service package
-
Isolation Policy - select Shared policy
In shared isolation policy, the load balancer configuration of a tenant coexists with the load balancer configuration of other tenants in the device allocated to the tenant.
-
Device Type - select a preprovisioned NetScaler VPX or NetScaler MPX
Select Allot one device if you want all the load balancer configurations of a tenant to be tied to one device. Select Allot many devices if you want each load balancer configurations of a tenant to be distributed on several devices based on placement policies.
Note
NetScaler SDX has to be added in the service packages as NetScaler VPX instances only, as a NetScaler SDX has a NetScaler VPX provisioned on it.
-
Placement Method - select Least Configured
When Least Configured is selected, the NetScaler instance that has the least number of pool members configured at that point in time is chosen as the device for the tenant.
-
-
Click Continue.
-
In Assign Devices section, add the available NetScaler devices to the configured devices list.
-
Click Continue.
-
In Assign Placement Policies/OpenStack Tenants section, add the placement policy that you created earlier.
Note
If the policy is not found, the fallback mechanism is revived, and the NetScaler Console assigns NetScaler instances based on tenants. If the tenant is not part of any service package, the NetScaler Console displays an error message that says:
“Tenant
admin
is not part of any Service Package and there is no default Service Package”. -
Click Continue, and then click Done.