Policies

The policies in JSDN are a set of rules that are executed when some specified criteria is met.

You can create policies and thus automate tasks and actions which might otherwise need user’s intervention. The policies in JSDN are a set of rules that are executed when some specified criteria is met. You can also use the policy framework to run scheduler driven tasks. For example, you can create a policy to resize the instance if your instance’s CPU utilization is at the critical level 3 times in 60 seconds. First, you need to select the resource type for which you want to create the policy, then select the specific action category. You can also request your administrator to create a policy by uploading the rule file (containing.drl extension).

A quick graphical representation of Policy functionality that works in the platform.

The Policies page displays the policies that are created. The General tab within the Policies page displays the generic store policies.

The following table displays the options available on the Policies page:

Fields Description
Name Displays the name of the policy.
Created On Displays the date and time when the policy is created.
Created By Displays the name of the user who created the policy.
Updated On Displays the date and time when the policy is updated.
Updated By Displays the name of the user who updated the policy.
Actions
  • Click the down arrow next to the Action item, then click the appropriate action.
  • Click the Edit link to edit the policy details.
  • Click the View Details link to view the policy details.
  • Click the Delete link to delete the policy.

Create Policies

The policies are created to define set of rules and thus automate tasks and actions which might otherwise need user’s intervention. While creating a policy you can define a rule to restrict a user from launching an instance based on provider region, images, size and network.

To create policies, do the following:

  1. On the My Company menu, click Policies. The Policies page is displayed.

  2. Click the Add Policy icon available on the top left of the page. The Add Policy page is displayed.

  3. Type the policy name in the Name field.
  4. Provide a short description about the policy in the Description field.
  5. Select the Policy Category for which you want to create the policy from the drop-down list. The listing of the action is based on the Policy Category you select here.
  6. Enter the Resources with tags for the instances which you want to associate with your policy. If you do not associate tags with policies, the particular policy will be associated with all active instances. Provide the key and value in the fields. Refer to the What are Tags? topic for more information on tags.
  7. Select the type of policy you want to create next to the Using Events field.

    The store provides different types of policies to define, 1) IaaS Resources, 2) Instance, 3) Volume, and 4) Usage.

    If you have selected IaaS Resources policy, by default the policy will be driven using IaaS Configuration Screen.

    OR

    If you have selected Instance policy, then you have to select either Calendar Driven Policies, Instance Monitoring Driven Policies, and or Server Recovery Policies as an event type.

    OR

    If you have selected Volume policy, by default the polices will be driven by using Calendar Driven Policies.

    OR

    If you have selected Usage policy, by default the polices will be driven by using Calendar Driven Policies.

  1. If you select the Calendar Type policy you need to select the recurrence of the action from the Recurrence list. You can select whether the action should be executed only once, daily, weekly, monthly, the last day of the month or you define your customer intervals (in Hours and Minutes) . In the Date field, select the Date and in the Time field, enter a valid time in the 24 hours format. The field accepts only values greater than the current time. If you select Daily/Monthly from the Recurrence list, enter the time in the Time field. If you select the recurrence as Weekly, enter the time in the Time field. Then, select which days of the week you need to execute the action.
  2. Select the specific action for which you want to create the policy from the Action drop-down list. The actions which the store currently supports executing using a policy are listed under the Action drop-down list. If you want to add another action, click the Add Another Action link and then select the action. If you select the action as Send Email Notification, you can configure the notification by clicking on the View/Edit Template link.
    OR
  3. If you select the Instance Monitoring type policy, you need to set the criteria for the events to execute. You can select the actions from the drop-down list.
  4. Select the specific action for which you want to create the policy from the Action drop-down list. The actions which the store currently supports executing using a policy are listed under the Action drop-down list. If you want to add another action, click the Add Another Action link and then select the action. If you select the action as Send Email Notification, you can configure the e-mail notification by clicking on the View/Edit Template link. If you select Resize from the Action drop-down list, then you must select the provider and the size to which you want to resize. The system will automatically resize your instance size based on the date and time that you have provided.
  5. If you selected the policy category as Usage Based Policy, you cannot add another action to it. You can select either Cloud Product Usage/Variance Alert or Provider Account Usage/ Variance Alert. Cloud Product Usage gives you the usage details of each product for a particular account. Where as the Provider Account Usage gives you the account level usage details. Click the View/Edit Template link to configure/provide a email address to which the alerts to be sent.
  6. If you select Action as Cloud Product Usage/Variance Alert, then you must select the Provider, the system will list out the number products that the provider has. Select your Product and set a value for both Cumulative Usage Account and Variance. Whenever the usage or variance is reached/crossed the set value, the user (the email which was configured/provided in the email template) will be notified through an email
    OR
  7. If you select Action as Provider Account Usage/Variance Alert, then you must select the Provider and set a value for both Cumulative Usage Account and Variance. Whenever the usage or variance is reached/crossed the set value, the user (the email which was configured/provided in the email template) will be notified through an email.
  8. While Scaling Out an instance, you must defined your criteria and based on your define criteria an instance is created. You can scaled out any number of instances for one particular instance. And while Scaling In, the latest instance will be terminated first.
    Note: For AWS and or for any Private OpenStack instance, before defining the scaled out policy, an image should be created.
  9. Once you have made the changes, click Save & Finish.
    Note: Please use your judgement while choosing the actions for which you want to create the policy.
    The policies you create here will be listed on the Policies page.

View Policy Details

  1. On the My Company menu, click Policies. The Policies page is displayed.

    OR

  2. If you are on the Add Policy page, click the Policies icon available on the top left of the page. The Policies page is displayed.
  3. Click the Edit link from the Actions drop-down list next to the policy you want to edit.

The View Details page is displayed. It displays the details related to the policy. Review the details.

Edit Policy Details

  1. On the My Company menu, click Policies. The Policies page is displayed. Or
  2. If you are on the Add Policy page, click the Policies icon available on the top left of the page. The Policies page is displayed.
  3. Click the Edit link from the Actions drop-down list next to the policy you want to edit.

  4. On the Edit Details page, you can make the changes as required and then click Save & Finish.
    Note: You will not be able to edit the policies created by the administrator using the drl file.

Delete Policies

  1. On the My Company menu, click Policies. The Policies page is displayed.

    OR

  2. If you are on the Add Policy page, click the Policies icon available on the top left of the page. The Policies page is displayed.
  3. Click the Delete link from the Action drop-down list next to the policy you want to edit.
  4. You will be prompted to confirm the deletion. Click Yes to confirm the deletion.

Download Policy Logs

The policy transaction log records for all the policies that are executed are available in the system. You can download the log file that contains the policy transaction status list from the Policy page. You can view the policy details, status of the action whether failure or completed, the details of the user who executed the policy, error code and error description in case if the transaction is a failure.

To download the policy log, do the following:

  1. On the My Company menu, click Policies. The Policies page is displayed.

    OR

  2. If you are on the Add Policy page, click the Policies icon available on the top left of the page. The Policies page is displayed.
  3. Click the Download Policy Log link at the top right of the page. The policy log file gets downloaded to your local system.