Configure Cloud Failover Extension

Once the Package is installed, you will use the REST endpoints to configure the Cloud Failover Extension.

  1. 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 Extension is running properly. You should receive an expect response of success after you have posted this declaration. For example:

    {
        "message": "success"
    }
    
  2. Copy one of the Example Declarations which best matches the configuration you want to use. See each provider section for additional details and requirements.

  3. Paste the declaration into your API client, and modify names and IP addresses as applicable. The key and value pair can be arbitrary but they must match the tags or labels that you assign to the infrastructure within the cloud provider. You can craft your declaration with any key and value pair as long as it matches what is in the configuration. For example:

    "failoverAddresses": {
            "scopingTags": {
              "i_am_an_arbitrary_key": "i_am_an_arbitrary_value"
            }
    
  4. POST to the URI https://<BIG-IP>/mgmt/shared/cloud-failover/declare

    Important

    You must POST the initial configuration to each device at least once for the appropriate system hook configuration to enable failover via CFE. After that, additional configuration operations can be sent to a single device.

  5. To stream the output of restnoded, use the tail command: tail –f /var/log/restnoded/restnoded.log


Components of the Declaration

This section provides more information about the options in the Quick Start example, and breaks down the example declaration into each class so you can understand the options when composing your declaration. The tables below the code snippets contain descriptions and options for the parameters included in the quickstart example only. If there is a default value, it is shown in bold in the Options column.

Base components

The first few lines of your declaration are a part of the base components and define top-level options. When you POST a declaration, depending on the complexity of your declaration and the modules you are provisioning, it may take some time before the system returns a success message.

1
2
3
4
5
6
7
8
 {
     "class": "Cloud_Failover",
     "environment": "azure",
     "externalStorage": {
          "scopingTags": {
              "f5_cloud_failover_label": "mydeployment"
         }
     },

Parameter Options Description/Notes
class Cloud_Failover Describes top-level Cloud Failover options. Do not change this value.
environment aws, azure, gcp This value defines which cloud environment you are using. See the AWS, Azure, and Google Cloud sections for more details.
externalStorage
This is a json object. Do not change this value.
scopingTags
These key/value pairs have to be the same as the tags you assign to the external storage in your cloud environment.

Failover Addresses

The next lines of the declaration set the failover addresses.

 9
10
11
12
13
14
15
   {
     "failoverAddresses": {
         "scopingTags": {
             "f5_cloud_failover_label": "mydeployment"
         }
     }
   }

Parameter Options Description/Notes
failoverAddresses
This is a json object. Do not change this value.
scopingTags
These key/value pairs have to be the same as the tags you assign to the addresses in your cloud environment.

Failover Routes

The next lines of the declaration sets the failover routes. The scoping address range filters down which route tables and which specific routes in the route table should have the next hop address updated in the event of a failover. The scoping address ranges should match the CIDR blocks of any routes that you want to follow the active BIG-IP.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
   {
     "failoverRoutes": {
                 "scopingTags": {
                         "f5_cloud_failover_label": "mydeployment"
                 },
                 "scopingAddressRanges": [
                         {
                                 "range": "192.168.1.0/24"
                         }
                 ],
                 "defaultNextHopAddresses": {
                         "discoveryType": "static",
                         "items": [
                                 "192.0.2.10",
                                 "192.0.2.11"
                         ]
                 }
     }
   }

Parameter Options Description/Notes
failoverRoutes
This is a json object. Do not change this value.
scopingTags
These key/value pairs have to be the same as the tags you assign to the addresses in your cloud environment.
scopingAddressRanges
A list of the destination routes to update in the event of failover.
defaultNextHopAddresses
This is a json object. Do not change this value.
discoveryType static, routeTag If static, the addresses that you provide in the items area of the declaration are the addresses you want to failover against. If you use routeTag, you do not need to list items, but you will need to add another tag to the route table in your cloud environment with the reserved key f5_self_ips. For example, f5_self_ips:192.0.2.10,192.0.2.11. See Route Failover Using Route Tags for an example declaration.
items
List the Self IP address of each instance. This is only required when discoveryType is static.

Endpoints

  • Info: use this endpoint to get information on CFE, such as the version number.
  • Reset: use this endpoint to reset the failover state file.
  • Trigger: use this endpoint to trigger failover.

For more information see the API Reference.


Note

To provide feedback on Cloud Failover Extension or this documentation, you can file a GitHub Issue.