F5 Programmability Training > Class 1: Introduction to Automation & Orchestration > Module 3: Creating Declarative Service Interfaces with iWorkflow Source | Edit on

Lab 3.2: Create a Declarative Service Catalog

digraph breadcrumb { rankdir="LR" ranksep=.4 node [fontsize=10,style="rounded,filled",shape=box,color=gray72,margin="0.05,0.05",height=0.1] fontsize = 10 labeljust="l" subgraph cluster_provider { style = "rounded,filled" color = lightgrey height = .75 label = "Service Templates, Catalog and Deployments" onboarding [label="Basics",color="palegreen"] templates [label="Templates",color="steelblue1"] catalog [label="Catalog"] deployments [label="Deployments"] onboarding -> templates -> catalog -> deployments } }

In the introduction to this module we discussed the importance of using Service Templates to build a Declarative Service Catalog. This lab will show to create a few examples of Service Templates (Templates). It’s important to understand that while the packaged examples used in this lab are great starting points, you should use them as a starting point for creating your own Service Catalog that meets the requirements of your environment.

We will explore the first example in depth so you can gain an understanding of how the templates are structured. For the remaining templates you can just repeat the steps used with the first example.

The templates used in this lab all have a version number appended to the name (Example: f5-http-lb-v1.0). It’s important that this pattern is followed in your environment. Explicitly versioning the templates allows for migration between template versions in a stable manner. Without versioning any changes to the template could result in every deployment associated with the template being modified at the same time. With versioning, the application owner or F5 administrator can choose to either migrate all deployments at the same time OR perform the migration on a per deployment manner.

Task 1 - Create the Service Templates

In this task we will use the Runner to quickly create our sample Service Templates. Perform the following steps to complete this task:

  1. Click the Runner button at the top left of your Postman window.

  2. Select F5 Programmability: Class 1 ‣ Lab 3.2 - Create a Declarative Service Catalog folder.

  3. Select the F5 Programmability: Class 1 environment

  4. Click the Run Lab 3.2 - Crea… button and wait for the run to complete. Verify no errors were encountered.

  5. Open the iWorkflow GUI in Chrome by navigating to https://10.1.1.12

  6. Expand the Service Templates panel and verify all the templates have been created:

    lab-2-1

Task 2 - Explore the f5-http-lb-v1.0 Template

Now that we’ve created our Templates let’s review one of them in depth.

Perform the following steps to complete this task:

  1. Open the f5-http-lb-v1.0 Template by double clicking it:

    lab-2-2

  2. Let’s examine the Properties pane.

  3. Select All in the Displayed Parameters section:

    lab-2-3

  4. This pane shows detailed information about the Template such as:

    • iApp Template Name & Version the Service Template is using
    • The Connectors/Clouds that may use this template
    • A control that toggles which Parameters are displayed in the pane
    • The input Sections and Fields (collapsed in screenshot) for the iApp Template

    lab-2-4

  5. In the Sections portion of the pane, find the Virtual Server Listener & Pool Configuration section. Click the triangle to expand the section:

    lab-2-5

  6. You can now see all the input fields associated with this section of the iApp template. These fields are defined by the iApp Template itself. In the previous lab, when we installed the App Services iApp Template, iWorkflow created a internal representation of the input fields used in the iApp template. iWorkflow then allows you to create a template that:

    • Define which fields are Tenant Editable, therefore exposed to the Tenant interface
    • Setting a default value for the field
      • If the field is NOT Tenant Editable the default value is sent during a Service Deployment, however, the Tenant cannot see or modify the value
      • If the field is Tenant Editable the default value is populated for the Tenant and the Tenant may edit it during a Service Deployment

    lab-2-6

    In the case of the fields shown in the above example:

    • pool__DefaultPoolIndex: A value of 0 will be sent during a deployment
    • pool__MemberDefaultPort: Nothing will be sent
    • pool__addr: Tenant will be allowed to populate the field with a value
    • pool__mask: A value of 255.255.255.255 will be sent
    • pool__port: Tenant will see 80 and can change the field

    By combining different combinations of Default Values and Tenant Editable fields you can create many different types of templates to match your requirements.

    Note

    The App Services iApp Template has been specifically designed to integrate with iWorkflow and Automation use cases. While any iApp template that is properly versioned can be used with iWorkflow, you should consider whether the template was designed for Automation use cases or not. Many iApp templates were designed for a GUI or Wizard based interaction through the BIG-IP TMUI GUI. As a result those templates may not present a good API interface.

  7. In addition to simple text fields, iApp templates also support table based input. The App Services iApp uses this capability to allow input of more complex data such as Pools, Pool Members and Layer 7 Routing Policies. iWorkflow allows you to have granular control over how the Tenant can interact with a table. Let’s find the pool__Pools table and click the triangle to expand it:

    Note

    To accomodate screen size this screenshot does not show all the columns in the table.

    lab-2-7

    The highlighted sections in the image above correspond to the capabilities in the list below:

    • [1] Definition of the Min and Max number of rows in a table
      • Example: Define a fixed number or limit for the number of Pools a Tenant can deploy
    • [2] Default Values for each column in a table
      • Example: Define a default Load Balancing Method for deployed Pools
    • [3] Tenant Editable flag for each column in the table
      • Example: Only allow the Tenant to control the Load Balancing Method and Name of a Pool, while defaulting all other values.
    • [4] Default Rows that auto-populate a desired input for the Tenant. Each row can have a No Access, Read-Only or Write ACL applied.
      • Example: Define a Service that allows URL Based Content Routing to only two pools.
        • Define 2 Default Rows in the Pools table
        • Set the Min & Max value to 2
  8. Finally, to assist in designing a Tenant interface, iWorkflow allows you to preview what the Tenant UI would look like for a Service Template. To view the preview, click the Tenant Preview button:

    lab-2-8

  9. The preview window shows how the Tenant UI would present the Service Template. As you can see the interface is vastly simplified and only Tenant Editable fields are shown. Because the true deployment details are filtered from the Tenant, the Service Deployment requires much less Domain Specific Knowledge. Keep in mind that while the Tenant interface may be simple, you can still leverage advanced functionality in the Service Template.

    lab-2-9

Task 3 - Explore the Remaining Service Templates

Using the pattern in the last task explore the other Service Templates that were created earlier. A description of each Service Template is included in the table below. In all cases the Template has been configured with the appropriate Monitors, Profiles and Options for the use case.

Service Template Description
f5-http-lb-v1.0 HTTP Load Balancing to a Single Pool
f5-https-offload-v1.0 HTTPS Offload and Load Balancing to a Single Pool
f5-fasthttp-lb-v1.0 Performance-enhanced HTTP Load Balancing to a Single Pool
f5-fastl4-tcp-lb-v1.0 Generic L4 TCP Load Balancing to a Single Pool
f5-fastl4-udp-lb-v1.0 Generic L4 UDP Load Balancing to a Single Pool
f5-http-url-routing-lb-v1.0 HTTP Load Balancing with URL Based Content Routing to Multiple Pools
f5-https-waf-lb-v1.0 HTTPS Offload, Web Application Firewall Protection and Load Balancing to a Single Pool