F5 Private Cloud Solutions > 2. Class 2: Deploying Cisco APIC with F5 iWorkflow and BIG-IP Source | Edit on

2.5. Using POSTMAN REST client to deploy service graph

Launch POSTMAN from desktop

Import the POSTMAN collection

The JSON collection if saved on your desktop - ‘dCloud-F5-iWorkflow-App-iApps-Final.postman_collection.json’

Click on Collection->Import

Click on the ‘Choose Files’ button and browse to the json collection and import it

image109

The POSTMAN collection will be loaded in your POSTMAN window:

image110

To view what each API call executed, click on the POST requests

Click on the Body to view the payload being passed

Click the Send button to execute the request

Check the status at the bottom of the window to see if the request got executed successfully (200 OK)

image111

Note

Device package install, device manager configuration has already been done, POSTS are from the point of when a graph is to be created

Run each postman POST and then see the corresponding object created on the APIC

  1. Login Token to APIC – Used for authentication to the APIC. The response to the POST operation will contain an authentication token. Subsequent operations on the REST API will use this token value to authenticate future requests.
  2. CreateDeviceManagerType – Used to create a device manger type under L4-L7 services->Inventory
  3. CreateDeviceManager-Common – Will create a device manager which has iWorkflow credentials under tenant common
  4. Create-Ldev-Common– Creates a logical device cluster on the APIC in tenant common
  5. Export from Common to SJC tenant – Exports the LDev from common tenant to SJC tenant
  6. Scope Network under AP – This will scope the network parameters like self IP/route under the application profiles
  7. Create contract – Creates a contract to be used in tenant SJC
  8. Assign contract to web EPG
  9. Assign contract to app EPG
  10. Create service graph template – Creates the service graph template to be used
  11. Apply service graph template – Specifies the parameters (virtual server/pool. Pool members etc.) to be configured for this particular graph
  12. Create device selection policy – Creates a device selection policy (This construct gets created automatically when using the UI, this is an extra step needed when using automation)
  13. Apply graph to contact – Attach the graph to the contract

This conclude Scenario 4 “POSTMAN REST client” lab.

  1. Reset APIC Simulator

APIC Fabric Members are created by default, so that the demonstration can begin with the creation of the APIC objects.

If you want to demonstrate the fabric discovery, reboot the apic-fcs via Guest OS Control as follows:

  1. From the Demo Dashboard, click Servers.

  2. Servers Tab

    image112

  3. From the Servers list, click the image113next to apic-fcs.

    image114

  4. Click the Reboot button in Guest OS Control to restart the server.

    image115

Note

It will take up to 5 minutes before you can login and rebuild the Fabric using one of the Fabric Discovery methods in Appendix B.

  1. Fabric Discovery

If they are not configured, use one of the three methods below to configure:

Method Automation Level Explanation Completion Time
Script Configuration High Skip the configuration steps and discover the APIC Fabric automatically, as shown in Configure APIC Fabric Using Scripts.
1 minute, followed by
15 minutes to build the fabric
Wizard Configuration Medium Set up the APIC Fabric using the Postman–REST client, as shown in Configure APIC Fabric Using Postman–REST Client. 5 minutes, followed by 15 minutes to build the fabric

Note

The full fabric discovery can take up to 15 minutes. The apic3 controller will be discovered after all the devices are discovered. You can check monitor the progress by selecting Topology from the Inventory pane in the APIC GUI. While the discovery is taking place, you can complete Scenario 1, which ends in the APIC Topology window showing the discovered elements.

Demonstration Steps

2.5.1. Configure APIC Fabric Using Scripts

  1. From the demonstration workstation, click the Build ACI Fabric icon. image116

  2. Type Y <Enter> at the Do you want to continue (Y/N)? prompt. The script will begin building the fabric, which will take about 15 minutes.

  3. Build ACI Fabric Script

    image117

  4. Type Y <Enter> at the Do you want to continue (Y/N)? prompt. The script will begin building the F5, which will complete before the ACI fabric is set up.

2.5.2. Configure APIC Fabric Using Postman–REST Client

  1. From the demonstration workstation, launch ‘APIC Login’, and then log in to the Application Policy Infrastructure Controller with the following credentials: Username: admin, Password: C1sco12345.

  2. From the menu bar, click Fabric.

  3. From the sub-menu bar, click Inventory.

  4. In the left-pane, choose Fabric Membership.

  5. Review the current members of the Fabric.

  6. Fabric Membership

    image118

  7. Launch the Postman – REST Client [image119] from the taskbar. You are automatically be logged in. This is where you will register the switches for the APIC.

    Note

    If you get a status of 403 Forbidden while performing the activity in this scenario, review the text below for more information on the error. If you see Token was invalid (Error: Token timeout), this means that your session has timed out. You will need to launch the APIC Login POST [image120] and then proceed with the next POST.

    image121

  8. In the left-pane, click the arrow [image122] next to dCloud APIC Demo, and then click the arrow next to Create Fabric and dCloud APIC Connectivity.

  9. dCloud APIC Demo

    image123

  10. Go to dCloud APIC Connectivity and then choose APIC Login. Click Send to connect to the APIC.

  11. APIC Login and Send

    image124

  12. Review the Status of the submission. A result of 200 OK means the submission was successful.

  13. Status

    image125

  14. Go to Create Fabric.

  15. Choose the Add Spine1 to Fabric post. Click Send to configure the first spine,a and then it will discover the others.

  16. Review the status of the submission.

  17. In the APIC application window, you can see Spine1 is now part of the Fabric Membership.

  18. Fabric Membership

    image126

  19. Go to the Postman – REST Client window.

  20. Under Create Fabric, choose the Add Spine2 to Fabric post and then click Send to configure the second spine.

  21. Review the status of the submission.

  22. In the APIC window, you can see Spine2 is now part of the Fabric Membership.

  23. Fabric Membership

    image127

  24. Go to the Postman – REST Client window.

  25. Under Create Fabric, choose the Add Leaf2 to Fabric post.

  26. Review the command for this post and you can see that it:

    • Looks for the serial number (TEP-1-102)
    • Sets up the serial number for node 102
    • Names Leaf2
  27. Add Leaf2 to Fabric

    image128

  28. Click Send.

  29. Review the status of the submission.

  30. In the APIC window, you can see Leaf2 is now part of the Fabric Membership.

  31. Fabric Membership

    image129

  32. Go to the Postman – REST Client window.

  33. Under Create Fabric, choose the Configure Leaf 1 to Fabric post, which will update the first member of the Fabric.

  34. Click Send.

  35. Review the status of the submission.

  36. In the APIC window, you can see that Node ID and Node Name have been set for serial number TEP-1-101.

  37. As it discovers Leaf1, an IP address is allocated.

  38. The discovery will continue until it finds all of the links to the other members and populates the IP Addresses.

  39. Fabric Membership

    image130

  40. Wait for discovery to finish. In the APIC window, select Fabric > Inventory from the main menu. Click Topology and demonstrate that the entire fabric has been discovered and is included in the topology.

  41. Fabric Discovery Topology

    image131

    image132