Manual Chapter : Managing BIG-IQ AS3 Templates

Applies To:

Show Versions Show Versions

BIG-IQ Centralized Management

  • 7.0.0
Manual Chapter

Managing BIG-IQ AS3 Templates

How do AS3 templates work?

The F5 Application Services 3 (AS3) extension is a mechanism for managing application-specific configurations on a BIG-IP device. AS3 uses JSON declarations to manage the configuration objects. BIG-IQ AS3 templates provide you with a user interface that guides you through the process of creating the body of a well-formed JSON declaration without you having to learn JSON.
Both AS3 templates and service catalog templates deploy application services to managed devices. However, the work flow for each template type is significantly different. For details about how service catalog templates work, refer to
Manage BIG-IQ Service Catalog Templates
on
support.f5.com
.
AS3 templates are usually created by a network engineer, and are used to create and deploy application services to managed devices. The AS3 template model simplifies the process of determining the objects (and their settings) by giving you a list of AS3 classes to choose from. These classes are defined in a JSON schema that includes full specifications for each object property.
For detailed information about how AS3 works and a closer look at the JSON schema, refer to the
Application Services 3 Extension Documentation
article on
clouddocs.f5.com
.
In this release, AS3 templates deploy application services to managed devices, not to service scaling groups.
When you create or edit an AS3 template, you specify a set of object classes. These classes and their properties define an AS3 application service. You specify which classes to include, and then decide which properties are editable, and which property values to specify default values for. Later, when anyone uses this template to deploy an application service, they specify values for the editable properties. When the application service deploys, AS3 uses the classes and their properties to create configuration objects on the target device.
  • Properties not defined as editable deploy with the default values.
  • Editable properties deploy with the values specified by the application deployer.
  • The application service classes defined in the AS3 template deploy to the target device as configuration objects (virtual servers, pools, security policies, and so on).
Only properties that the template defines as
editable
are visible when you create an application service, The other properties are included using the default values from the template. You can maintain a consistent environment by creating templates with some constant property values, and some values that can be revised. This provides both the consistency and flexibility needed when deploying application services.
Consider the diagram. This AS3 template is defined with two classes, each with its own set of properties. Class1 has three editable properties (2, 3, and 4), Class2 has just two (2 and 3). You decide to use this template to deploy three application services. All you do is specify values for the editable properties for each service. Each application service must have identical values for Class1, Property1, but most likely different values for Class1, Properties 2, 3, and 4. Similarly for Class2, of the 10 properties included for this class, only 2 and 3 will be unique; the rest will have identical values in each application service.
When you use this template to create an AS3 template application service, BIG-IQ creates an AS3 declaration, which is validated against the JSON schema; then, AS3 deploys the objects defined in the declaration to the BIG-IP devices targeted in the declaration.
To further simplify the application deployment process, F5 maintains a library of AS3 templates. This online library is accessible in a GIT repository, and continually updated so that you always have access to the most current version.

Import the default AS3 templates

F5 Networks maintains a library of AS3 templates that contain all of the classes needed for the several common use-case scenarios. The easiest way for you to get started using templates is to import this library. Then you can customize one to define the objects that you need in your application service.
  1. At the top of the screen, click
    Applications
    , then, on the left, click
    APPLICATION TEMPLATES
    .
    The screen lists the AS3 and service catalog templates defined on this BIG-IQ.
  2. In the upper right corner, click the
    Import Templates
    link.
    The link opens the F5 DevCentral GIT repository (f5-big-iq).
  3. Follow the step-by-step instructions, titled
    Importing AS3 templates to your BIG-IQ using Postman
    , located on this page.
    When you complete the import process, the imported templates display on the BIG-IQ Application Templates screen.
  4. Click the name of the AS3 template that seems most closely suited to your needs.
    You can most likely determine which template to use by examining the title. The type of objects that each template includes are part of the name.
    For example,
    AS3-F5-FastL4-TCP-lb-template-default
    is set up to load balance a TCP-based application service using a FastL4 profile, while
    AS3-F5-UDP-lb-template-default
    is set up to load balance a UDP-based application service.
  5. If you are ready to use this template to create an application service, click
    Publish & Close
    .
    BIG-IQ changes this template to read-only status, so you can use it to create a new application service that deploys to your BIG-IP devices.
  6. If you are done with this template, but not ready to use it to create a new application service, click
    Save & Close
    .

Clone an AS3 template

Using the clone option, you can make a copy of an AS3 template. Then you add or remove only the objects that need to change to produce the AS3 template you want. The clone option simplifies the task of creating templates, reduces the opportunities to make errors, and helps you to maintain a consistent environment. It is also a part of the work flow for making changes to an application service that is already deployed. You can clone the template used to create the application service, revise the clone, and then use the Switch to template feature to redeploy the application service with the new settings.
This work flow shows you how to clone an AS3 template that is already defined on this BIG-IQ. For details about other ways to create AS3 templates, refer to
Import a default AS3 template
or
Create an AS3 template
on
support.f5.com
.
  1. At the top of the screen, click
    Applications
    , then, on the left, click
    APPLICATION TEMPLATES
    .
    The screen lists the AS3 and service catalog templates defined on this BIG-IQ.
  2. Select the check box to the left of the AS3 template you want to clone.
  3. Click
    Clone
    .
  4. In the popup screen, type a
    Name
    that you want to use for the clone, and then click
    Clone
    .
    The system creates a clone of the AS3 template. Now you probably want to edit it so that it best suits your needs.
  5. Click the name of the AS3 template that you want to edit.
    The general properties display the currently defined services for the selected template.
  6. Review the classes defined in the template you selected, and revise any values that need to be tailored to your specific requirements.
    1. To add or remove classes defined in this template, on the left, under
      PROPERTIES
      , click
      Add/Remove
      .
    2. Select or clear check boxes for the classes that you want to add or remove from this template, until all of the objects your application service needs are included. Then click
      Save
      to display the new list of classes below the template Properties on the left.
      For detailed AS3 class definitions and descriptions of what each property controls, refer to schema-reference.html#service-https.
      The AS3 JSON schema defines default values for each class property. You can either leave a property at the default, or specify a new default value. You can also specify which property values can be seen and revised when this template is used to create an application service
  7. For each class you added, decide which properties you want to specify, and which properties must be specified when this template is used to deploy an application service.
    When you use this template to create an application service, BIG-IQ uses your specifications to define the class properties that make up the AS3 declaration that deploys the application service. If you do not specify values for a property, the declaration uses default values from the AS3 JSON schema.
    • To specify a default value and make sure that BIG-IQ uses that value for that property, specify a value for that property, but do not select
      Editable
      .
    • To specify a default value but allow it to be changed when the template is used to deploy an application, specify a value for that property and select
      Editable
      .
    • To leave the default property value as is, but allow it to be specified during deployment, select
      Editable
      , but do not specify a default value for that property.
    When you configure properties that need to have a new value specified each time you use this template to deploy an application service, make sure they are
    Editable
    . Then, when you (or your designate) deploy this application service, it's obvious which properties to supply values for: If it is visible, supply a value.
    As you specify property values for each class, the JSON Detail area displays the AS3 declaration for that class as you have defined it.
    Templates often create objects that are used by other objects that are created in the same template. However, when you use these objects in your template, you need to use care. If you specify a name for an object, and also allow it to be edited, then when the application deploys, BIG-IQ looks for the name specified in the template. However, if you made the object editable, the person deploying the application service could edit that name to something else, in which case BIG-iQ will not find that object and the deployment fails. To ensure successful application deployment, the best practice is to leave editable objects in the template un-named so that the application deployer can use the name that best suits their need at the time.
  8. Add or remove configuration objects until the cloned template meets your requirements.
    When you finish the edits to this new template, you can use it to create a new application service that deploys to your BIG-IP devices.
  9. If you are ready to use this template to create an application service, click
    Publish & Close
    .
    BIG-IQ changes this template to read-only status, so you can use it to create a new application service that deploys to your BIG-IP devices.
  10. If you are done with this template, but not ready to use it to create a new application service, click
    Save & Close
    .

Create an AS3 template

BIG-IQ provides user interface screens that help you to create and edit Application Services 3 Extension (AS3) templates. A finished template is actually the body of a JSON declaration that the AS3 service can use to deploy applications to your managed devices. But the BIG-IQ user interface builds the JSON body for you, so you don't need to learn to create well-formed JSON to create an AS3 application service.
  1. At the top of the screen, click
    Applications
    , then, on the left, click
    APPLICATION TEMPLATES
    .
    The screen lists the AS3 and service catalog templates defined on this BIG-IQ.
  2. Under AS3 Templates, click
    Create
    .
    The General Properties tab of the Create AS3 Template screen opens to General Properties.
  3. Type a
    Name
    and an (optional)
    Description
    for the AS3 template you are creating.
  4. Specify the
    Tenant
    name for this template.
    • To allow the name to be specified when this template is used to deploy an application service, select
      Editable
      .
    • To specify the name here, clear the
      Editable
      check box and type a name for the
      Tenant
      .
    If you have deployed configuration objects to BIG-IP devices and you plan to use this template to deploy application services to those same devices, do not choose a
    Tenant
    name that might match the name of partitions on which your previously deployed configuration objects reside. For more detail on how AS3 uses the tenant name and guidelines for using this control effectively, see AS3 tenant name details.
  5. After you define the
    Name
    and
    Tenant
    , click
    Save
    .
    Once you save the template, you can define the default classes and properties for this template. You can either do this now, or come back and do it later. This work flow steps you through the entire process now.
  6. Review the classes defined in the template you selected, and revise any values that need to be tailored to your specific requirements.
    1. To add or remove classes defined in this template, on the left, under
      PROPERTIES
      , click
      Add/Remove
      .
    2. Select or clear check boxes for the classes that you want to add or remove from this template, until all of the objects your application service needs are included. Then click
      Save
      to display the new list of classes below the template Properties on the left.
      For detailed AS3 class definitions and descriptions of what each property controls, refer to schema-reference.html#service-https.
      The AS3 JSON schema defines default values for each class property. You can either leave a property at the default, or specify a new default value. You can also specify which property values can be seen and revised when this template is used to create an application service
  7. Select the check box for each class that you want to include in this template, then click
    Save
    .
    For detailed AS3 class definitions and descriptions of what each property controls, refer to schema-reference.html#service-https.
    The selected classes are added to the template and listed below the template Properties on the left. The AS3 JSON schema defines default values for each class property. You can either leave a property at the default, or specify a new default value. You can also specify which property values can be seen and revised when this template is used to create an application service.
  8. For each class you added, decide which properties you want to specify, and which properties must be specified when this template is used to deploy an application service.
    When you use this template to create an application service, BIG-IQ uses your specifications to define the class properties that make up the AS3 declaration that deploys the application service. If you do not specify values for a property, the declaration uses default values from the AS3 JSON schema.
    • To specify a default value and make sure that BIG-IQ uses that value for that property, specify a value for that property, but do not select
      Editable
      .
    • To specify a default value but allow it to be changed when the template is used to deploy an application, specify a value for that property and select
      Editable
      .
    • To leave the default property value as is, but allow it to be specified during deployment, select
      Editable
      , but do not specify a default value for that property.
    When you configure properties that need to have a new value specified each time you use this template to deploy an application service, make sure they are
    Editable
    . Then, when you (or your designate) deploy this application service, it's obvious which properties to supply values for: If it is visible, supply a value.
    As you specify property values for each class, the JSON Detail area displays the AS3 declaration for that class as you have defined it.
    Templates often create objects that are used by other objects that are created in the same template. However, when you use these objects in your template, you need to use care. If you specify a name for an object, and also allow it to be edited, then when the application deploys, BIG-IQ looks for the name specified in the template. However, if you made the object editable, the person deploying the application service could edit that name to something else, in which case BIG-iQ will not find that object and the deployment fails. To ensure successful application deployment, the best practice is to leave editable objects in the template un-named so that the application deployer can use the name that best suits their need at the time.
  9. When you finish specifying properties for an object, click
    Save
    .
    BIG-IQ adds the AS3 declaration for the selected class to the JSON detail for this template.
  10. Continue specifying properties for each of the classes you added to this template.
  11. If you are ready to use this template to create an application service, click
    Publish & Close
    .
    BIG-IQ changes this template to read-only status, so you can use it to create a new application service that deploys to your BIG-IP devices.
  12. If you are done with this template, but not ready to use it to create a new application service, click
    Save & Close
    .
When this template is used to deploy an application, all of the objects and default property values that you specified are included in the AS3 declaration. However, only property values that you designated as editable are visible. Class properties that you did not overwrite use the default values from the AS3 JSON schema.

AS3 tenant name details

When AS3 deploys an application service to a managed device, it deploys to the tenant partition specified in the AS3 template on which the application service is based. As part of the deployment process AS3 removes any objects previously existing in that target partition on the managed device.
For example, if you had manually deployed a number of virtual servers to a partition named
my-app-servers
on a BIG-IP named
my.server.com
and then use AS3 to deploy an application service to that same partition and device, AS3 would remove the existing virtual servers and then deploy the application service.
If you have deployed configuration objects to the devices that you plan to deploy AS3 application services, make sure the tenant names you specify are unique; that is, they don't match the names of any BIG-IP partitions to which you have deployed configuration objects. Best practice is to you select
Editable
for the tenant name, so you have the flexibility to revise the name when you use the template to deploy an application service.
Another factor to consider when you specify the
Tenant
for a template is that BIG-IQ uses the both the application name and the tenant name as identifiers to organize the application services it deploys to your managed devices. You cannot deploy two application services with the same name to the same device if those services use the same tenant name. For example, consider the following work flow.
  1. Create a template named
    As3Service1
    and name the tenant
    Tenant1
    .
  2. Leave the
    Editable
    check box cleared.
  3. Use the template to deploy an application service named
    Appservice1
    to a managed device named
    device1.mynet.com
With these settings, you could not use
As3Service1
to deploy another application service named
Appservice1
to
device1.mynet.com
.
If for some reason you did want to deploy two application services with the same name to the same device, you have two choices:
  • Use a second template that uses a different tenant name.
  • Use the same template, but make the tenant name editable. Then when you create the second application, specify a different tenant name.

Edit an AS3 template

BIG-IQ provides user interface screens that help you to create and edit Application Services 3 Extension (AS3) templates. A finished template is actually the body of a JSON declaration that the AS3 service can use to deploy applications to your managed devices. But the BIG-IQ user interface builds the JSON body for you, so you don't need to learn to create well-formed JSON to create an AS3 application service.
Do not attempt to edit the default AS3 template. This template is provided only to make it possible to create AS3 templates using an API call.
  1. At the top of the screen, click
    Applications
    , then, on the left, click
    APPLICATION TEMPLATES
    .
    The screen lists the AS3 and service catalog templates defined on this BIG-IQ.
  2. Click the name of the AS3 template that you want to edit.
    You cannot edit a published template. If the template has been published, but has not been used to deploy an application, you can unpublish it to make it writable. If the template has been used to deploy an application, you have two options:
    • Make a clone of the published template and make your changes to the clone. For details, refer to
      Clone an AS3 template
      on
      support.f5.com.
      .
    • Use the
      Switch to template
      button to change the template that the application uses. For details, refer to
      Change the template for a deployed application
      on
      support.f5.com.
      .
    The properties area displays the list of currently defined services for the selected template.
  3. Specify the
    Tenant
    name for this template.
    • To allow the name to be specified when this template is used to deploy an application service, select
      Editable
      .
    • To specify the name here, clear the
      Editable
      check box and type a name for the
      Tenant
      .
    If you have deployed configuration objects to BIG-IP devices and you plan to use this template to deploy application services to those same devices, do not choose a
    Tenant
    name that might match the name of partitions on which your previously deployed configuration objects reside. For more detail on how AS3 uses the tenant name and guidelines for using this control effectively, see AS3 tenant name details.
  4. Review the classes defined in the template you selected, and revise any values that need to be tailored to your specific requirements.
    1. To add or remove classes defined in this template, on the left, under
      PROPERTIES
      , click
      Add/Remove
      .
    2. Select or clear check boxes for the classes that you want to add or remove from this template, until all of the objects your application service needs are included. Then click
      Save
      to display the new list of classes below the template Properties on the left.
      For detailed AS3 class definitions and descriptions of what each property controls, refer to schema-reference.html#service-https.
      The AS3 JSON schema defines default values for each class property. You can either leave a property at the default, or specify a new default value. You can also specify which property values can be seen and revised when this template is used to create an application service
  5. For each class you added, decide which properties you want to specify, and which properties must be specified when this template is used to deploy an application service.
    When you use this template to create an application service, BIG-IQ uses your specifications to define the class properties that make up the AS3 declaration that deploys the application service. If you do not specify values for a property, the declaration uses default values from the AS3 JSON schema.
    • To specify a default value and make sure that BIG-IQ uses that value for that property, specify a value for that property, but do not select
      Editable
      .
    • To specify a default value but allow it to be changed when the template is used to deploy an application, specify a value for that property and select
      Editable
      .
    • To leave the default property value as is, but allow it to be specified during deployment, select
      Editable
      , but do not specify a default value for that property.
    When you configure properties that need to have a new value specified each time you use this template to deploy an application service, make sure they are
    Editable
    . Then, when you (or your designate) deploy this application service, it's obvious which properties to supply values for: If it is visible, supply a value.
    As you specify property values for each class, the JSON Detail area displays the AS3 declaration for that class as you have defined it.
    Templates often create objects that are used by other objects that are created in the same template. However, when you use these objects in your template, you need to use care. If you specify a name for an object, and also allow it to be edited, then when the application deploys, BIG-IQ looks for the name specified in the template. However, if you made the object editable, the person deploying the application service could edit that name to something else, in which case BIG-iQ will not find that object and the deployment fails. To ensure successful application deployment, the best practice is to leave editable objects in the template un-named so that the application deployer can use the name that best suits their need at the time.
  6. If you are ready to use this template to create an application service, click
    Publish & Close
    .
    BIG-IQ changes this template to read-only status, so you can use it to create a new application service that deploys to your BIG-IP devices.
  7. If you are done with this template, but not ready to use it to create a new application service, click
    Save & Close
    .
To create the objects in this template, you must create an application with it.