### Install Java Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/test/README.md Installs OpenJDK 8 on Ubuntu instances. This is a prerequisite for running certain services. ```bash apt update apt install openjdk-8-jdk -y ``` -------------------------------- ### Start Node-Inspector Process Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/contributing/node_inspector_profiling_as3.md Start the Node-Inspector process, specifying the web port and host. This command should be run after enabling debug mode and installing Node-Inspector. ```bash f5-rest-node /usr/lib/node_modules/node-inspector/bin/inspector.js --web-port=8080 --web-host=[big-ip-address] & ``` -------------------------------- ### Example: GSLB Monitor for MySQL Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Demonstrates configuring a GSLB Monitor of type MySQL. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_GSLB": { "class": "GSLB", "My_MySQL_Monitor": { "class": "GSLB_Monitor", "monitorType": "mysql", "destinationPort": 3306 } } } } ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/contributing/process_local_doc_build.md Install all required Python packages listed in 'requirements.txt' into the active virtual environment. ```bash pip install -r requirements.txt ``` -------------------------------- ### Example: Ping Access Profile Configuration Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Illustrates the configuration of a Ping Access Profile. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_Application": { "class": "Application", "My_Ping_Access_Profile": { "class": "Profile_Ping_Access", "agentProperties": { "fullPath": "/Common/my-ping-access-agent-properties" } } } } } ``` -------------------------------- ### Example: Ping Access Agent Properties Configuration Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Demonstrates the configuration of Ping Access Agent Properties. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_Application": { "class": "Application", "My_Ping_Access_Agent_Properties": { "class": "Profile_Ping_Access_Agent_Properties", "oauthClientId": "my-oauth-client-id", "oauthClientSecret": "my-oauth-client-secret" } } } } ``` -------------------------------- ### Example: GSLB Monitor for SIP Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Shows the configuration of a GSLB Monitor of type SIP. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_GSLB": { "class": "GSLB", "My_SIP_Monitor": { "class": "GSLB_Monitor", "monitorType": "sip", "destinationPort": 5060 } } } } ``` -------------------------------- ### Example: Ping Access Profile for HTTP Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Illustrates the configuration of a Ping Access Profile for HTTP services. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_Application": { "class": "Application", "My_Ping_Access_Profile_HTTP": { "class": "Profile_Ping_Access", "agentProperties": { "fullPath": "/Common/my-ping-access-agent-properties-http" } } } } } ``` -------------------------------- ### Example: GSLB Monitor for LDAP Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Illustrates configuring a GSLB Monitor of type LDAP. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_GSLB": { "class": "GSLB", "My_LDAP_Monitor": { "class": "GSLB_Monitor", "monitorType": "ldap", "destinationPort": 389 } } } } ``` -------------------------------- ### Endpoint Policy with Persist Actions Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/declarations/application-security.rst This example demonstrates an Endpoint policy that includes various Persist actions. It creates a partition, an Endpoint policy, and an Endpoint policy rule with examples of each Persist action. ```json { "class": "ADC", "schemaVersion": "3.11.0", "id": "Example_Endpoint_Policy", "label": "Example Endpoint Policy", "remark": "Example Endpoint Policy with Persist actions.", "tenant": { "class": "Tenant", "Example_Endpoint_Policy": { "class": "Tenant", "endpointPolicies": { "testPolicy": { "class": "Endpoint_Policy", "rules": { "rule1": { "class": "Endpoint_Policy_Rule", "conditions": [ { "all": [ { "host": "example.com" } ] } ], "actions": [ { "persist": { "method": "carp" } }, { "persist": { "method": "cookie-insert", "cookieName": "myCookie" } }, { "persist": { "method": "cookie-rewrite", "cookieName": "myCookie" } }, { "persist": { "method": "disable" } }, { "persist": { "method": "source-address" } }, { "persist": { "method": "cookie-hash", "cookieName": "myCookie" } }, { "persist": { "method": "cookie-passive", "cookieName": "myCookie" } }, { "persist": { "method": "destination-address" } }, { "persist": { "method": "hash" } }, { "persist": { "method": "universal", "mask": "0xFFFFFF00", "timeout": 300, "cookieName": "myCookie" } } ] } } } } } } } ``` -------------------------------- ### Create FTP Monitor Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/declarations/health-monitors.rst This example demonstrates how to create an FTP monitor in an AS3 declaration. ```json { "class": "ADC", "schemaVersion": "3.0.0", "id": "example-ftp-monitor", "controls": { "class": "Controls", "logLevel": "info" }, "tenant": { "class": "Tenant", "test_ftp_monitor": { "class": "Application", "template": "http_wan_monitor", "monitor_ftp": { "class": "Monitor", "monitorType": "ftp", "interval": 5, "timeout": 3, "username": "anonymous", "password": "anonymous@example.com" } } } } ``` -------------------------------- ### UDP Virtual Service Example Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/declarations/non-http-services.rst Example for a UDP DNS load balancer service. Creates a partition, a UDP virtual server on port 53, and a pool monitored by ICMP. ```json { "class": "AS3", "action": "deploy", "persist": true, "declaration": { "schemaVersion": "3.20.0", "class": "Application", "Sample_non_http_01": { "class": "Tenant", "service": { "class": "Service_UDP", "virtualAddresses": [ "192.168.1.1" ], "port": 53, "pool": "Pool1" }, "Pool1": { "class": "Pool", "monitors": [ "icmp" ], "members": [ { "serviceMember": "10.10.10.10:53" } ] } } } } ``` -------------------------------- ### Example: HTTP Service with Ping Access Profile Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Configures an HTTP service class with the 'profilePingAccess' schema. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_Application": { "class": "Application", "My_Service_HTTP": { "class": "Service_HTTP", "virtualAddresses": [ "10.10.10.10" ], "profilePingAccess": { "fullPath": "/Common/my-ping-access-profile" } } } } } ``` -------------------------------- ### Install BIG-IP AS3 RPM using cURL Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/userguide/installation.rst After uploading the RPM package, use this cURL command to initiate the installation of BIG-IP AS3 on the BIG-IP system. This command assumes the RPM has already been successfully uploaded. ```shell curl -k -u $CREDS https://$IP/mgmt/shared/iapp/packages/$FN ``` -------------------------------- ### Example: GSLB Monitor for SMTP Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Demonstrates configuring a GSLB Monitor of type SMTP. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_GSLB": { "class": "GSLB", "My_SMTP_Monitor": { "class": "GSLB_Monitor", "monitorType": "smtp", "destinationPort": 25 } } } } ``` -------------------------------- ### Example: HTTPS Service with Ping Access Profile Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Configures an HTTPS service class with the 'profilePingAccess' schema. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_Application": { "class": "Application", "My_Service_HTTPS": { "class": "Service_HTTPS", "virtualAddresses": [ "10.10.10.10" ], "profilePingAccess": { "fullPath": "/Common/my-ping-access-profile" } } } } } ``` -------------------------------- ### Install Docker Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/test/README.md Installs Docker CE on Ubuntu. Ensure you follow the official Docker installation guide for your specific Ubuntu version. ```bash apt update apt -y install apt-transport-https ca-certificates curl gnupg lsb-release curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null apt update apt -y install docker-ce docker-ce-cli containerd.io ``` -------------------------------- ### Example: GSLB Virtual Server with Minimum Monitor Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Shows how to configure minimum monitor support for GSLB Virtual Server classes. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_GSLB": { "class": "GSLB", "My_Virtual_Server": { "class": "GSLB_Virtual_Server", "destinationPort": 80, "minimumMonitors": 2 } } } } ``` -------------------------------- ### Verify BIG-IP AS3 Installation Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/userguide/installation.rst Send a GET request to the /info endpoint to confirm a successful installation of BIG-IP AS3. This should return the version details of the installed AS3 package. ```json { "version": "3.8.0", "release": "2", "schemaCurrent": "3.8.0", "schemaMinimum": "3.0.0" } ``` -------------------------------- ### Use Existing FTP and SIP Profiles Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/declarations/profiles.rst This example shows how to reference existing FTP and SIP profiles in a declaration. It creates virtual servers and assigns these profiles. ```json { "class": "ADC", "schemaVersion": "3.0.0", "id": "example-using-ftp-sip-profiles", "label": "Using FTP and SIP Profiles", "remark": "Example of using existing FTP and SIP profiles", "Sample_profile_03": { "class": "Tenant", "service": { "class": "Service_TCP", "virtualAddresses": [ "10.10.10.7" ], "description": "A1", "profileSIP": { "class": "Profile_SIP", "name": "testSIP" }, "profileFTP": { "class": "Profile_FTP", "name": "testFTP" } }, "service2": { "class": "Service_TCP", "virtualAddresses": [ "10.10.10.8" ], "description": "A2", "profileSIP": { "class": "Profile_SIP", "name": "testSIP" }, "profileFTP": { "class": "Profile_FTP", "name": "testFTP" } } } } ``` -------------------------------- ### Get BIG-IP AS3 Info Source: https://context7.com/f5networks/f5-appsvcs-extension/llms.txt Retrieves version and schema information for the installed BIG-IP AS3 instance using a GET request to the /info endpoint. ```bash curl -sku admin:password \ https://192.0.2.1/mgmt/shared/appsvcs/info \ -H 'Content-Type: application/json' # Response: # { # "version": "3.56.0", # "release": "10", # "schemaCurrent": "3.56.0", # "schemaMinimum": "3.0.0" # } ``` -------------------------------- ### Configure Client and Server SSL Profiles with Forward Proxy Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/declarations/tls-encryption.rst This example demonstrates setting up Client and Server SSL profiles with forward proxy and forward proxy bypass enabled. It includes a virtual server that utilizes these profiles. ```json { "class": "ADC", "schemaVersion": "3.0.0", "id": "example", "AS3_Tenant": { "class": "Tenant", "AS3_App": { "class": "Application", "service": { "class": "Service_HTTP", "virtualAddresses": [ "192.168.1.1" ], "profileHTTP": [ "http" ], "tlsServer": { "bigip": "/Common/TLS_Server" }, "tlsClient": { "bigip": "/Common/TLS_Client" } } } } } ``` -------------------------------- ### AS3 GET Declaration Example Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/as3-api.rst Shows the structure of a BIG-IP AS3 declaration retrieved via a GET request. This is the base configuration that PATCH operations modify. ```bash "declaration": { "tenant1": { "app1": { ... }, "app2": { ... } }, "tenant2": { "app1": { ... }, "app2": { ... } } } ``` -------------------------------- ### Build Documentation with Makefile Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/contributing/process_local_doc_build.md Execute the 'make html' command to build the project documentation in HTML format. This is the primary command for generating docs. ```bash make html ``` -------------------------------- ### AS3 Task Endpoint Record Example Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/as3-api.rst An example of the record format returned by GET requests to the /task endpoint, showing task details such as ID, results, and the associated declaration. ```json { "id": "13fa9776-aba2-48b8-853d-bf47687662fa", "results": [{ "message": "success", "tenant": "Gather_test", "host": "localhost", "runTime": 727, "code": 200 } ], "declaration": { "class": "ADC", "schemaVersion": "3.0.0", "id": "basic-ADC-declaration", "controls": { "class": "Controls", "trace": true, "logLevel": "debug", "archiveTimestamp": "2019-02-25T23:11:04.117Z" }, "Gather_test": { "class": "Tenant", "Tenant1": { "class": "Application", "template": "http", "serviceMain": { "class": "Service_HTTP", "virtualAddresses": [ "10.0.1.20" ], "pool": "web_pool" }, "web_pool": { "class": "Pool", "monitors": [ "http" ], "members": [{ ``` -------------------------------- ### Terraform Initialization Output Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/test/common/env/terraform/plans/azure/README.md This output indicates a successful Terraform initialization, including backend setup and provider plugin installation. It confirms that Terraform is ready to manage your Azure infrastructure. ```bash Initializing the backend... Initializing provider plugins... - Finding latest version of hashicorp/template... - Finding latest version of hashicorp/random... - Finding hashicorp/azurerm versions matching "~> 2.29"... - Installing hashicorp/template v2.2.0... - Installed hashicorp/template v2.2.0 (signed by HashiCorp) - Installing hashicorp/random v3.1.0... - Installed hashicorp/random v3.1.0 (signed by HashiCorp) - Installing hashicorp/azurerm v2.75.0... - Installed hashicorp/azurerm v2.75.0 (signed by HashiCorp) Terraform has been successfully initialized! ``` -------------------------------- ### Predefined Persistence Method Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/declaration-purpose-function.rst This example shows how to specify a predefined persistence method for a virtual server using a simple string value. ```json "persistenceMethods": [ "source-address" ] ``` -------------------------------- ### Initialize Terraform Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/test/common/env/terraform/plans/openstack/README.md Initialize Terraform in the specified directory. This downloads provider plugins and sets up the backend. ```bash terraform init ``` -------------------------------- ### POST /declare/{tenant} Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/as3-api.rst Starting with BIG-IP AS3 3.14.0, you have the option of using POST to the /declare endpoint with a specific tenant in the URI (for example .../declare/tenant1). This only updates the tenant you specified, even if there are other tenants in the declaration. This can be useful in some automation scenarios involving AS3. ```APIDOC ## POST /declare/{tenant} ### Description Updates a specific tenant in the declaration. ### Method POST ### Endpoint /mgmt/shared/appsvcs/declare/{tenant} ### Parameters #### Path Parameters - **tenant** (string) - Required - The name of the tenant to update. ### Request Example ```json { "action": "deploy" } ``` ### Response #### Success Response (200) Returns the updated tenant. ``` -------------------------------- ### Install BIG-IP AS3 RPM via cURL Source: https://context7.com/f5networks/f5-appsvcs-extension/llms.txt Installs the BIG-IP AS3 RPM package on a BIG-IP system using a series of cURL commands for uploading and installing. ```bash # Set variables FN=f5-appsvcs-3.56.0-10.noarch.rpm CREDS=admin:password IP=192.0.2.1 # 1. Upload the RPM LEN=$(wc -c $FN | awk 'NR==1{print $1}') curl -kvu $CREDS \ https://$IP/mgmt/shared/file-transfer/uploads/$FN \ -H 'Content-Type: application/octet-stream' \ -H "Content-Range: 0-$((LEN - 1))/$LEN" \ -H "Content-Length: $LEN" \ -H 'Connection: keep-alive' \ --data-binary @$FN # 2. Install the package DATA="{\"operation\":\"INSTALL\",\"packageFilePath\":\"/var/config/rest/downloads/$FN\"}" curl -kvu $CREDS \ "https://$IP/mgmt/shared/iapp/package-management-tasks" \ -H "Origin: https://$IP" \ -H 'Content-Type: application/json;charset=UTF-8' \ --data $DATA # 3. Verify installation curl -kvu $CREDS https://$IP/mgmt/shared/appsvcs/info # Expected: {"version":"3.56.0","release":"10","schemaCurrent":"3.56.0","schemaMinimum":"3.0.0"} ``` -------------------------------- ### Install BIG-IP AS3 RPM using cURL Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/userguide/installation.rst Use this cURL command to install the BIG-IP AS3 RPM package. Ensure you have cURL and jq installed on the system where you run this command. ```shell DATA="{\"operation\":\"INSTALL\",\"packageFilePath\":\"/var/config/rest/downloads/$FN\"}" curl -kvu $CREDS "https://$IP/mgmt/shared/iapp/package-management-tasks" -H "Origin: https://$IP" -H 'Content-Type: application/json;charset=UTF-8' --data $DATA ``` -------------------------------- ### Example: GSLB Server with Generic Host Type Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Illustrates configuring a GSLB Server with the 'generic-host' type, allowing multiple devices. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_GSLB": { "class": "GSLB", "My_Server": { "class": "GSLB_Server", "serverType": "generic-host", "devices": [ { "address": "192.168.1.1" }, { "address": "192.168.1.2" } ] } } } } ``` -------------------------------- ### iRule Declaration Example Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/understanding-the-json-schema.rst A simplified example showing how an iRule property can be defined directly as a string. ```json "iRule": "#this is my (meaningless) iRule" ``` -------------------------------- ### Example: Minimum Monitors for Pool Members Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/refguide/revision-history.rst Demonstrates the use of the 'all' value for minimum monitors on pool members. ```json { "class": "ABC", "schemaVersion": "1.32.0", "My_Tenant": { "class": "Tenant", "My_Application": { "class": "Application", "My_Pool": { "class": "Pool", "members": [ { "servicePort": 80, "serverAddresses": [ "192.168.1.1", "192.168.1.2" ] } ], "minimumMonitors": "all" } } } } ``` -------------------------------- ### Example HTML Profile with All Rules Source: https://github.com/f5networks/f5-appsvcs-extension/blob/main/docs/declarations/miscellaneous.rst Demonstrates an HTML profile referencing multiple HTML rules with diverse properties and values. ```json { "class": "ADC", "schemaVersion": "3.0.0", "id": "example_html_profile_with_all_rules", "label": "HTML Profile Example", "remark": "This is an example of an HTML profile with all rule types.", "htmlProfile": { "class": "HTML_Profile", "name": "htmlProfile", "rules": { "rule1": { "class": "HTML_Rule", "name": "rule1", "conditions": { "all": [ { "all": [ { "property": "uri", "contains": "/login" } ] } ] }, "actions": { "set": { "property": "html_snippet", "value": "