4. Lab 3: Introduction to the F5 Cloud Failover Extension

The purpose of this lab is to install the cloud failover extension after deploying your API based failover google cloud template.

The F5 cloud failover extension has three main benefits:

  • Standardization: Failover patterns will look similar across all clouds.
  • Portability: You can leverage a variety of methods, including cloud-native templates, Terraform, and Ansible, to install and run CF.
  • Lifecycle and Supportability: You can upgrade BIG-IP without having to call F5 support to fix failover.

4.1. Objective:

  • Gain an understanding of how the cloud failover extension is implemented in Google Cloud.

4.2. Lab Requirements:

  • Completed Lab1 “Deploying GDM Template”
  • Estimated completion time: 40 minutes

4.2.1. Task – Send Failover Declaration wtih Postman to Each BigIP

  1. Using Postman Post the the cloud declaration.

Send two Declarations to each BIG-IP in my pair via Postman. (again following along with the documentation)

  1. Install Postman if it is not already installed.

The installer is located at.

“C:\Users\Public\Public Documents”

  1. Open up postman.

Disable SSL Certificate Verification in postman.

This can be accmplished by going to File/Settings.

image017

  1. Import the Cloud Failover Extension API collection and configure the baseURL values.

-To import the cloud Failover Extension API collection select File\Import -The collection file is called PostmanCollection.json -The collection file is located at https://github.com/F5Networks/f5-cloud-failover-extension/releases/tag/v1.3.0

  1. EDIT The collection to modify the baseURL values.

Hover over the Cloud Failover (CF) Extension collection and click the 3 dots on the bottom right and select “Edit”. (See image)

image044

  • Click on the variables tab
  • Set the Current value IP to be the IP of bigip1
  • Set the Initial value IP to be the IP of bigip2
  • Click the Update Button

image045

  1. Using Postman verify the CFE to ensure it is running correctly.

For Each BigIP Using a RESTful API client like Postman, send a GET request to the URI https://{{host}}/mgmt/shared/cloud-failover/info to ensure Cloud Failover is running properly

You should receive an expected response like the following after you have posted this declaration.

           {
"version": "1.1.0",
"release": "0",
"schemaCurrent": "1.1.0",
"schemaMinimum": "0.9.1"
            }

  1. For Each BigIP Using Postman, send a POST request to the URI https://<BIG-IP>/mgmt/shared/cloud-failover/declare

Modify the declaration within postman for your student number. Your particular student specific scoping address range and you student specific cloud failover label ** Your student specific Next IP addresses… note these are “internal” self IP’s on your BigIP **

Note.

  • The defaultNextHopAddresses should be the selfIP associated with your “internal network”

  • The deployment label should be “studentx” where x is your labuser number.. for instance “student28”:

    9. **For Each BigIP** Using Postman, send a POST request to the URI https://<BIG-IP>/mgmt/shared/cloud-failover/declare
    

Note in the example declaration in the postman collection for google the “environment” value is “gce” this needs to be changed to “gcp” Modify the declaration within postman for you student number. Your particular student specific scoping address range and you student specific cloud failover label ** Your student specific Next hop IP addresses… note these are “internal” self IP’s on your BigIP **

Note.

  • The defaultNextHopAddresses should be the selfIP associated with your “internal network”

  • The deployment label should be “labuserx” where x is your labuser number.. for instance “labuser49”:

    {
      "class": "Cloud_Failover",
      "environment": "gcp",
      "externalStorage": {
          "scopingTags": {
              "f5_cloud_failover_label": "labuser49"
          }
      },
      "failoverAddresses": {
          "scopingTags": {
              "f5_cloud_failover_label": "labuser49"
          }
      },
      "failoverRoutes": {
          "scopingTags": {
              "f5_cloud_failover_label": "labuser49"
          },
          "scopingAddressRanges": [
              {
                  "range": "10.1.11.128/29"
              }
          ],
          "defaultNextHopAddresses": {
              "discoveryType": "static",
              "items": [
                  "10.3.0.40",
                  "10.3.0.39"
              ]
          }
      },
      "controls": {
          "class": "Controls",
          "logLevel": "info"
      },
      "schemaVersion": "1.3.0"
    }
    

4.2.2. Task – Create Route

  1. In google create a student specific route.

You will add the route under the Networking/VPC Network/Routes.

gcloud compute routes create labuser49 –destination-range=10.1.11.128/29 –network=internal-vpc-221 –next-hop-address=10.3.0.40 –description=f5_cloud_failover_labels={"f5_cloud_failover_label":"labuser49"}

  • Route name: labuserx where x is your labuserid.

  • Label the description in the route with f5_cloud_failover_labels

    f5_cloud_failover_labels={“f5_cloud_failover_label”:”labuser49”} where x is your labuser number.

  • Network: internal-vpc-221

  • Destination IP - this will be a 10.1.x.x/29 network that will be unique to each student (see deploying GDM) template in lab1.

  • Next Hop: will be an IP address that is an internal self IP address on one of the instances that you deployed in lab1. The next HOP is the selfIP on the active Unit

image019

4.2.3. Task – Test

  • Test

Force the active unit to standby while tailing

  • tail –f /var/log/restnoded/restnoded.log on both machines.

You should see something like the following in the log files.:

| Sat, 18 Jan 2020 19:28:35 GMT - info: [f5-cloud-failover] Performing failover - execute
| Sat, 18 Jan 2020 19:28:36 GMT - info: [f5-cloud-failover] Performing Failover - discovery
| Sat, 18 Jan 2020 19:28:37 GMT - info: [f5-cloud-failover] Performing Failover - update
| Sat, 18 Jan 2020 19:28:42 GMT - info: [f5-cloud-failover] Update routes successful.
| Sat, 18 Jan 2020 19:28:43 GMT - info: [f5-cloud-failover] Disassociate NICs successful.
| Sat, 18 Jan 2020 19:28:49 GMT - info: [f5-cloud-failover] Associate NICs successful.
| Sat, 18 Jan 2020 19:29:07 GMT - info: [f5-cloud-failover] Updated forwarding rules successfully
| Sat, 18 Jan 2020 19:29:07 GMT - info: [f5-cloud-failover] Failover complete

Also you should be able to observe the route that you created and see that the “next hop” value has changed to the selfIP on the other Big-IP.

4.3. The lab is now Complete.