Lab 4 - Creating Multiple HTTP Applications per tenant using AS3ΒΆ

In this lab, we will create two simple HTTP applications using AS3 within the same tenant. Afterwards, we will modify the AS3 declaration to compose and create our very own third application within the same tenant.

Exercise 1 - Multi-App AS3 Declaration

  1. Open Postman and locate the Lab 4 folder, and double-click the HTTP Multi-Applications (2 Apps) declaration.

  2. Examine the body of the AS3 declaration. Take some time to familiarize yourself with how we are declaring two HTTP applications within the same tenant. The two applications are: http_vs and http_vs_2.

  3. After examining the declaration, Send the declaration.

  4. Confirm the results of the POST, and make sure you receive a result of 200.

  5. Navigate to the BIG-IP and visually confirm the changes have been made.

    ../../_images/two_apps_confirm.jpg

Exercise 2 - Add an Additional HTTP Application within a Multi-App Single-Tenant AS3 Declaration

  1. In Postman, locate the declaration we previously sent.

  2. We want to add another HTTP Application within the same tenant.

  3. In Postman, and most text-editors, you can move your cursor next to an open (or closed) brace and it will locate the corresponding closed (or open) brace. This is depicted in the following images:

    ../../_images/app_begin.jpg

    ../../_images/app_end.jpg
  4. We want to add another application to our http_tenant. We can copy the existing declaration for an application and modify parts as needed.

    ../../_images/app_template.jpg
  5. We want to name the application http_app_3 and configure the following:

    Virtual Server Name: 'http_vs_3' Address: 10.1.20.100
    Pool Name: 'http_pool_3' Members: 10.1.10.34 and 10.1.10.35
  6. Modify the AS3 declaration so that our http_app_3 has the appropriate information. Once modified, it should look like the following. **Note: ** You can confirm your updated declaration with the HTTP Multi-Application (3 Apps) declaration.

    ../../_images/app_template_pt2.jpg
  7. Send the declaration.

  8. Confirm the results of the POST, and make sure you receive a result of 200.

    ../../_images/200.jpg
  9. Confirm the changes on the BIG-IP. On the left column, navigate to Local Traffic -> Virtual Servers and validate the partition is http_tenant.

  10. You should see the list of 3 virtual servers.

    ../../_images/3apps.jpg
  11. You can navigate to Local Traffic -> Pools to confirm the changes made to the Pools.

    ../../_images/3pools.jpg

Exercise 3 - Delete HTTP Applications and Tenant

  1. In order to delete our virtual server, pools, and pool members, we can simply send a POST with an empty tenant body. Since AS3 is declarative, it will notice that we are sending a POST with an empty tenant body, and will by default delete the existing virtual server, pool and pool members.

    ../../_images/clear_tenant.jpg
  2. In Postman, find the Delete Application request. Examine the URI and body declaration. Notice we are sending a POST to the same API endpoint, but take a close look at the JSON body.

  3. The body declares a AS3 tenant called http_tenant, but the body describing the state of the tenant is empty. By default, AS3 will remove the virtual server, pool, and pool members. Since this would cause the entire tenant to be empty, AS3 will also remove the tenant for us.

  4. Click on Send.

  5. Confirm the results of the POST, and make sure you receive a result of 200.

  6. Navigate back to the BIG-IP, refresh the page and confirm the changes that the tenant has been deleted.

    ../../_images/delete_tenant.jpg