NetScaler Management and Analytics Systems (MAS) 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 MAS 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 MAS provide an added option to the existing method of assigning NetScaler instances based on tenants.
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 MAS 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 MAS 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:
The following are examples that show some of the expressions that uses pool properties to define an expression for the policy:
1. Pool Name based policy expression
2. Pool Subnet Name based policy expression
config ["pools"]["subnet_name"] == "us-west-payment-subnet1"
3. Load Balancer Subnet Name based policy expression
config["loadbalancers"]["subnet_name"] == "mas-subnet"
- From the NetScaler MAS 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.
3. Click OK.
4. Navigate to Orchestration > Cloud Orchestration > OpenStack > Service Packages, and then click Add.
5. On the Service Package page, set the following parameters:
a. Name - type a name for the service package
b. 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.
c. 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.
d. 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.
6. Click Continue.
7. In Assign Devices section, add the available NetScaler devices to the configured devices list.
8. Click Continue.
9. 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 MAS assigns NetScaler instances based on tenants. If the tenant is not part of any service package, the NetScaler MAS displays an error message that says: "Tenant <admin> is not part of any Service Package and there is no default Service Package."
10. Click Continue, and then click Done.