F5Networks / f5-bigip-runtime-init

Apache License 2.0
14 stars 15 forks source link

F5 BIG-IP Runtime Init

Releases Issues

Contents

Introduction

F5 BIG-IP Runtime Init is a tool that aims to simplify startup scripts for BIG-IP Virtual Edition. It does this by providing a single convenient YAML (1.2 spec) or JSON-based configuration file, which

The result is a complete overlay deployment tool for configuring a BIG-IP instance. This allows us to extend our cloud solutions from native templates to other instance provisioning tools, such as Terraform and Ansible. For more information regarding sending startup scripts to BIG-IP VE, see VE documentation.

F5 BIG-IP Runtime Init

Overview

From a high-level, using this tool involves three steps:

Features

This repository includes both the BIG-IP Runtime Init source code and a self-extracting installer script for installing the main package.

The installer script will do the following:

Based on the content of the provided YAML or JSON configuration file, BIG-IP Runtime Init will do the following:

Prerequisites

Caveats and Limitations

Validated BIG-IP versions

F5 BIG-IP Runtime Init has been tested and validated with the following versions of BIG-IP:

BIG-IP Version Build Number
16.1.3.3 0.0.3
15.1.8.1 0.0.3
14.1.5.3 0.0.5

Newer versions are expected to work but have not been specifically tested.

Installer

The self-extracting installer accepts the following parameters:

--cloud  | -c                   : Specifies cloud provider name. Allowed values: (aws, azure or gcp)
--key    | -k                   : Provides location for GPG key used for verifying signature on RPM file
--skip-verify                   : Disables RPM signature verification
--toolchain-metadata-file-url   : Provides overriding delivery URL for toolchain extension metadata file
--skip-toolchain-metadata-sync  : Disables downloading automation toolchain metadata from the Internet
--telemetry-params              : Specifies telemetry parameters as key:value pairs; (key01:value01,key02:value02). For sending F5 additional usage data.

NOTE: Runtime Init can be installed generically on a cloud or environment not listed above by omitting the --cloud | -c parameter. For example, it can also be used in a VMware environment to install the F5 Automation Tool Chain packages and declarations. When omitted, Runtime Init's cloud specific integrations (runtime_parameters: type: secret and type: metadata ) will be disabled. See runtime_parameters section for details.

The installer also allows you to configure request retries to make the installation robust and tolerant to network instability. This can be done using the following environment variables:

Environment variable Description Default Value
HTTP_RETRY Number of retries before script will fail. 12
HTTP_RETRY_MAX_TIME The retry timer (in seconds) is reset before the first transfer attempt. 60
HTTP_MAX_TIME Maximum time (in seconds) that you allow the whole operation to take. 5

Examples:

Using --cloud parameter for basic Azure install:

 curl https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/f5-bigip-runtime-init-2.0.3-1.gz.run -o f5-bigip-runtime-init-2.0.3-1.gz.run && bash f5-bigip-runtime-init-2.0.3-1.gz.run -- '--cloud azure'

See Private Environments section below for more install examples.

Downloads

Self-extracting installer, RPMs, and file hashes are available from the following locations:

Cloud Type Location
All Self-extracting installer https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/f5-bigip-runtime-init-2.0.3-1.gz.run
All SHA256 https://github.com/f5networks/f5-bigip-runtime-init/releases/download/2.0.3/f5-bigip-runtime-init-2.0.3-1.gz.run.sha256
All RPM https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/rpms/f5-bigip-runtime-init-all-2.0.3-1-signed.noarch.rpm
All SHA256 https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/rpms/f5-bigip-runtime-init-all-2.0.3-1-signed.noarch.rpm.sha256
AWS RPM https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/rpms/f5-bigip-runtime-init-aws-2.0.3-1-signed.noarch.rpm
AWS SHA256 https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/rpms/f5-bigip-runtime-init-aws-2.0.3-1-signed.noarch.rpm.sha256
Azure RPM https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/rpms/f5-bigip-runtime-init-azure-2.0.3-1-signed.noarch.rpm
Azure SHA256 https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/rpms/f5-bigip-runtime-init-azure-2.0.3-1-signed.noarch.rpm.sha256
GCP RPM https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/rpms/f5-bigip-runtime-init-gcp-2.0.3-1-signed.noarch.rpm
GCP SHA256 https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/rpms/f5-bigip-runtime-init-gcp-2.0.3-1-signed.noarch.rpm.sha256
None RPM https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/rpms/f5-bigip-runtime-init-base-2.0.3-1-signed.noarch.rpm
None SHA256 https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/rpms/f5-bigip-runtime-init-base-2.0.3-1-signed.noarch.rpm.sha256

Configuration

The BIG-IP Runtime Init configuration consists of the following attributes:

Attribute Default Value Required Description
controls none No List of runtime controls settings.
pre_onboard_enabled none No List of commands to run that do not check if BIG-IP and MCPD are up and running. However, execution before BIG-IP is ready depends on cloud agent/download times/etc.
runtime_parameters none No List of runtime parameters to gather.
bigip_ready_enabled none No List of commands to run after BIG-IP and MCPD are up and running. Example: TMSH commands, misc optimizations, etc.
extension_packages none No List of iControl Lx packages to download and install.
extension_services none No List of iControl Lx declarations to configure.
post_onboard_enabled none No List of commands to run after sending iControl LX declarations.
post_hook none No Webhook to send upon completion.

Configuration Examples and Schema Documentation

A basic Runtime Init configuration file (YAML).

controls:
  logLevel: silly
  logFilename: /var/log/cloud/bigIpRuntimeInit.log
extension_packages:
  install_operations:
    - extensionType: do
      extensionVersion: 1.44.0
    - extensionType: as3
      extensionVersion: 3.51.0
    - extensionType: ts
      extensionVersion: 1.35.0
    - extensionType: fast
      extensionVersion: 1.25.0

See SCHEMA.md for complete schema documentation and /examples/runtime_configs for additional examples.

controls

Runtime Init provides a list of controls intended for tuning Runtime Init execution as well as helping with troubleshooting issues:

NOTE: These can also be set at runtime using an environment variable. For example:

export F5_BIGIP_RUNTIME_INIT_LOG_LEVEL=silly &&  f5-bigip-runtime-init --config-file /config/cloud/runtime-init-conf.yaml

Examples:

controls:
  logLevel: silly
  logFilename: /var/log/cloud/bigIpRuntimeInit.log
  logToJson: true
  extensionInstallDelayInMs: 60000

pre_onboard_enabled

Description: A list of commands that run without checking if BIG-IP and MCPD are up and running. Whether these commands are executed before or after BIG-IP is ready depends on external factors like cloud agent status, network latency, etc. For instance, when the Runtime-Init installer and/or other required files are baked directly into the BIG-IP image using the BIG-IP Image Generator, pre_onboard_enabled commands can run sufficiently early. However, in some clouds or scenarios, the files may take too long to download. In that case, these commands may need to be run earlier in the startup script itself to ensure they are applied before BIG-IP is ready.

Allowed types are inline, file and url.

Examples:

NOTE: Each command is executed independently from each other. For example, a bash variable in one command cannot be referenced by the following command. See the other command based attributes (ex. bigip_ready_enabled, post_onboard_enabled for more advanced command examples.

runtime_parameters

Description: A list of parameters discovered at run (or deploy) time which are substituted (using mustache handlebars) in subsequent eligible runtime attributes:

Parameters can be dependent on each other, so one parameter value can be used within another parameter (see examples below for more details).

Allowed types are storage, secret, tag, metadata, url and static.

bigip_ready_enabled

Description: List of commands to run after BIG-IP and MCPD are up and running. Example: TMSH commands, misc optimizations, etc.

Allowed types are inline, file and url.

Examples:

NOTE: Each command is executed in a separate shell context from each other. For example, a bash variable in one command cannot be referenced by the following command. For instance, in the example above, the command with the $INT_GW variable would not be able to render the $EXT_GW variable from command above it. For more examples, see the examples/runtime_configs directory.

extension_packages

Description: List of iControl Lx packages to download and install.

Allowed extensionTypes are do, as3, ts, fast and cfe.

Examples:

For more examples, see the examples/runtime_configs directory.

extension_services

Description: List of iControl Lx declarations to configure.

Allowed extensionTypes are do, as3, ts and cfe.

Allowed value types are inline and url.

Examples:

NOTE:

For more examples, see the examples/runtime_configs directory.

TIP:

post_onboard_enabled

Description: List of commands to run after sending iControl LX declarations.

Allowed types are inline, file and url.

Examples:

NOTE: Each command is executed independently from each other. For example, a bash variable in one command cannot be referenced by the following command. For more examples, see the examples/runtime_configs directory.

post_hook

Description: Webhook to send upon completion.

Examples:

post_hook:
  - name: example_webhook
    type: webhook
    url: https://webhook.site
    properties:
      optionalKey1: optional_value1
      optionalKey2: optional_value2

For more examples, see the examples/runtime_configs directory.

Usage Examples

Terraform

Terraform plans will generally consist of the following:

Azure snippet

In this snippet:

resource "azurerm_linux_virtual_machine" "vm" {
  name                  = "vm-${module.utils.env_unique_id}-bigip"
  resource_group_name   = azurerm_resource_group.rg.name
  location              = azurerm_resource_group.rg.location
  size                  = var.instance_size
  admin_username        = var.admin_username

  admin_ssh_key {
    username   = var.admin_username
    public_key = file(var.f5_ssh_publickey)
  }

 os_disk {
    caching              = "ReadWrite"
    storage_account_type = "Standard_LRS"
  }

  source_image_reference {
    publisher = var.publisher
    offer     = var.offer
    sku       = var.sku
    version   = var.bigip_version
  }

  plan {
    publisher = var.publisher
    product   = var.offer
    name      = var.sku
  }

  boot_diagnostics {
    storage_account_uri  = var.boot_diagnostics ? join(",", azurerm_storage_account.vm_sa.*.primary_blob_endpoint) : ""
  }

  network_interface_ids = [
      azurerm_network_interface.nic_mgmt.id, 
      azurerm_network_interface.nic_external.id, 
      azurerm_network_interface.nic_internal.id
  ]

  identity {
    type         = "UserAssigned"
    identity_ids = [azurerm_user_assigned_identity.user_identity.id]
  }

  custom_data = base64encode(templatefile("${path.module}/startup-script.tpl", {
    vault_name:         "key-vault-${module.utils.env_unique_id}-bigip",
    secret_id:          azurerm_key_vault_secret.adminsecret.name,
    package_url:        var.bigip_runtime_init_package_url,
    admin_username:     var.admin_username,
  }))

  tags = merge(var.global_tags, { Name="vm-${module.utils.env_unique_id}-bigip" })

}

The startup script is templatized in startup-script.tpl and sent using the VM's custom_data parameter. On BIG-IP versions 15.1+, Cloud-Init will execute this script directly. However, for earlier versions, azurerm_virtual_machine_extension is used to run it. See BIG-IP Cloud-Init documentation for more information.

The Terraform template for the startup script contains the following contents.

#!/bin/bash -x

# Send output to log file and serial console
mkdir -p  /var/log/cloud /config/cloud /var/config/rest/downloads
LOG_FILE=/var/log/cloud/startup-script.log
[[ ! -f $LOG_FILE ]] && touch $LOG_FILE || { echo "Run Only Once. Exiting"; exit; }
npipe=/tmp/$$.tmp
trap "rm -f $npipe" EXIT
mknod $npipe p
tee <$npipe -a $LOG_FILE /dev/ttyS0 &
exec 1>&-
exec 1>$npipe
exec 2>&1

# Download or Render BIG-IP Runtime Init Config
cat << 'EOF' > /config/cloud/runtime-init-conf.yaml
---
controls:
  logLevel: silly
  logFilename: /var/log/cloud/bigIpRuntimeInit.log
pre_onboard_enabled: []
runtime_parameters:
  - name: ADMIN_PASS
    type: secret
    secretProvider:
      environment: azure
      type: KeyVault
      vaultUrl: 'https://${vault_name}.vault.azure.net'
      secretId: ${secret_id}
  - name: HOST_NAME
    type: metadata
    metadataProvider:
      environment: azure
      type: compute
      field: name
  - name: SELF_IP_EXTERNAL
    type: metadata
    metadataProvider:
      environment: azure
      type: network
      field: ipv4
      index: 1
  - name: SELF_IP_INTERNAL
    type: metadata
    metadataProvider:
      environment: azure
      type: network
      field: ipv4
      index: 2
  - name: DEFAULT_GW
    type: metadata
    metadataProvider:
      environment: azure
      type: network
      field: ipv4
      index: 1
      ipcalc: first
  - name: MGMT_GW
    type: metadata
    metadataProvider:
      environment: azure
      type: network
      field: ipv4
      index: 0
      ipcalc: first
bigip_ready_enabled: []
extension_packages:
  install_operations:
    - extensionType: do
      extensionVersion: 1.44.0
      extensionHash: 3b05d9bcafbcf0b5b625ff81d6bab5ad26ed90c0dd202ded51756af3598a97ec
    - extensionType: as3
      extensionVersion: 3.51.0
      extensionHash: e151a9ccd0fd60c359f31839dc3a70bfcf2b46b9fedb8e1c37e67255ee482c0f
    - extensionType: ts
      extensionVersion: 1.35.0
      extensionHash: 839698d98a8651a90b3d509cde4b382338461a253878c9fd00c894699ef0e844
    - extensionType: fast
      extensionVersion: 1.25.0
      extensionHash: 434309179af405e6b663e255d4d3c0a1fd45cac9b561370e350bb8dd8b39761f
extension_services:
  service_operations:
    - extensionType: do
      type: inline
      value:
        schemaVersion: 1.0.0
        class: Device
        async: true
        label: Example 3NIC BIG-IP with Runtime-Init
        Common:
          class: Tenant
          My_DbVariables:
            class: DbVariables
            provision.extramb: 1000
            restjavad.useextramb: true
            ui.advisory.enabled: true
            ui.advisory.color: blue
            ui.advisory.text: BIG-IP VE Runtime Init Example
            config.allow.rfc3927: enable
            dhclient.mgmt: disable
          My_System:
            class: System
            hostname: '.local'
            cliInactivityTimeout: 1200
            consoleInactivityTimeout: 1200
            autoPhonehome: true
          My_Dns:
            class: DNS
            nameServers:
              - 168.63.129.16
          My_Ntp:
            class: NTP
            servers:
              - 0.pool.ntp.org
            timezone: UTC
          My_Provisioning:
            class: Provision
            ltm: nominal
          admin:
            class: User
            userType: regular
            partitionAccess:
              all-partitions:
                role: admin
            password: '{{{ ADMIN_PASS }}}'
            shell: bash
          ${admin_username}:
            class: User
            userType: regular
            partitionAccess:
              all-partitions:
                role: admin
            password: '{{{ ADMIN_PASS }}}'
            shell: bash
          external:
            class: VLAN
            tag: 4094
            mtu: 1500
            interfaces:
              - name: '1.1'
                tagged: false
          internal:
            class: VLAN
            tag: 4093
            mtu: 1500
            interfaces:
              - name: '1.2'
                tagged: false
          default:
            class: ManagementRoute
            gw: ''
            network: default
          dhclient_route1:
            class: ManagementRoute
            gw: ''
            network: 168.63.129.16/32
          azureMetadata:
            class: ManagementRoute
            gw: ''
            network: 169.254.169.254/32
          external-self:
            class: SelfIp
            address: ''
            vlan: external
            allowService: default
            trafficGroup: traffic-group-local-only
          internal-self:
            class: SelfIp
            address: ''
            vlan: internal
            allowService: default
            trafficGroup: traffic-group-local-only
          defaultRoute:
            class: Route
            gw: ''
            network: default
            mtu: 1500
post_onboard_enabled: []

EOF

# Download
for i in {1..30}; do
    curl -fv --retry 1 --connect-timeout 5 -L "${package_url}" -o "/var/config/rest/downloads/f5-bigip-runtime-init.gz.run" && break || sleep 10
done
# Install
bash /var/config/rest/downloads/f5-bigip-runtime-init.gz.run -- "--cloud azure"
# Run
f5-bigip-runtime-init --config-file /config/cloud/runtime-init-conf.yaml

NOTE:

For similar AWS and GCP examples, see the examples/terraform directory.

Azure (ARM Template) snippet

Download BIG-IP Runtime Config from URL

"commandToExecute": "concat('mkdir -p /config/cloud; mkdir -p /var/log/cloud/azure; cp $(ls -v | tail -n1)/runtime-init-conf.yaml /config/cloud/runtime-init-conf.yaml; curl -L https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/f5-bigip-runtime-init-2.0.3-1.gz.run -o f5-bigip-runtime-init-2.0.3-1.gz.run && bash f5-bigip-runtime-init-2.0.3-1.gz.run -- ', variables('singleQuote'), '--cloud azure', variables('singleQuote'), ' 2>&1')",
"fileUris": [
  "https://example.com/runtime-init-conf.yaml"
]

Inline BIG-IP Runtime Config

"commandToExecute": "[concat('mkdir -p /config/cloud; mkdir -p /var/log/cloud/azure; echo -e ', variables('singleQuote'), parameters('runtimeConfig'), variables('singleQuote'), ' > /config/cloud/runtime-init-conf.yaml; curl -L https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.3/dist/f5-bigip-runtime-init-2.0.3-1.gz.run -o f5-bigip-runtime-init-2.0.3-1.gz.run; bash f5-bigip-runtime-init-2.0.3-1.gz.run -- ', variables('singleQuote'), '--cloud azure', variables('singleQuote'), ' 2>&1; f5-bigip-runtime-init --config-file /config/cloud/runtime-init-conf.yaml 2>&1')]"

Native Template Examples

For more native template examples, see:

For example runtime-init configurations, go to the /bigip-configurations directory in a solution folder. For example, see failover examples in examples/failover/bigip-configurations.

Using a Proxy Server

F5 BIG-IP Runtime Init supports making HTTP/HTTPS requests through a proxy server for most features. It looks at the BIG-IP proxy configuration defined in system db variables. These must be set before installing Runtime Init and can be viewed by running this command: tmsh list sys db proxy.

Feature Uses Proxy? Notes
pre_onboard_enabled Yes* Must manually specify proxy for inline type commands (curl, etc.)
runtime_parameters Yes Metadata type runtime parameters do not use the proxy.
bigip_ready_enabled Yes* Must manually specify proxy for inline type commands.
extension_packages Yes None
extension_services Yes* Resources using external URLs must be dowloaded locally via runtime parameters and referenced as file URLs.
post_onboard_enabled Yes* Must manually specify proxy for inline type commands.
post_hook Yes None
telemetry Yes None

Configuring BIG-IP proxy settings via startup script:

# Set REST performance variables immediately before MCPD starts
/usr/bin/setdb provision.extramb 1000 || true
/usr/bin/setdb provision.restjavad.extramb 1384 || /usr/bin/setdb restjavad.useextramb true || true
/usr/bin/setdb iapplxrpm.timeout 300 || true
/usr/bin/setdb icrd.timeout 180 || true
/usr/bin/setdb restjavad.timeout 180 || true
/usr/bin/setdb restnoded.timeout 180 || true

# Set proxy variables
/usr/bin/setdb proxy.host 192.0.2.10
/usr/bin/setdb proxy.port 3128
/usr/bin/setdb proxy.username proxyuser
/usr/bin/setdb proxy.password apassword
/usr/bin/setdb proxy.protocol https

# Download
for i in {1..30}; do
    curl -fv --retry 1 --connect-timeout 5 --proxy https://192.0.2.10:3128 --proxy-user proxyuser:apassword -L "${package_url}" -o "/var/config/rest/downloads/f5-bigip-runtime-init.gz.run" && break || sleep 10
done

# Install
bash /var/config/rest/downloads/f5-bigip-runtime-init.gz.run -- "--cloud aws --telemetry-params templateName:f5-bigip-runtime-init/examples/terraform/aws/main.tf"

# Run
f5-bigip-runtime-init --config-file /config/cloud/runtime-init-conf.yaml

Private Environments

Some environments may not allow BIG-IPs to have any access to the Internet. In these cases, startup scripts can be customized to download packages and/or config files from locally hosted URLs. By default, the installer makes calls to the Internet to download a GPG key to verify RPM signatures, find the latest Automation Tool Chain packages, and send usage data. To disable calls to the Internet, you can use the examples below:

Disable Internet Calls from the Installer

Example (secure) of hosting the GPG key locally and disabling checking for latest Automation Tool Chain packages.

curl https://myprivatehost/f5-bigip-runtime-init-2.0.3-1.gz.run -o f5-bigip-runtime-init-2.0.3-1.gz.run && bash f5-bigip-runtime-init-2.0.3-1.gz.run -- '--cloud aws --key https://mylocalhost/gpg.key --skip-toolchain-metadata-sync'

Example (thisisinsecure) of skipping downloading the GPG key entirely and checking for latest Automation Tool Chain packages, using a local copy of the metadata instead.

curl https://myprivatehost/f5-bigip-runtime-init-2.0.3-1.gz.run -o f5-bigip-runtime-init-2.0.3-1.gz.run -o f5-bigip-runtime-init-2.0.3-1.gz.run && bash f5-bigip-runtime-init-2.0.3-1.gz.run -- '--cloud aws --skip-verify --skip-toolchain-metadata-sync'

Disable Internet Calls from the Command

To disable the f5-bigip-runtime-init command from sending usage reporting, you can include the '--skip-telemetry' parameter.

f5-bigip-runtime-init -c /config/cloud/runtime-init-conf.yaml --skip-telemetry

If using the extension_services feature to send Declarative Onboarding declarations, you can alternatively set the autoPhonehome property to disabled. Using the autoPhonehome property will prevent BIG-IP from sending telemetry data globally. For more information on how to disable Automatic Phone Home, see this Overview of the Automatic Update Check and Automatic Phone Home features.

Here is an example of the payload that is sent by F5 TEEM


"telemetryRecords": [
                {
                    "platform": "BIG-IP",
                    "platformVersion": "14.1.4.6",
                    "nicConfiguration": "multi",
                    "cloudAccountId": "<REDACTED>",
                    "regkey": "<REDACTED>",
                    "platformDetails": {
                        "platform": "BIG-IP",
                        "platformVersion": "14.1.4.6",
                        "platformId": "Z100",
                        "system": {
                            "cpuCount": 4,
                            "memory": 15753,
                            "diskSize": 77824
                        },
                        "nicCount": 2,
                        "modules": {
                            "ltm": "nominal"
                        },
                        "packages": {},
                        "environment": {
                            "pythonVersion": "Python 2.7.5",
                            "pythonVersionDetailed": "2.7.5 (default, Aug 12 2021, 23:00:20) \n[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]",
                            "nodeVersion": "v6.9.1",
                            "libraries": {
                                "ssh": "OpenSSH_7.4p1, OpenSSL 1.0.2s-fips  28 May 2019"
                            }
                        }
                    },
                    "templateInfo": {
                        "install": "All operations finished successfully",
                        "templateName": "bigip-standalone.yaml",
                        "templateVersion": "v1.1.0.0",
                        "nicCount": 2,
                        "cloud": "aws",
                        "region": "us-west-2",
                        "localization": "en-US"
                    },
                    "product": {
                        "version": "1.3.2",
                        "locale": "en-US",
                        "installDate": "2021-11-18T19:29:45.486Z",
                        "installationId": "f4573f4e-dcd7-4a91-8a0a-3704fca5255f",
                        "installedComponents": {
                            "commander": "^4.1.0",
                            "winston": "^3.3.3",
                            "get-user-locale": "^1.4.0",
                            "uuid": "^8.2.0",
                            "@f5devcentral/f5-teem": "^1.4.6",
                            "js-yaml": "^3.13.1",
                            "mustache": "^4.0.0",
                            "request": "^2.88.0",
                            "jmespath": "^0.15.0",
                            "netmask": "^2.0.2",
                            "lodash.where": "^3.1.0"
                        }
                    },
                    "operation": {
                        "clientRequestId": "0a1bad90-2feb-4eb8-afd6-c851b3b4ffce",
                        "rawCommand": "f5-runtime-init -c /config/cloud/onboard_config.yaml",
                        "pre_onboard_enabled": {
                            "commands": 1
                        },
                        "runtime_params": {
                            "secrets": 3,
                            "metadata": 6
                        },
                        "vaults": {
                            "aws": 1,
                            "azure": 0,
                            "gcp": 0,
                            "hashicorp": 2
                        },
                        "userAgent": "f5-bigip-runtime-init/1.3.2",
                        "extension_packages": {
                            "do": "1.23.0",
                            "fast": "1.11.0",
                            "ilx": "0.1.0"
                        },
                        "extension_services": {
                            "do": true,
                            "as3": true
                        },
                        "post_onboard_enabled": {
                            "commands": 3,
                            "postHooks": 0
                        },
                        "result": "SUCCESS",
                        "resultSummary": "All operations finished successfully",
                        "startTime": "2021-11-18T19:29:43.325Z",
                        "endTime": "2021-11-18T19:29:43.387Z",
                        "installParams": [
                            {
                                "key": "templateName",
                                "value": "v1.1.0.0/examples/modules/bigip-standalone/bigip-standalone.yaml"
                            }
                        ]
                    }
                }
            ]

Troubleshooting

Set Recommended System Database Variables

F5 recommends adding the following to the beginning of your startup scripts to ensure that the iControl REST framework has the necessary resources to successfully provision the BIG-IP instance. These settings must be applied as early as possible in the boot process:

/usr/bin/setdb provision.extramb 1000 || true
/usr/bin/setdb provision.restjavad.extramb 1384 || /usr/bin/setdb restjavad.useextramb true || true
/usr/bin/setdb iapplxrpm.timeout 300 || true
/usr/bin/setdb icrd.timeout 180 || true
/usr/bin/setdb restjavad.timeout 180 || true
/usr/bin/setdb restnoded.timeout 180 || true

Note: Not all of these settings apply to all versions of BIG-IP, so the examples above will return true if the command is unsuccessful. F5 recommends using the BIG-IP versions listed in the Validated BIG-IP versions table above for best results.

Log to the Serial Console

F5 recommends adding the following to the beginning of your startup scripts to log the Serial Console as well as provide a consistent logging location.

mkdir -p  /var/log/cloud
LOG_FILE=/var/log/cloud/startup-script.log
npipe=/tmp/$$.tmp
trap "rm -f $npipe" EXIT
mknod $npipe p
tee <$npipe -a $LOG_FILE /dev/ttyS0 &
exec 1>&-
exec 1>$npipe
exec 2>&1

Some environments have additional resource requirements for the instance to enable the Serial Console/Logging. For instance, see this Azure example.

If the BIG-IP or Service is not reachable, first review the console logs (see your cloud provider for details) for any errors.

If possible, try to log in to the BIG-IP instance via SSH (mgmt interface) to examine the logs. Serial console login may also be possible but only for partial onboarding successes where passwords were configured successfully (ex. with Declarative Onboarding). To verify the BIG-IP deployment, perform the following steps:

BIG-IP Automation Toolchain Components

Help with troubleshooting individual Automation Toolchain components can be found at F5's Public Cloud Docs:

Extension metadata file

BIG-IP Runtime Init uses the "extension metadata" file (JSON document) to identify package delivery URL for each BIG-IP Automation Toolchain extension. Each Runtime Init build includes an extension metadata file and it is stored under the following directory: src/lib/bigip/toolchain/toolchain_metadata.json

The latest "extension metadata" file is published on F5 CDN under the following location: https://cdn.f5.com/product/cloudsolutions/f5-extension-metadata/latest/metadata.json As a part of the installation workflow, by default, Runtime Init will attempt to fetch the latest available version of the extension metadata from the Internet and will replace the built-in file; however, providing --skip-toolchain-metadata-sync flag to the Runtime Init installation allows you to skip extension metadata sync and fall back to the built-in extension metadata file.

In a situation, when custom extension_metadata file needs to be used, Runtime Init installation allows to override delivery URL for the "extension metadata" file using the --toolchain-metadata-file-url parameter. See the Installer section for more details.

Documentation

For more information on BIG-IP cloud solutions, including manual configuration procedures for some deployment scenarios, see F5's Public Cloud Docs.

Getting Help

The example declarations in this document are intended to provide reference onboarding configurations for BIG-IP Virtual Editions. Read more about Support Policies.

Filing Issues

If you find an issue, we would love to hear about it.

Copyright

Copyright 2014-2022 F5 Networks Inc.

License

Apache V2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.