Oracle® Enterprise Manager Cloud Administration Guide 12c Release 2 (12.1.0.2) Part Number E28814-03 |
|
|
PDF · Mobi · ePub |
This chapter describes the process to define policies for virtualization targets. It contains the following sections:
Cloud management policies are rules that a CLOUD_ADMINISTRATOR
can define to take certain actions based on either performance metric threshholds or based on a schedule. You can create your own policies or use the ready-to-use policies. The ready-to-use policies provided by Oracle cannot be edited but you can do a create like cloning of the policy and then edit it as required.
There are two kinds of cloud management polices: Performance-based policies and Schedule-based policies. Performance policies are based on the performance metrics of a specific type of target. Schedule based policies are executed based on the schedule you have defined. You can group one or more policies together to form policy groups. You can:
View and Monitor Cloud Policies
Define a new policy which can be of the following types:
Performance Policy
Schedule Based Policy
Activate or Deactivate a Policy
Define Policy Groups
You can view all the cloud policies from the Cloud Policy Home page. You can view details like the status of the policy, type of policy, action type, policy associations and the schedule.
From the Enterprise menu, select Cloud, then select Infrastructure Policies.
On the Policy Home page, you will see a list of a policies that you own and for which you have administration privileges.
Select a policy from the table. The policy details like the type, associations, and status are listed.
You can view the associations for a selected policy. A policy can be associated with one or more targets. Click Add Association to associate a target with the policy. You can:
Click a target in the Associations region to drill down to the policies page for the target.
Click View History to view the history of policy associations for this target.
You can view the policies associated with a target on this page. You can associate or disassociate policies with a target.
Click Associate to associate it with the target.
Select a policy from the list and click Disassociate to delete the policy association.
The History section shows the history of the policy associations performed on this target.
The following details are displayed:
Name and description of the policy.
The type of policy which can be Schedule or Performance.
The policy association method. A policy can be associated with a standalone association, template collection, a policy group or a combination of the three.
The General section displays details like status of the policy, the number of associations, the date on which the policy was created, and the type of policy.
The History section shows the history of associations for this target.
Performance policies are formed based on the performance metrics of a specific target type and its associated targets. You can create conditions and rules for the policy based on the metrics.
Prerequisites
User has administrator privileges.
To define a performance policy, follow these steps:
From the Enterprise menu, select Cloud, then select Infrastructure Policies.
On the Policy Home page, you will see a list of a policies that you own and for which you have administration privileges.
Click New Policy and select the Performance Policy type.
In the General Information page, enter the name and description of the policy. Select the Target Type with which the policy is to be associated.
Click Next. In the Rule page, select a metric from the left panel and click Add to Condition. Specify the condition, value, and number of occurrences. When these conditions are met, the policy is executed.
Click Next. Specify the action to be performed when the policy condition is met. The list of available actions can vary depending on the selected target type.
Review the policy and click Save to define this policy and return to the Policy Home page.
Note:
After you have defined the policy, you can associate one or more targets with the policy.Schedules based on policies are based on a predefined schedule. To define a schedule based policy, follow these steps:
From the Enterprise menu, select Cloud, then select Infrastructure Policies.
On the Policy Home page, you will see a list of a policies that you own and for which you have administration privileges. Click New Policy and select the Schedule Policy type.
In the Create Schedule Policy page, enter the name, description of the policy, and the Target Type with which the policy is to be associated.
Specify the action that is to be performed when the policy conditions are met. The list of available actions can vary depending on the target type with which the policy is associated.
Specify the frequency and the schedule for the policy.
Click Save to define this policy.
Note:
After you have defined the policy, you can associate one or more targets with the policy.If you want to shut down a guest virtual machine every Friday at 6:00 pm and restart it every Monday at 9:00 pm, you can create policies as follows:
First, create a schedule based policy where the guest virtual machine shuts down every Friday at 6:00 pm. See Policy for Shutting Down Guest Virtual Machine.
Secondly, create another schedule based policy where the guest virtual machine is restarted every Monday at 6:00. See Policy for Starting Up Guest Virtual Machine.
Combine these two policies into a Policy Group and associate these policies with one or more guest virtual machine targets. See Creating a Policy Group (Start Up and Shut Down).
To shut down a guest virtual machine every Friday, you can set up the poliicy as follows:
From the Enterprise menu, select Cloud, then select Infrastructure Policies.
In the Cloud Policies page, select Schedule Policy from the Create menu. In the Create Schedule Policy page, enter the following details:
Enter a name and description for the policy.
Select the Target Type as Oracle VM Guest.
Select Stop in the Policy Action field.
In the Start field, specify the date and time from which this policy should be effective.
In the Repeat field, select Specific Days of the Week and select Friday in the Days of Week checkbox.
Click OK to save this policy and return to the Cloud Policies page.
Click on the policy that you have created to view the details of the policy. In the Associations region, click Add.
In the Search window, select the Oracle VM Guest checkbox and click Search to view a list of guest virtual machines.
Select the virtual guest machine with which the policy should be associated and click Select.
The policy is now associated with the selected guest virtual machine and the policy conditions will be applied.
To restart a guest virtual machine every Monday, navigate to the Cloud Policy page and select the policy you just created. Perform the following steps:
Click Create Like to make a copy of the policy.
In the Cloud Policies page, select Schedule Policy from the Create menu. In the Create Schedule Policy page, enter the following details:
Enter a name and description for the policy.
Select the Target Type as Oracle VM Guest.
Select Start in the Policy Action field.
In the Start field, specify the date and time from which this policy should be effective.
In the Repeat field, select Specific Days of the Week and select Monday in the Days of Week checkbox.
Click OK to save this policy and return to the Cloud Policies page.
Click on the policy that you have created to view the details of the policy. In the Associations region, click Add.
In the Search window, select the Oracle VM Guest checkbox and click Search to view a list of guest virtual machines.
Select the virtual guest machine with which the policy should be associated and click Select. The Guest VMs you select must be the same as the ones selected in the earlier example.
The policy is now associated with the selected guest virtual machine and the policy conditions will be applied. You can click on the associated target to view details about the policy.
After defining the two policies for the guest virtual machine target type, you can combine these policies into a policy group and associate these policies to one or more targets. To create a policy group, follow these steps:
From the Enterprise menu, select Cloud, then select Infrastructure Policies.
On the Cloud Policies page, click the Policy Groups tab.
Click Create. The Cloud Policy Group page appears.
Enter a name and description for the group.
Click Add and select the two schedule policies that you have created.
Click OK to return to the Cloud Policies page and click on the Policy Group that you have created.
The details of the policy group that you have created such as the name of the policy group, number of policies associated with this group. number of targets associated, and so on are displayed.
Click the Policies Included tab in the bottom region to view the policies associated with this policy group.
Click the Associations tab to view the list of guest virtual machines associated with this policy. Click Add to associate more guest virtual machines with this policy group.
When this policy group is active, the guest virtual machines associated with the policies are shut down and started up as per the schedule.
Once a policy is defined, it becomes active and can be applied to one or more targets. You can deactivate an active policy by following these steps:
From the Enterprise menu, select Cloud, then select Infrastructure Policies.
On the Policy Home page, you will see a list of a policies that you own and have administration privileges.
Select a policy from the table and click Deactivate. The policy is deactivated and the status of the policy is marked as Inactive. You cannot associate this policy to any target until it is activated and its current associations will be suspended for further evaluations.
A policy group is a collection of policies that can be applied together and evaluated to generate a compliance score. To define a policy group, follow these steps:
From the Enterprise menu, select Cloud, then select Infrastructure Policies.
Click on the Policy Groups tab. On the Policy Groups page, you will see a list of a policies that have been defined.
Click Create. In the New Policy Group page, click Select and Add Policy to add one or more policies to the group.
A list of policies are displayed. Select one or more policies from the list and click Add.
The selected policy will be added to the policy group. Based on the schedule details defined for each policy, the policy action will be scheduled.
Click Save to save this policy group.
You can perform the following operations:
Edit Group: In the Policy Group page, select a policy group from the list and click Edit Group. The policies included in the group and the associations are displayed. You can add or delete policies and associations to the group.
Delete Group: In the Policy Group page, select a policy group from the list and click Delete Group. The policy group and its associations will be deleted.
Note:
You can edit or delete policy groups that you have created or for which you have the privileges.Suppose you want to define a policy group for an Oracle Tier Instance target where the tier instance is scaled down to 1 every Friday and scaled up to 2 every Monday based on certain metric values. You can create the following policies:
First, create a performance policy to scale down the tier instance to 1. See Policy to Scale Down a Tier Instance.
Scale up the tier instance to 2 every Monday. See Policy to Scale Up a Tier Instance.
Combine these policies and create a Policy Group. See Creating a Policy Group (Scale Up and Scale Down).
To scale down a tier instance every Friday, you can set up a performance policy as follows:
From the Enterprise menu, select Cloud, then select Infrastructure Policies.
In the Cloud Policies page, select Performance Policy from the Create menu.
In the Create Performance Policy: General page, enter a name and description for the policy and select the Target Type as Oracle Tier Instance.
Click Next. In the Create Performance Policy: Rule page, add the following metrics to the Definition table.
Physical CPU Utilization: Specify the Condition as Average of, Value greater than 90, Occurences as 5.
Total Throughput: Specify the Condition as Average of, Value greater than 75, Occurences as 3.
Select Match Any option to indicate that the policy is applicable if any of the conditions are met.
Click Next. In the Performance Policy: Action page, enter the following details:
In the Applies to Target field, select Oracle Tier Instance.
In the Action field, select Scale Down.
In the Action Parameters field, enter the Number of Nodes to be scaled down as 1.
Click Next. Review the details of the policy and click Save.
To scale up a tier instance, navigate to the Cloud Policy page and select the Performance Policy that you just created. Follow these steps:
Click Create Like to make a copy of the policy.
Modify the name and description of the policy. Click Next.
In the Performance Policy: Rule page, do the following:
Physical CPU Utilization: Specify the Condition as Average of, Value greater than 75, Occurences as 5.
Total Throughput: Specify the Condition as Average of, Value greater than 50, Occurences as 3.
Select Match Any option to indicate that the policy is applicable if any of the conditions are met.
In the Performance Policy: Action page, modify the Action to Scaleup and in the Action Parameters field, specify the Number of Nodes as 2.
Click Next. Review the policy and click Save.
After defining the two policies for the Oracle Tier Instance target type, you can combine these policies into a policy group and associate these policies to one or more targets. To create a policy group, follow these steps:
From the Enterprise menu, select Cloud, then select Infrastructure Policies.
On the Cloud Policies page, click the Policy Groups tab.
Click Create. The Cloud Policy Group page appears.
Enter a name and description for the group.
Click Add and select the two schedule policies that you have created.
Click OK to return to the Cloud Policies page and click on the Policy Group that you have created.
The details of the policy group that you have created such as the name of the policy group, number of policies associated with this group. number of targets associated, and so on are displayed.
Click the Policies Included tab in the bottom region to view the policies associated with this policy group.
Click the Associations tab to view the list of Oracle Tier Instance targets associated with this policy. Click Add to associate more Oracle Tier Instance targets with this policy group.
When this policy group is active, the Oracle Tier Instance targets are scaled down and scaled up based on the policy definition.
Apart from managing and defining policies for a zone, you can also manage Dynamic Resource Scheduling (DRS) and Distributed Power Management (DPM) policies for a virtual server pool. These automated policies improve quality of service and reduce power consumption by dynamically relocating running virtual machines within a server pool based on the load.
Dynamic Resource Scheduling (DRS) policies provide real-time monitoring of Oracle VM Server utilization to rebalance a server pool and provide consistent resources to the running virtual machines. DRS migrates VMs away from heavily loaded Oracle VM Servers to those servers with more resources available.
Distributed Power Management (DPM) policies optimize the server pool for minimum power consumption. DPM complements DRS by reducing the number of powered-on servers in the pool when there are periods of low resource utilization. It can automatically power-on capacity as needed when resource utilization ramps up.
To set up a DRS / DPM policy, follow these steps:
From the Enterprise menu, select Cloud, then select Infrastructure Home.
Right click on a VM Server Pool target in the left panel and select Manage DRS/DPM Policies. Click Configure. The Configure DRS/DPM General page appears.
Select the Policy Type. This can be:
Distributed Resource Scheduler: Select this policy type to optimize virtual machine resource utilization in a server pool.
Distributed Power Management: Select this policy type to increase the consolidation ratio to use fewer Oracle VM Servers during periods of relative low resource utilization.
Specify the Time Perid (Minutes). This is the time period for the policy job to run. This sets the policy job to run every n minutes, for example, 10 sets the policy job to run every 10 minutes. You can enter a number between 1 and 60.
Click Add in the Virtual Servers region to add one or more virtual server targets for which the policy is to be enabled.
Specify the Constraints for the Virtual Server CPU as follows:
Enable: Set this field to enable or disable logging of CPU performance and utilization.
Threshold: The maximum amount of CPU percentage usage allowed before the policy must be enacted. You can enter between 0 and 99.
Click Next. The Configure DRS/DPM Network page appears.
Select the Enable checkbox to indicate whether the policy is to be enabled on the network, and select the threshold at which the policy is to be enacted for the network.
Click Apply.
Note:
Once the policy is created, it is enabled and applicable to all the virtual server pool targets that have been included in the policy. To disable the DRS/DPM policy, create a schedule based policy for the Oracle VM Server Pool target type and in the Policy Action field, select Disable DRS/DPM policies. See Defining a Schedule Based Policy for more details on creating a schedule based policy. You can enable the policy by editing the Schedule Policy and select Enable DRS or Enable DPM as necessary.You can create automated DRS or DPM policies by following these steps:
From the Enterprise menu, select Cloud, then select Infrastructure Policies.
Click New Policy and select the Schedule Policy type.
In the Create Schedule Policy page, enter a name and description for the policy.
Select Oracle VM Server Pool as the Target Type.
Select Enable DRS or Enable DPM Policy from the Policy Action field.
Specify the schedule and frequency for the policy and click OK to save the policy.
In the Cloud Policies page, select the policy you have created and click Add in the Associations region.
Select the Oracle VM Server Pool target with which the policy is to be associated and click Select.
The DRM or DPM policy is now automatically enabled for the selected target.