Application Packaging Standard

Last updated 18-Mar-2019

APS Resource Management

In the platform, there are various resource components participating in deployment of application services and products based on them and then provisioning of the application resources for customers.

Provisioning Scheme

../../../_images/app-rt-st-subscription.png

Resource Types for APS Resources

APS application resources are split into two groups:

  • Reference application resources belong to the provider. They are shared for all subscribers. The provider creates these resources from the respective APS types during application deployment. For example, every application has the application root APS resource representing the application instance. In addition, the provider can create a number of reference resources, such as offered configurations or simply offers, for example, Gold Mail Account, Silver Mail Account, and so forth.
  • Individual application resources are created from respective APS types individually for customers or service users during the provisioning process. They belong to customers.

APS types are resource schemas shipped inside the application APS package and used for instantiating APS resources, no matter shared or individual.

In the provider environment, the following resource related components are used to offer services to customers:

  • Resource types representing reference APS resources. When creating these resource types, the provider selects the predefined Application Service Reference resource class and links these types with respective reference (shared) APS resources.
  • Resource types representing individual APS resources. When creating these resource types, the provider selects the predefined Application Service resource class and links these resource types with respective APS types (services).
  • A service template is a container of the resources representing the application services and linked with respective resource types. The provider can set a limit on each of the resources inside a service template.

Subscription

When a customer subscribes to application services contained in a service template, the system creates a subscription instantiated from the selected service template with all its resources and limits. The customer subscription will present the following resource components:

  • Reference resources belong to the provider. The customer uses them as offered configurations.
  • Individual resources belong to the customer. Some or all of the individual resources can be linked with reference resources defining configuration of the individual resources.

Note

A limit on a reference resource in a subscription defines the limit on the number of individual resources based on the configuration offered by the reference resource.

Limits on individual resources define the limits on the total number or amount of these resources.

The system will not allow the customer to create a resource based on a reference resource if one of the above limits is reached in the subscription.

APS Resources

APS resources are application specific. They represent application services provided through APS applications. They may have any properties and relations with other resources provided either by the same or different application.

Every resource has its owner. In the account model considered here, the resource owner can be either the provider or a customer.

Consider the following set of examples of application resource models, starting with the simplest one.

Application with Singular Service

Usually, cloud applications are multitenant, that is for each subscription they create a tenant that may log in the cloud system and use application services remotely. On the customer side, it necessary to have a resource that represents the tenant as well as the subscription that contains this resource. You may assign any name to this resource, for example, tenant, or management context, or subscription service.

../../../_images/resource-model1.png

The integration APS application declares two APS types to create APS resources:

  • In the provider context, there is the application root resource, called app on the diagram. This is a mandatory resource for each instance of an integrated application. All other resources are linked directly or indirectly with this resource. In the above diagram, the app resource has a link collection called tenants.
  • In the customer context, there is a subscription service (tenant) linked with the app resource through a single required link called app.

To provision such an application service, the provider needs to create the following two resource types and then add them to a service template.

../../../_images/resource-types1.png

A subscription created from the service template will contain the respective resources.

Parameterized Service

An application can provide various functionalities and resource usage to its tenants. For this purpose, the provider can offer various configurations for tenants. In the following example, the tenant/config APS type allows creating a number of reference resources used to parameterize subscription services.

../../../_images/resource-model2.png

When purchasing a subscription, customers choose one of tenant/config offers. Their subscription service will be linked with the chosen offer.

To provision such an application service, the provider needs to create the following resource types and then add them to a service template.

../../../_images/resource-types2.png

A subscription created from the service template will contain the respective resources.

Subservice

An application can provide various services, for example, mailboxes, calendar, and instant messaging. In the customer context, they look like subservices linked with the main subscription service. In the following example, the subscription may have a limited number of serviceA resources.

../../../_images/resource-model3.png

In this case, you may think of the subscription service as of the management context used by customers to manage subservices. the services collection links the management context with all serviceA resources provisioned in the customer context.

To provision such an application service, the provider needs to create the following resource types and then add them to a service template.

../../../_images/resource-types3.png

A subscription created from the service template will contain the respective resources.

Parameterized Subservice

An application can enable the provider to parameterize subservices by offering various configurations. In the following example, the provider uses the service-A/config APS type to create various reference resources to offer various subservice configurations to customers.

../../../_images/resource-model4.png

When provisioning a service-A resource, a customer selects a service-A/config reference resource to assign its parameters to the new resource. The new service-A resource is linked with the selected service-A/config reference resource.

To provision such an application service, the provider needs to create the following resource types and then add them to a service template.

../../../_images/resource-types4.png

A subscription created from the service template will contain the respective resources.

Resource Counters

Once subscribed to application services, customers and their service users consume application resources, such as storage, network traffic, CPU power, and memory space. To count resource consumption, the subscription service must be able to activate counters as the resource structures.

../../../_images/resource-model5.png

The hosting platform periodically wakes the APS controller to sync counters. Once some counters are active in a subscription, the APS controller will call the retrieve method of the subscription service to get the newest counters values and to update the respective objects in the database.

To provision the application service, the provider needs to create the following resource types and then add them to a service template.

../../../_images/resource-types5.png

A subscription created from the service template will contain the respective resources.

The provider can view and update the periodical process responsible for initiating resource usage collection in Operations Automation platform.

  1. In the Operations Automation provider control panel, navigate to Operations > Tasks.
  2. On the Periodic tab, find the “Synchronize resource usage for instances of APS applications” periodic task.
  3. Open it to perform one of available operations:
    • Run the task immediately by clicking Run.
    • Cancel the task by clicking Cancel Task.
    • Click Edit to change the period or start time as needed:

Note

The above operations are very helpful when you are testing an application, usually to minimize the period of syncing and to run the task immediately.