Manual Chapter :
Managing BIG-IQ AS3 Templates
Applies To:
Show VersionsBIG-IQ Centralized Management
- 7.1.0
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 someone with the requisite permissions 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.
- At the top of the screen, clickApplications, then, on the left, clickAPPLICATION TEMPLATES.The screen lists the AS3 and service catalog templates defined on this BIG-IQ.
- In the upper right corner, click theImport Templateslink.The link opens the F5 DevCentral GIT repository (f5-big-iq).
- Follow the step-by-step instructions, titledImporting 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.
- 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-defaultis set up to load balance a TCP-based application service using a FastL4 profile, whileAS3-F5-UDP-lb-template-defaultis set up to load balance a UDP-based application service.
- If you are ready to use this template to create an application service, clickPublish & 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.
- If you are done with this template, but not ready to use it to create a new application service, clickSave & 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
.- At the top of the screen, clickApplications, then, on the left, clickAPPLICATION TEMPLATES.The screen lists the AS3 and service catalog templates defined on this BIG-IQ.
- Select the check box to the left of the AS3 template you want to clone.
- ClickClone.
- In the popup screen, type aNamethat you want to use for the clone, and then clickClone.The system creates a clone of the AS3 template. Now you probably want to edit it so that it best suits your needs.
- Click the name of the AS3 template that you want to edit.The general properties display the currently defined services for the selected template.
- Review the classes defined in the template you selected, and revise any values that need to be tailored to your specific requirements.
- To add or remove classes defined in this template, on the left, underPROPERTIES, clickAdd/Remove.
- 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 clickSaveto 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
- 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 selectEditable.
- 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 selectEditable.
- To leave the default property value as is, but allow it to be specified during deployment, selectEditable, but do not specify a default value for that property.
Some AS3 classes support a different set of property fields depending on the type of schema used to parse the AS3 class definition. For these classes, you can choose the type of schema (Basic SchemaorAdvanced Schema). Each schema type uses a different set of fields to specify the class. For these class properties you can toggle between the schema types to display the set of fields needed to specify the AS3 class to meet your business needs.As you specify property values for each class, the JSON Detail area displays the AS3 declaration for that class as you have defined it.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 areEditable. 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.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. - 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.
- If you are ready to use this template to create an application service, clickPublish & 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.
- If you are done with this template, but not ready to use it to create a new application service, clickSave & 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.
- At the top of the screen, clickApplications, then, on the left, clickAPPLICATION TEMPLATES.The screen lists the AS3 and service catalog templates defined on this BIG-IQ.
- Under AS3 Templates, clickCreate.The General Properties tab of the Create AS3 Template screen opens to General Properties.
- Type aNameand an (optional)Descriptionfor the AS3 template you are creating.
- Specify theTenantname for this template.
- To allow the name to be specified when this template is used to deploy an application service, selectEditable.
- To specify the name here, clear theEditablecheck box and type a name for theTenant.
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 aTenantname 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. - After you define theNameandTenant, clickSave.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.
- Select the check box for each class that you want to include in this template, then clickSave.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.
- 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 selectEditable.
- 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 selectEditable.
- To leave the default property value as is, but allow it to be specified during deployment, selectEditable, but do not specify a default value for that property.
Some AS3 classes support a different set of property fields depending on the type of schema used to parse the AS3 class definition. For these classes, you can choose the type of schema (Basic SchemaorAdvanced Schema). Each schema type uses a different set of fields to specify the class. For these class properties you can toggle between the schema types to display the set of fields needed to specify the AS3 class to meet your business needs.As you specify property values for each class, the JSON Detail area displays the AS3 declaration for that class as you have defined it.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 areEditable. 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.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. - When you finish specifying properties for an object, clickSave.BIG-IQ adds the AS3 declaration for the selected class to the JSON detail for this template.
- Continue specifying properties for each of the classes you added to this template.
- If you are ready to use this template to create an application service, clickPublish & 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.
- If you are done with this template, but not ready to use it to create a new application service, clickSave & 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. - Create a template namedAs3Service1and name the tenantTenant1.
- Leave theEditablecheck box cleared.
- Use the template to deploy an application service namedAppservice1to a managed device nameddevice1.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.
- At the top of the screen, clickApplications, then, on the left, clickAPPLICATION TEMPLATES.The screen lists the AS3 and service catalog templates defined on this BIG-IQ.
- 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 toClone an AS3 templateonsupport.f5.com..
- Use theSwitch to templatebutton to change the template that the application uses. For details, refer toChange the template for a deployed applicationonsupport.f5.com..
The properties area displays the list of currently defined services for the selected template. - Specify theTenantname for this template.
- To allow the name to be specified when this template is used to deploy an application service, selectEditable.
- To specify the name here, clear theEditablecheck box and type a name for theTenant.
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 aTenantname 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. - Review the classes defined in the template you selected, and revise any values that need to be tailored to your specific requirements.
- To add or remove classes defined in this template, on the left, underPROPERTIES, clickAdd/Remove.
- 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 clickSaveto 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
- 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 selectEditable.
- 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 selectEditable.
- To leave the default property value as is, but allow it to be specified during deployment, selectEditable, but do not specify a default value for that property.
Some AS3 classes support a different set of property fields depending on the type of schema used to parse the AS3 class definition. For these classes, you can choose the type of schema (Basic SchemaorAdvanced Schema). Each schema type uses a different set of fields to specify the class. For these class properties you can toggle between the schema types to display the set of fields needed to specify the AS3 class to meet your business needs.As you specify property values for each class, the JSON Detail area displays the AS3 declaration for that class as you have defined it.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 areEditable. 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.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. - If you are ready to use this template to create an application service, clickPublish & 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.
- If you are done with this template, but not ready to use it to create a new application service, clickSave & Close.
To create the objects in this template, you
must create an application with it.