MobiledgeX provides several distinctive policies to manage your applications. Setting up these policies provide opportunities to allocate more compute resources, define trust settings, and more.
Policies are applied on a per regional basis, and the same policy may be mirrored across multiple regions. While many policy names may exist across different regions for applications associated with cloudlets within those regions, policy names are shared between the different policy types. Therefore, you cannot have the same name applied to auto-scale policy, auto-provision policy, or trust policy.
Described below are three types of policies to help scale and manage your applications. These policies work independently of each other, unless otherwise noted.
The auto-provision policy can be set to manage the deployment of application instances to different cloudlets providing better service and redundancy. The auto-provision policy works by monitoring FindCloudlet requests for applications across all cloudlets associated with the policy. FindCloudlet returns the best available cloudlet by selecting the most optimal cloudlet based on what is defined for the auto-provision policy. If enough client FindCloudlet counts for a particular cloudlet satisfy both Deploy Request Count and Deploy Interval Count thresholds set on the policy, a new application instance will automatically deploy to that cloudlet. Similar to the auto-scale policy, the min and max settings on the policy work to bound the number of application instances the policy will deploy.
Deploy Request Count: As mentioned earlier, the auto-provision policy works by tracking FindCloudlet requests. Therefore, the Deploy Request Count refers to the FindCloudlet count. Determining whether to scale up (deploy another application instance) is dependent on both the Deploy Request Count and Deploy Interval Count, where at each interval, MobiledgeX measures the number of requests since the last interval for each cloudlet. Each interval is approximately 5 minutes and is adjusted as needed by MobiledgeX. If the number of requests is above the Deploy Request Count threshold for that interval and remains above the threshold for ‘count’ subsequent intervals, MobiledgeX will deploy an instance to that cloudlet.
Undeploy Request Count: If the FindCloudlet request count drops below the Undeploy Request Count threshold per interval, and remains that way for the Undeploy Intervals value, the application instance will be deleted, as long as it does not violate the policy minimum count value.
Deploy Interval Count: The number of intervals that meet the Deploy Request Count criteria to trigger automatic deployment.
Undeploy Interval Count(s): The number of intervals that meet the Undeploy Request Count value to trigger the deletion of the application instance.
Cloudlets: This is a list of available cloudlets in which your policy is limited to deploy your app instances.
Auto-provisioning will not deploy a new application instance on a cloudlet where an instance for the application already exists - regardless of whether that app was created manually or provisioned automatically. Once the auto-provision policy is created, you can reference the policy when you create a new application from the Apps page. Multiple policies may be attached to the same application to provide different levels of automation across different groups of cloudlets.
Note that if you attempt to delete an autoprovision policy where an application is currently associated to that policy, you will receive an error. To properly delete an autoprovison policy, you must first delete the application attached to the policy, and then proceed to delete the policy.
Note: Currently, only Docker and Kubernetes deployments can be auto-provisioned at this time.
To create an auto-provision policy:
1. Expand the Polices submenu.
2. Select Auto Provision Policy and click the + sign.
3. From the Create Auto Provisioning Policy screen, enter information for the required fields.
4. Select the cloudlet(s) specific to the region you selected. Use the arrow to move your cloudlet selection to the box on the right.
5. Now click Create. Your Auto-Provisioning Policy appears on the Policies page. The quick access menu under Actions let you add cloudlet, delete cloudlet, or delete the entire Auto-Provisioning Policy.
6. Once your auto provision policy is created, apply the policy to your applicaton definition under the Advanced Settings.