6 Defining and Managing Cloud Policies
It contains the following sections:
About Cloud Policies
Cloud management policies are rules that a EM_CLOUD_ADMINISTRATOR
can define to take certain actions based on either performance metric thresholds 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.
Note:
A self service user (EM_SSA_USER
) can also create cloud policies for the services for which he has been granted access..
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 perform the following:
-
Define a new policy which can be of the following types:
Defining a Performance Policy
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.
To define a performance policy, follow these steps:
Defining a Schedule-Based Policy
Schedules based on policies are based on a predefined schedule. To define a schedule-based policy, follow these steps:
Activating and Deactivating Policies
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:
- Depending on your user role, use the menu options to navigate to the Infrastructure Policies page.
- 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.
Once a policy is deactivated, it is marked as Inactive. To activate an Inactive Policy, select the policy from the table and click Activate. In the confirmation window, click Activate again. The policy is now marked as Active.
Creating a Policy Group
To define a policy group, follow these steps:
Example 1
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 Creating a 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 Creating a 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).
Creating a Policy for Shutting Down Guest Virtual Machine
To shut down a guest virtual machine every Friday, you can set up the policy as follows:
Creating a Policy for Starting Up Guest Virtual Machine
To start a guest virtual machine every Monday, navigate to the Cloud Policy page and select the policy you just created. Perform the following steps:
Creating a Policy Group (Start Up and Shut Down)
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:
- Depending on your user role, use the menu options to navigate to the Infrastructure Policies page.
- 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.
Example 2
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. You can create the following policies:
-
First, create a Schedule Policy to scale down the tier instance to 1. See Creating a Policy to Scale Down a Tier Instance.
-
Next, create another policy to scale up the tier instance to 2 every Monday. See Creating a 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).
Creating a Policy to Scale Down a Tier Instance
To scale down a tier instance every Friday, you can set up a performance policy as follows:
Creating a Policy to Scale Up a Tier Instance
To scale down a tier instance every Friday, you can set up a performance policy as follows:
Creating a Policy Group (Scale Up and Scale Down)
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:
- Depending on your user role, use the menu options to navigate to the Infrastructure Policies page.
- 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.
Creating DRS and DPM Policies
The Dynamic Resource Scheduling (DRS) and Distributed Power Management (DPM) policies are automated policies that 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:
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.
Creating Automated DRS and DPM Policies
- Log in as a user with the
EM_CLOUD_ADMINISTRATOR
role and from the Enterprise menu, select Cloud, then select Infrastructure Policies. - From the Create menu, select Schedule Policy.
- 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.