F5 AS3 extension

Application Services 3 Extension (referred to as AS3 Extension or more often simply AS3) is a flexible, low-overhead mechanism for managing application-specific configurations on a BIG-IP system. AS3 uses a declarative model, meaning you provide a JSON declaration rather than a set of imperative commands. The declaration represents the configuration which AS3 is responsible for creating on a BIG-IP system. AS3 is well-defined according to the rules of JSON Schema, and declarations validate according to JSON Schema. AS3 accepts declaration updates via REST (push), reference (pull), or CLI (flat file editing).

AS3 overview:

 

Install & Use AS3:

Requirements for using AS3 with BIG-IQ

To use AS3 with BIG-IQ, you must perform the following. For specific instructions on these tasks, see the BIG-IQ online help or documentation (BIG-IQ) or the BIG-IP documentation.

Install BIG-IQ v6.1.0 or later.
Manage one or more BIG-IP devices in BIG-IQ. LTM and any other relevant services should be discovered/imported.
Specify the target BIG-IP in your AS3 declarations on BIG-IQ. BIG-IQ can manage multiple BIG-IP devices, so declarations must specify the applicable BIG-IP.
In order to make use of BIG-IQ’s analytics capabilities, you must also:

Connect at least one (data collection device) to BIG-IQ.
Use BIG-IP version 13.1.0.5 or newer.
Provision Analytics (PDF) (Analytics) on BIG-IP.
Enable stats for the BIG-IP within BIG-IQ.
Configure an analytics profile for your service in the declaration.
Additionally, we recommend that:

You use AS3’s asynchronous mode (by POSTing with the query parameter ?async=true). AS3 waits for applications to be configured in BIG-IQ, which can result in timeouts when using AS3’s synchronous mode. See Method POST for more information.

IMPORTANT: AS3 3.7.0 introduces new behavior for asynchronous mode. Even if you have asynchronous mode set to false, after 45 seconds AS3 sets asynchronous mode to true (API swap), and returns an async response. This allows you to use GET to poll for status (you should see a 202 status until the declaration is complete). This typically occurs for most declarations to BIG-IQ (and only very large declarations to BIG-IP); if the declaration completes in less than 45 seconds, AS3 does not modify asynchronous mode.

You only use AS3 running on BIG-IQ. BIG-IQ does not support cases where AS3 runs externally (in a container for example).
To make use of the RBAC capabilities on BIG-IQ:

Use BIG-IQ’s auth token for authentication (see the BIG-IQ auth documentation for specific instructions).
For application creation, add users to a custom Application Creator role, with access to any relevant AS3 templates.
For each application created, a manager and viewer role are created automatically.
Important
Currently, the DELETE method is not supported when using BIG-IQ and AS3 with the target field. Additionally, the PATCH method when using BIG-IQ and AS3 with the target field is only supported using BIG-IQ 7.0 or later and AS3 3.10.0 and later; previous versions are not supported.

 

Install AS3

If you are familiar with the BIG-IP system, and generally familiar with REST and using APIs, this section contains the minimum amount of information to get you up and running with AS3.

Download the latest RPM package from F5 AS3 site on GitHub in the dist directory.

  • Upload and install the RPM package on the using the BIG-IP GUI:
  • Main tab > iApps > Package Management LX > Import
  • Select the downloaded file and click Upload

For complete instructions see Installing AS3 using the BIG-IP Configuration utility or Installing AS3 using cURL from the Linux shell.

Be sure to see the known issues on GitHub (https://github.com/F5Networks/f5-appsvcs-extension/issues) and Warnings, Notes, & Tips pages to review any known issues and other important information before you attempt to use AS3.

Provide authorization (basic auth) to the BIG-IP system:

  • If using a RESTful API client like Postman, in the Authorization tab, type the user name and password for a BIG-IP user account with Administrator permissions.
  • If using cURL, see Installing AS3 using cURL from the Linux shell.

Copy one of the Example declarations which best matches the configuration you want to use. Alternatively, you can use the simple “Hello World” example below, which is a good start if you don’t have an example in mind.

Paste the declaration into your API client, and modify names and IP addresses as applicable. See Appendix A: Schema Reference for additional options you can declare.

POST to the URI https://<BIG-IP>/mgmt/shared/appsvcs/declare

Quick Start Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 {
     "class": "AS3",
     "action": "deploy",
     "persist": true,
     "declaration": {
         "class": "ADC",
         "schemaVersion": "3.0.0",
         "id": "urn:uuid:33045210-3ab8-4636-9b2a-c98d22ab915d",
         "label": "Sample 1",
         "remark": "Simple HTTP Service with Round-Robin Load Balancing",
         "Sample_01": {
             "class": "Tenant",
             "A1": {
                 "class": "Application",
                 "template": "http",
                 "serviceMain": {
                     "class": "Service_HTTP",
                     "virtualAddresses": [
                         "10.0.1.10"
                     ],
                     "pool": "web_pool"
                 },
                 "web_pool": {
                     "class": "Pool",
                     "monitors": [
                         "http"
                     ],
                     "members": [
                         {
                             "servicePort": 80,
                             "serverAddresses": [
                                 "192.0.1.10",
                                 "192.0.1.11"
                             ]
                         }
                     ]
                 }
             }
         }
     }
 }

I loaded Postman up on a Centos 7 virtual to test with inside our corporate intranet and no luck testing using the same method as described in the video above.  I get the following error whenever I try and post.

Some great links

Validate Declarations

BIG-IQ Monitoring and Managing

AS3 Template example

Using declarations with AS3 Templates

 

Still need more manuals on BIG-IQ

 

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.