{ "info": { "_postman_id": "cf8ac817-f367-4eb8-bd84-88b86c7ed299", "name": "F5 Programmability: Class 1", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Lab 1.2 - API Authentication & 'example' Templates", "item": [ { "name": "Step 1: HTTP BASIC Authentication", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:ltm:ltmcollectionstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "auth": { "type": "basic", "basic": [ { "key": "username", "value": "", "type": "string" }, { "key": "password", "value": "", "type": "string" }, { "key": "showPassword", "value": false, "type": "boolean" } ] }, "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "ltm" ] } }, "response": [] }, { "name": "Step 2: Retrieve Authentication Token", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"token.userName\", ", " \"value\":\"admin\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"username\":\"\",\n \"password\":\"\",\n \"loginProviderName\":\"tmos\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/authn/login", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "authn", "login" ] } }, "response": [] }, { "name": "Step 3: Verify Authentication Works", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"items\", ", " \"value\":\"0\",", " \"op\":\">=\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/authz/tokens", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "authz", "tokens" ] } }, "response": [] }, { "name": "Step 4: Set Authentication Token Timeout", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"timeout\", ", " \"value\":\"36000\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"timeout\":\"36000\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/authz/tokens/{{bigip_a_auth_token}}", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "authz", "tokens", "{{bigip_a_auth_token}}" ] } }, "response": [] }, { "name": "Step 5: Get 'example' of a Pool Resource", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\", ", " \"value\":\"tm:ltm:pool:poolcollectionstate\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/pool/example", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "ltm", "pool", "example" ] } }, "response": [] } ] }, { "name": "Lab 1.3 - Install DO onto BIG-IP", "item": [ { "name": "Step 1: Get Installed iControl LX Extensions", "event": [ { "listen": "test", "script": { "id": "5e098299-9d1c-4d54-b189-b8d35751507c", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\",", " \"value\":\"shared:iapp:installed-packages:installedpackagecollectionstate\",", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/iapp/installed-packages", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "iapp", "installed-packages" ] } }, "response": [] }, { "name": "Step 2: Upload DO Extension RPM", "event": [ { "listen": "test", "script": { "id": "bb38c6e9-0658-458c-be36-3f95d74c9a1c", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"localFilePath\",", " \"value\":\"/f5-dec..*.noarch.rpm$/i\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "id": "ec269764-4137-4028-b375-4e6471b42ff9", "exec": [ "// Create the value for the Content-Range header based on the file size of the RPM", "// https://devcentral.f5.com/articles/demystifying-icontrol-rest-part-5-transferring-files", "", "var fileLen = parseInt(pm.environment.get(\"do_filelen\"));", "pm.globals.set(\"_do_content_range\",\"0-\" + (fileLen - 1) + \"/\" + fileLen);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/octet-stream" }, { "key": "Content-Range", "value": "{{_do_content_range}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Connection", "value": "keep-alive" } ], "body": { "mode": "file", "file": {} }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/file-transfer/uploads/{{do_filename}}", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "file-transfer", "uploads", "{{do_filename}}" ] } }, "response": [] }, { "name": "Step 3: Create DO Extension Install Task", "event": [ { "listen": "test", "script": { "id": "a4da1ae5-cea8-48aa-b803-b45a0086508a", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"status\",", " \"value\":\"CREATED\"", " } ", " ];", "var populate_vars = [", " { ", " \"name\":\"_do_install_uuid\",", " \"value\":\"id\"", " } ", " ];", " ", "f5_populate_env_vars(populate_vars);", "f5_check_response(check_vals);", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"operation\":\"INSTALL\",\n \"packageFilePath\":\"/var/config/rest/downloads/{{do_filename}}\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/iapp/package-management-tasks", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "iapp", "package-management-tasks" ] } }, "response": [] }, { "name": "Step 4: Get DO Install Task Status", "event": [ { "listen": "test", "script": { "id": "2cfb16a5-d7b6-4580-9428-93f10b49d6ad", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"status\",", " \"value\":\"FINISHED\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/iapp/package-management-tasks/{{_do_install_uuid}}", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "iapp", "package-management-tasks", "{{_do_install_uuid}}" ] } }, "response": [] }, { "name": "Step 5: Get DO State", "event": [ { "listen": "test", "script": { "id": "72146941-5edf-430b-b687-8e6c3e0b5ecd", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"version\",", " \"value\":\"/^3./i\",", " \"op\":\"regex\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Connection", "value": "keep-alive" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/declarative-onboarding", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "declarative-onboarding" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "6d75e112-93b6-45bb-b6f6-3a70d6724a0a", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "16cc20b4-c98c-4913-8670-65caacab136c", "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Lab 1.4 - Onboarding with DO", "item": [ { "name": "Step 1: Deploy DO Declaration", "event": [ { "listen": "test", "script": { "id": "07326918-f6f6-4484-aea2-74ffb12401b5", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"result.code\",", " \"value\":202", " } ", " ];", " ", "f5_check_response(check_vals);", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"schemaVersion\": \"1.2.0\",\n \"class\": \"Device\",\n \"async\": \"true\",\n \"label\": \"DO declaration for BIG-IP-A\",\n \"Common\": {\n \"class\": \"Tenant\",\n \"hostname\": \"bigip-a.f5.local\",\n \"myProvisioning\": {\n \"class\": \"Provision\",\n \"ltm\": \"nominal\",\n \"asm\": \"nominal\",\n \"avr\": \"minimum\"\n },\n \"myDns\": {\n \"class\": \"DNS\",\n \"nameServers\": [\n \t\"4.2.2.2\",\n \"8.8.8.8\"\n ],\n \"search\": [\n \"localhost\"\n ]\n },\n \"myNtp\": {\n \"class\": \"NTP\",\n \"servers\": [\n \"0.pool.ntp.org\",\n \"1.pool.ntp.org\"\n ],\n \"timezone\": \"America/Los_Angeles\"\n },\n \"Internal\": {\n \"class\": \"VLAN\",\n \"tag\": 10,\n \"mtu\": 1500,\n \"interfaces\": [\n {\n \"name\": \"1.1\",\n \"tagged\": false\n }\n ]\n },\n \"Self-Internal\": {\n \"class\": \"SelfIp\",\n \"address\": \"10.1.10.10/24\",\n \"vlan\": \"Internal\",\n \"allowService\": \"none\",\n \"trafficGroup\": \"traffic-group-local-only\"\n },\n \"External\": {\n \"class\": \"VLAN\",\n \"tag\": 20,\n \"mtu\": 1500,\n \"interfaces\": [\n {\n \"name\": \"1.2\",\n \"tagged\": false\n }\n ]\n },\n \"Self-External\": {\n \"class\": \"SelfIp\",\n \"address\": \"10.1.20.10/24\",\n \"vlan\": \"External\",\n \"allowService\": \"none\",\n \"trafficGroup\": \"traffic-group-local-only\"\n },\n \"Default\": {\n \"class\": \"Route\",\n \"gw\": \"10.1.20.1\",\n \"network\": \"default\"\n }\n }\n}\n" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/declarative-onboarding", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "declarative-onboarding" ] } }, "response": [] }, { "name": "Step 2: Get DO Status", "event": [ { "listen": "test", "script": { "id": "2b84c1ba-b4c1-42a5-b2ba-79eedc826fe6", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"result.code\",", " \"value\":200", " } ", " ];", " ", "f5_check_response(check_vals);", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/declarative-onboarding", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "declarative-onboarding" ] } }, "response": [] } ] }, { "name": "Lab 1.5 - Build a Cluster", "item": [ { "name": "[BIGIP A] Retrieve Authentication Token", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var populate_vars = [", " {name:\"bigip_a_auth_token\", value:\"token.token\"}", " ];", " ", "f5_populate_env_vars(populate_vars);", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"username\":\"admin\",\n \"password\":\"{{bigip_admin_password}}\",\n \"loginProviderName\":\"tmos\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/authn/login", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "authn", "login" ] } }, "response": [] }, { "name": "[BIGIP A] Set Authentication Token Timeout", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"timeout\", ", " \"value\":\"36000\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"timeout\":\"36000\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/authz/tokens/{{bigip_a_auth_token}}", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "authz", "tokens", "{{bigip_a_auth_token}}" ] } }, "response": [] }, { "name": "[BIGIP B] Retrieve Authentication Token", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var populate_vars = [", " {name:\"bigip_b_auth_token\", value:\"token.token\"}", " ];", " ", "f5_populate_env_vars(populate_vars);", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"username\":\"admin\",\n \"password\":\"{{bigip_admin_password}}\",\n \"loginProviderName\":\"tmos\"\n}" }, "url": { "raw": "https://{{bigip_b_mgmt}}/mgmt/shared/authn/login", "protocol": "https", "host": [ "{{bigip_b_mgmt}}" ], "path": [ "mgmt", "shared", "authn", "login" ] } }, "response": [] }, { "name": "[BIGIP B] Set Authentication Token Timeout", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"timeout\", ", " \"value\":\"36000\" ", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"timeout\":\"36000\"\n}" }, "url": { "raw": "https://{{bigip_b_mgmt}}/mgmt/shared/authz/tokens/{{bigip_b_auth_token}}", "protocol": "https", "host": [ "{{bigip_b_mgmt}}" ], "path": [ "mgmt", "shared", "authz", "tokens", "{{bigip_b_auth_token}}" ] } }, "response": [] }, { "name": "[BIGIP B] Set System DNS Settings", "event": [ { "listen": "test", "script": { "id": "6b8ab563-3166-49e7-9ab6-922fcdd7a047", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"nameServers\":\"8.8.8.8\"", " }", " ];", "", "f5_check_response(check_vals);" ], "type": "text/javascript" } } ], "request": { "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"nameServers\": [\"8.8.8.8\"]\n}" }, "url": { "raw": "https://{{bigip_b_mgmt}}/mgmt/tm/sys/dns", "protocol": "https", "host": [ "{{bigip_b_mgmt}}" ], "path": [ "mgmt", "tm", "sys", "dns" ] } }, "response": [] }, { "name": "[BIGIP A] Download DO RPM", "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-Auth-Token", "type": "text", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n\t\"command\": \"run\",\n\t\"utilCmdArgs\": \"-c \\\"cd /var/config/rest/downloads/ && curl -flOs https://raw.githubusercontent.com/F5Networks/f5-declarative-onboarding/v1.3.0/dist/f5-declarative-onboarding-1.3.0-4.noarch.rpm\\\"\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/util/bash", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "util", "bash" ] } }, "response": [] }, { "name": "[BIGIP A] Install DO RPM", "event": [ { "listen": "test", "script": { "id": "a4da1ae5-cea8-48aa-b803-b45a0086508a", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var populate_vars = [", " {name:\"bigip_a_do_id\", value:\"id\"}", " ];", " ", "f5_populate_env_vars(populate_vars);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"operation\":\"INSTALL\",\n \"packageFilePath\":\"/var/config/rest/downloads/f5-declarative-onboarding-1.3.0-4.noarch.rpm\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/iapp/package-management-tasks", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "iapp", "package-management-tasks" ] } }, "response": [] }, { "name": "[BIGIP A] Delay for DO Install", "event": [ { "listen": "test", "script": { "id": "a40f78dd-0571-491a-bffa-2d17b8ad6c60", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://postman-echo.com/delay/5/", "protocol": "https", "host": [ "postman-echo", "com" ], "path": [ "delay", "5", "" ] } }, "response": [] }, { "name": "[BIGIP A] Check Install Status", "event": [ { "listen": "test", "script": { "id": "2cfb16a5-d7b6-4580-9428-93f10b49d6ad", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"status\", ", " \"value\":\"FINISHED\" ", " }", " ];", "", "//f5_check_response(check_vals);", "", "var jsonData = JSON.parse(responseBody);", "", "if(jsonData.status.has(\"FINISHED\") || jsonData.status.has(\"FAILED\")) ", "{", " postman.setNextRequest('[BIGIP B] Download DO RPM');", "}", "else", "{", " postman.setNextRequest('[BIGIP A] Delay for DO Status');", "}" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/iapp/package-management-tasks/{{bigip_a_do_id}}", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "iapp", "package-management-tasks", "{{bigip_a_do_id}}" ] } }, "response": [] }, { "name": "[BIGIP B] Download DO RPM", "request": { "method": "POST", "header": [ { "key": "Content-Type", "name": "Content-Type", "type": "text", "value": "application/json" }, { "key": "X-F5-Auth-Token", "type": "text", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n\t\"command\": \"run\",\n\t\"utilCmdArgs\": \"-c \\\"cd /var/config/rest/downloads/ && curl -flOs https://raw.githubusercontent.com/F5Networks/f5-declarative-onboarding/v1.3.0/dist/f5-declarative-onboarding-1.3.0-4.noarch.rpm\\\"\"\n}" }, "url": { "raw": "https://{{bigip_b_mgmt}}/mgmt/tm/util/bash", "protocol": "https", "host": [ "{{bigip_b_mgmt}}" ], "path": [ "mgmt", "tm", "util", "bash" ] } }, "response": [] }, { "name": "[BIGIP B] Install DO RPM", "event": [ { "listen": "test", "script": { "id": "a4da1ae5-cea8-48aa-b803-b45a0086508a", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var populate_vars = [", " {name:\"bigip_b_do_id\", value:\"id\"}", " ];", " ", "f5_populate_env_vars(populate_vars);" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"operation\":\"INSTALL\",\n \"packageFilePath\":\"/var/config/rest/downloads/f5-declarative-onboarding-1.3.0-4.noarch.rpm\"\n}" }, "url": { "raw": "https://{{bigip_b_mgmt}}/mgmt/shared/iapp/package-management-tasks", "protocol": "https", "host": [ "{{bigip_b_mgmt}}" ], "path": [ "mgmt", "shared", "iapp", "package-management-tasks" ] } }, "response": [] }, { "name": "[BIGIP B] Delay for DO Install", "event": [ { "listen": "test", "script": { "id": "a40f78dd-0571-491a-bffa-2d17b8ad6c60", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://postman-echo.com/delay/5/", "protocol": "https", "host": [ "postman-echo", "com" ], "path": [ "delay", "5", "" ] } }, "response": [] }, { "name": "[BIGIP B] Check Install Status", "event": [ { "listen": "test", "script": { "id": "2cfb16a5-d7b6-4580-9428-93f10b49d6ad", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"status\", ", " \"value\":\"FINISHED\" ", " }", " ];", "", "//f5_check_response(check_vals);", "", "var jsonData = JSON.parse(responseBody);", "", "if(jsonData.status.has(\"FINISHED\") || jsonData.status.has(\"FAILED\")) ", "{", " postman.setNextRequest('[BIGIP A] Deploy DO Declaration');", "}", "else", "{", " postman.setNextRequest('[BIGIP B] Delay for DO Status');", "}" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_b_mgmt}}/mgmt/shared/iapp/package-management-tasks/{{bigip_b_do_id}}", "protocol": "https", "host": [ "{{bigip_b_mgmt}}" ], "path": [ "mgmt", "shared", "iapp", "package-management-tasks", "{{bigip_b_do_id}}" ] } }, "response": [] }, { "name": "[BIGIP A] Deploy DO Declaration", "event": [ { "listen": "test", "script": { "id": "07326918-f6f6-4484-aea2-74ffb12401b5", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"result.code\",", " \"value\":202", " } ", " ];", " ", "f5_check_response(check_vals);", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"schemaVersion\": \"1.2.0\",\n \"class\": \"Device\",\n \"async\": \"true\",\n \"label\": \"DO declaration for BIG-IP-A\",\n \"Common\": {\n \"class\": \"Tenant\",\n \"hostname\": \"{{bigip_a_hostname}}\",\n \"myProvisioning\": {\n \"class\": \"Provision\",\n \"ltm\": \"nominal\",\n \"asm\": \"nominal\",\n \"avr\": \"minimum\"\n },\n \"myDns\": {\n \"class\": \"DNS\",\n \"nameServers\": [\n \"4.2.2.2\",\n \"8.8.8.8\"\n ],\n \"search\": [\n \"localhost\"\n ]\n },\n \"myNtp\": {\n \"class\": \"NTP\",\n \"servers\": [\n \"0.pool.ntp.org\",\n \"1.pool.ntp.org\"\n ],\n \"timezone\": \"America/Los_Angeles\"\n },\n \"Internal\": {\n \"class\": \"VLAN\",\n \"tag\": 10,\n \"mtu\": 1500,\n \"interfaces\": [\n {\n \"name\": \"1.1\",\n \"tagged\": false\n }\n ]\n },\n \"Self-Internal\": {\n \"class\": \"SelfIp\",\n \"address\": \"10.1.10.10/24\",\n \"vlan\": \"Internal\",\n \"allowService\": \"all\",\n \"trafficGroup\": \"traffic-group-local-only\"\n },\n \"Self-Internal-Floating\": {\n \"class\": \"SelfIp\",\n \"address\": \"10.1.10.13/24\",\n \"vlan\": \"Internal\",\n \"allowService\": \"all\",\n \"trafficGroup\": \"traffic-group-1\"\n },\n \"External\": {\n \"class\": \"VLAN\",\n \"tag\": 20,\n \"mtu\": 1500,\n \"interfaces\": [\n {\n \"name\": \"1.2\",\n \"tagged\": false\n }\n ]\n },\n \"Self-External\": {\n \"class\": \"SelfIp\",\n \"address\": \"10.1.20.10/24\",\n \"vlan\": \"External\",\n \"allowService\": \"all\",\n \"trafficGroup\": \"traffic-group-local-only\"\n },\n \"Default\": {\n \"class\": \"Route\",\n \"gw\": \"10.1.20.1\",\n \"network\": \"default\"\n },\n \"configsync\": {\n \"class\": \"ConfigSync\",\n \"configsyncIp\": \"/Common/Self-Internal/address\"\n },\n \"failoverAddress\": {\n \"class\": \"FailoverUnicast\",\n \"address\": \"/Common/Self-Internal/address\"\n },\n \"DeviceGroup1\": {\n \"class\": \"DeviceGroup\",\n \"type\": \"sync-failover\",\n \"members\": [\n \"{{bigip_a_hostname}}\",\n \"{{bigip_b_hostname}}\"\n ],\n \"owner\": \"/Common/DeviceGroup1/members/0\",\n \"autoSync\": true,\n \"networkFailover\": true\n },\n \"trust\": {\n \"class\": \"DeviceTrust\",\n \"localUsername\": \"admin\",\n \"localPassword\": \"admin\",\n \"remoteHost\": \"{{bigip_a_mgmt}}\",\n \"remoteUsername\": \"admin\",\n \"remotePassword\": \"admin\"\n }\n }\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/declarative-onboarding", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "declarative-onboarding" ] } }, "response": [] }, { "name": "[BIGIP A] Delay for DO Config", "event": [ { "listen": "test", "script": { "id": "a40f78dd-0571-491a-bffa-2d17b8ad6c60", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://postman-echo.com/delay/10/", "protocol": "https", "host": [ "postman-echo", "com" ], "path": [ "delay", "10", "" ] } }, "response": [] }, { "name": "[BIGIP A] Check DO Status", "event": [ { "listen": "test", "script": { "id": "2b84c1ba-b4c1-42a5-b2ba-79eedc826fe6", "exec": [ "if (responseCode.code !== 200){", " postman.setNextRequest('[BIGIP A] Delay for DO Config');", "}", "", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/declarative-onboarding", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "declarative-onboarding" ] } }, "response": [] }, { "name": "[BIGIP B] Deploy DO Declaration", "event": [ { "listen": "test", "script": { "id": "07326918-f6f6-4484-aea2-74ffb12401b5", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"result.code\",", " \"value\":202", " } ", " ];", " ", "f5_check_response(check_vals);", "" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"schemaVersion\": \"1.2.0\",\n \"class\": \"Device\",\n \"async\": \"true\",\n \"label\": \"DO declaration for BIG-IP-B\",\n \"Common\": {\n \"class\": \"Tenant\",\n \"hostname\": \"{{bigip_b_hostname}}\",\n \"myProvisioning\": {\n \"class\": \"Provision\",\n \"ltm\": \"nominal\",\n \"asm\": \"nominal\",\n \"avr\": \"minimum\"\n },\n \"myDns\": {\n \"class\": \"DNS\",\n \"nameServers\": [\n \"4.2.2.2\",\n \"8.8.8.8\"\n ],\n \"search\": [\n \"localhost\"\n ]\n },\n \"myNtp\": {\n \"class\": \"NTP\",\n \"servers\": [\n \"0.pool.ntp.org\",\n \"1.pool.ntp.org\"\n ],\n \"timezone\": \"America/Los_Angeles\"\n },\n \"Internal\": {\n \"class\": \"VLAN\",\n \"tag\": 10,\n \"mtu\": 1500,\n \"interfaces\": [\n {\n \"name\": \"1.1\",\n \"tagged\": false\n }\n ]\n },\n \"Self-Internal\": {\n \"class\": \"SelfIp\",\n \"address\": \"10.1.10.11/24\",\n \"vlan\": \"Internal\",\n \"allowService\": \"all\",\n \"trafficGroup\": \"traffic-group-local-only\"\n },\n \"Self-Internal-Floating\": {\n \"class\": \"SelfIp\",\n \"address\": \"10.1.10.13/24\",\n \"vlan\": \"Internal\",\n \"allowService\": \"all\",\n \"trafficGroup\": \"traffic-group-1\"\n },\n \"External\": {\n \"class\": \"VLAN\",\n \"tag\": 20,\n \"mtu\": 1500,\n \"interfaces\": [\n {\n \"name\": \"1.2\",\n \"tagged\": false\n }\n ]\n },\n \"Self-External\": {\n \"class\": \"SelfIp\",\n \"address\": \"10.1.20.11/24\",\n \"vlan\": \"External\",\n \"allowService\": \"all\",\n \"trafficGroup\": \"traffic-group-local-only\"\n },\n \"Default\": {\n \"class\": \"Route\",\n \"gw\": \"10.1.20.1\",\n \"network\": \"default\"\n },\n \"configsync\": {\n \"class\": \"ConfigSync\",\n \"configsyncIp\": \"/Common/Self-Internal/address\"\n },\n \"failoverAddress\": {\n \"class\": \"FailoverUnicast\",\n \"address\": \"/Common/Self-Internal/address\"\n },\n \"DeviceGroup1\": {\n \"class\": \"DeviceGroup\",\n \"type\": \"sync-failover\",\n \"members\": [\n \"{{bigip_a_hostname}}\",\n \"{{bigip_b_hostname}}\"\n ],\n \"owner\": \"/Common/DeviceGroup1/members/0\",\n \"autoSync\": true,\n \"networkFailover\": true,\n \"fullLoadOnSync\": false,\n \"saveOnAutoSync\": false\n },\n \"trust\": {\n \"class\": \"DeviceTrust\",\n \"localUsername\": \"admin\",\n \"localPassword\": \"admin\",\n \"remoteHost\": \"{{bigip_a_mgmt}}\",\n \"remoteUsername\": \"admin\",\n \"remotePassword\": \"admin\"\n }\n }\n}" }, "url": { "raw": "https://{{bigip_b_mgmt}}/mgmt/shared/declarative-onboarding", "protocol": "https", "host": [ "{{bigip_b_mgmt}}" ], "path": [ "mgmt", "shared", "declarative-onboarding" ] } }, "response": [] }, { "name": "[BIGIP B] Delay for DO Config", "event": [ { "listen": "test", "script": { "id": "a40f78dd-0571-491a-bffa-2d17b8ad6c60", "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://postman-echo.com/delay/10/", "protocol": "https", "host": [ "postman-echo", "com" ], "path": [ "delay", "10", "" ] } }, "response": [] }, { "name": "[BIGIP B] Check DO Status", "event": [ { "listen": "test", "script": { "id": "2b84c1ba-b4c1-42a5-b2ba-79eedc826fe6", "exec": [ "if (responseCode.code !== 200){", " postman.setNextRequest('[BIGIP B] Delay for DO Config');", "}", "", "" ], "type": "text/javascript" } } ], "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_b_mgmt}}/mgmt/shared/declarative-onboarding", "protocol": "https", "host": [ "{{bigip_b_mgmt}}" ], "path": [ "mgmt", "shared", "declarative-onboarding" ] } }, "response": [] }, { "name": "[BIGIP B] Failover Traffic Group to BIGIP A Copy", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"trafficGroup\",", " \"value\":\"traffic-group-1\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_b_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"command\":\"run\",\n \"trafficGroup\":\"traffic-group-1\",\n \"standby\":true\n}" }, "url": { "raw": "https://{{bigip_b_mgmt}}/mgmt/tm/sys/failover", "protocol": "https", "host": [ "{{bigip_b_mgmt}}" ], "path": [ "mgmt", "tm", "sys", "failover" ] } }, "response": [] } ] }, { "name": "Lab 1.6 - Build a Basic LTM Config using Transactions", "item": [ { "name": "Step 1: Create a Transaction", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var populate_vars = [", " {name:\"bigip_transaction_id\", value:\"transId\"}", " ];", " ", "f5_populate_env_vars(populate_vars);", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "transaction" ] } }, "response": [] }, { "name": "Step 2: Add To Transaction: Create a HTTP Monitor", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"1\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{bigip_transaction_id}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7_monitor\",\n \"send\":\"GET / HTTP/1.0\",\n \"recv\":\"\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/monitor/http", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "ltm", "monitor", "http" ] } }, "response": [] }, { "name": "Step 3: Add to Transaction: Create a Pool", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"2\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{bigip_transaction_id}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7_pool\",\n \"monitor\":\"/Common/Lab1.7_monitor\",\n \"members\": [\"10.1.10.100:8000\",\"10.1.10.100:8001\"]\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/pool", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "ltm", "pool" ] } }, "response": [] }, { "name": "Step 4: Add to Transaction: Create a HTTP Profile", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"3\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{bigip_transaction_id}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7_http\",\n \"insertXforwardedFor\":\"enabled\",\n \"serverAgentName\":\"Lab_1.7\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/profile/http", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "ltm", "profile", "http" ] } }, "response": [] }, { "name": "Step 5: Add to Transaction: Create a TCP Profile", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"4\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{bigip_transaction_id}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7_tcp_clientside\",\n \"nagle\":\"disabled\",\n \"sendBufferSize\":\"16000\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/profile/tcp", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "ltm", "profile", "tcp" ] } }, "response": [] }, { "name": "Step 6: Add to Transaction: Create a Virtual Server", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"5\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-REST-Coordination-Id", "value": "{{bigip_transaction_id}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"name\":\"Lab1.7_vs\",\n \"destination\":\"10.1.20.120:80\",\n \"ipProtocol\":\"tcp\",\n \"pool\":\"Lab1.7_pool\",\n \"sourceAddressTranslation\": { \"type\":\"automap\" },\n \"profiles\": [\n { \"name\":\"/Common/Lab1.7_tcp_clientside\", \"context\":\"clientside\" },\n { \"name\":\"/Common/tcp-wan-optimized\", \"context\":\"serverside\" },\n \"/Common/Lab1.7_http\"\n ]\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/ltm/virtual", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "ltm", "virtual" ] } }, "response": [] }, { "name": "Step 7: View the Transaction Queue", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"items\",", " \"value\":\"5\",", " \"op\":\"length\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}/commands", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "transaction", "{{bigip_transaction_id}}", "commands" ] } }, "response": [] }, { "name": "Step 8: View Queued Command 4 from Transaction", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"4\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}/commands/4", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "transaction", "{{bigip_transaction_id}}", "commands", "4" ] } }, "response": [] }, { "name": "Step 9: Change Eval Order 4 -> 1", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"evalOrder\",", " \"value\":\"1\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\r \"evalOrder\": 1\r}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}/commands/4", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "transaction", "{{bigip_transaction_id}}", "commands", "4" ] } }, "response": [] }, { "name": "Step 10: View the Transaction Queue Changes", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"items\",", " \"value\":\"5\",", " \"op\":\"length\"", " },", " {", " \"path\":\"items.0.uri\",", " \"value\":\"https://localhost/mgmt/tm/ltm/profile/tcp\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}/commands", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "transaction", "{{bigip_transaction_id}}", "commands" ] } }, "response": [] }, { "name": "Step 11: Commit the Transaction", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\",", " \"value\":\"tm:transactionstate\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"state\":\"VALIDATING\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "transaction", "{{bigip_transaction_id}}" ] } }, "response": [] }, { "name": "Step 12: View the Transaction Status", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"state\",", " \"value\":\"COMPLETED\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/tm/transaction/{{bigip_transaction_id}}", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "tm", "transaction", "{{bigip_transaction_id}}" ] } }, "response": [] } ] }, { "name": "Lab 2.2 - Install AS3 onto BIG-IP", "item": [ { "name": "Step 1: Get Installed iControl LX Extensions", "event": [ { "listen": "test", "script": { "id": "5e098299-9d1c-4d54-b189-b8d35751507c", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"kind\",", " \"value\":\"shared:iapp:installed-packages:installedpackagecollectionstate\",", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/iapp/installed-packages", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "iapp", "installed-packages" ] } }, "response": [] }, { "name": "Step 2: Upload AS3 Extension RPM", "event": [ { "listen": "test", "script": { "id": "bb38c6e9-0658-458c-be36-3f95d74c9a1c", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"localFilePath\",", " \"value\":\"/f5-appsvcs-3..*.noarch.rpm$/i\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);" ] } }, { "listen": "prerequest", "script": { "id": "ec269764-4137-4028-b375-4e6471b42ff9", "type": "text/javascript", "exec": [ "// Create the value for the Content-Range header based on the file size of the RPM", "// https://devcentral.f5.com/articles/demystifying-icontrol-rest-part-5-transferring-files", "", "var fileLen = parseInt(pm.environment.get(\"as3_filelen\"));", "pm.globals.set(\"_as3_content_range\",\"0-\" + (fileLen - 1) + \"/\" + fileLen);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/octet-stream" }, { "key": "Content-Range", "value": "{{_as3_content_range}}" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Connection", "value": "keep-alive" } ], "body": { "mode": "file", "file": {} }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/file-transfer/uploads/{{as3_filename}}", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "file-transfer", "uploads", "{{as3_filename}}" ] } }, "response": [] }, { "name": "Step 3: Create AS3 Extension Install Task", "event": [ { "listen": "test", "script": { "id": "a4da1ae5-cea8-48aa-b803-b45a0086508a", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"status\",", " \"value\":\"CREATED\"", " } ", " ];", "var populate_vars = [", " { ", " \"name\":\"_as3_install_uuid\",", " \"value\":\"id\"", " } ", " ];", " ", "f5_populate_env_vars(populate_vars);", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "{\n \"operation\":\"INSTALL\",\n \"packageFilePath\":\"/var/config/rest/downloads/{{as3_filename}}\"\n}" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/iapp/package-management-tasks", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "iapp", "package-management-tasks" ] } }, "response": [] }, { "name": "Step 4: Get AS3 Install Task Status", "event": [ { "listen": "test", "script": { "id": "2cfb16a5-d7b6-4580-9428-93f10b49d6ad", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"status\",", " \"value\":\"FINISHED\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/iapp/package-management-tasks/{{_as3_install_uuid}}", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "iapp", "package-management-tasks", "{{_as3_install_uuid}}" ] } }, "response": [] }, { "name": "Step 5: Get AS3 Version Info", "event": [ { "listen": "test", "script": { "id": "72146941-5edf-430b-b687-8e6c3e0b5ecd", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"version\",", " \"value\":\"/^3./i\",", " \"op\":\"regex\"", " } ", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Connection", "value": "keep-alive" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/info", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "info" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "6d75e112-93b6-45bb-b6f6-3a70d6724a0a", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "16cc20b4-c98c-4913-8670-65caacab136c", "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Lab 2.3 - Application Service Deployments with AS3", "item": [ { "name": "Step 1: Get Deployed AS3 Services", "event": [ { "listen": "test", "script": { "id": "8c6701d3-b448-441a-bbfc-7523bdbab8b4", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_check_response_code(1);" ] } } ], "request": { "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "Step 2: Deploy HTTP_Service", "event": [ { "listen": "test", "script": { "id": "e79d5b87-090a-46d6-8f22-962fd0fbde38", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"results.0.message\",", " \"value\":\"/success|no\\ change/\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": " {\n \"class\": \"AS3\",\n \"action\": \"deploy\",\n \"declaration\": {\n \"class\": \"ADC\",\n \"schemaVersion\": \"3.1.0\",\n \"id\": \"SuperNetOps_Class_1_Lab2_3_Step2\",\n \"label\": \"SuperNetOps_Class_1_Lab2_3_Step2\",\n \"remark\": \"Super NetOps Class 1 Lab 2.3 Step2\",\n \"Tenant1\": {\n \"class\": \"Tenant\",\n \"HTTP_Service\": {\n \"class\": \"Application\",\n \"template\": \"http\",\n \"serviceMain\": {\n \"class\": \"Service_HTTP\",\n \"virtualAddresses\": [\n \"10.1.20.121\"\n ],\n \"snat\": \"auto\",\n \"pool\": \"Pool1\"\n },\n \"Pool1\": {\n \"class\": \"Pool\",\n \"monitors\": [\n \"http\"\n ],\n \"members\": [\n {\n \"servicePort\": 8001,\n \"serverAddresses\": [\n \"10.1.10.100\"\n ]\n },\n {\n \"servicePort\": 8002,\n \"serverAddresses\": [\n \"10.1.10.101\"\n ]\n }\n\n ]\n }\n } \n }\n }\n }" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "Step 3: POST to Modify HTTP_Service", "event": [ { "listen": "test", "script": { "id": "a5278280-d8b1-4192-a6f5-3caaf71c38f0", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"results.0.message\",", " \"value\":\"/success|no\\ change/\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": " {\n \"class\": \"AS3\",\n \"action\": \"deploy\",\n \"declaration\": {\n \"class\": \"ADC\",\n \"schemaVersion\": \"3.1.0\",\n \"id\": \"SuperNetOps_Class_1_Lab2_3_Step3\",\n \"label\": \"SuperNetOps_Class_1_Lab2_3_Step3\",\n \"remark\": \"Super NetOps Class 1 Lab 2.3 Step 3\",\n \"Tenant1\": {\n \"class\": \"Tenant\",\n \"HTTP_Service\": {\n \"class\": \"Application\",\n \"template\": \"http\",\n \"serviceMain\": {\n \"class\": \"Service_HTTP\",\n \"virtualAddresses\": [\n \"10.1.20.121\"\n ],\n \"snat\": \"auto\", \n \"pool\": \"Pool1\"\n },\n \"Pool1\": {\n \"class\": \"Pool\",\n \"monitors\": [\n \"http\"\n ],\n \"members\": [\n {\n \"enable\": false,\n \"servicePort\": 8001,\n \"serverAddresses\": [\n \"10.1.10.100\"\n ]\n },\n {\n \"enable\": false,\n \"servicePort\": 8002,\n \"serverAddresses\": [\n \"10.1.10.101\"\n ]\n }\n\n ]\n }\n } \n }\n }\n }" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "Step 4: PATCH to Modify Service_HTTP", "event": [ { "listen": "test", "script": { "id": "a5278280-d8b1-4192-a6f5-3caaf71c38f0", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"results.0.message\",", " \"value\":\"/success|no\\ change/\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "[\n {\n \"op\":\"replace\",\n \"path\":\"/Tenant1/HTTP_Service/Pool1/members/0/enable\",\n \"value\": true\n },\n {\n \"op\":\"replace\",\n \"path\":\"/Tenant1/HTTP_Service/Pool1/members/1/enable\",\n \"value\": true\n },\n {\n \"op\":\"add\",\n \"path\":\"/Tenant1/HTTP_Service/Pool1/members/2\",\n \"value\": {\n \"servicePort\": 8003,\n \"serverAddresses\": [\n \"10.1.10.100\"\n ]\n }\n } \n]" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "Step 5: PATCH to Delete Service_HTTP", "event": [ { "listen": "test", "script": { "id": "8647b36e-2d75-4155-a4d7-cf7cf710e377", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"results.0.message\",", " \"value\":\"/success|no\\ change/\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "[\n {\n \"op\":\"remove\",\n \"path\":\"/Tenant1/HTTP_Service\"\n } \n]" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "Step 6: Test Re-deploy Service_HTTP with iRule and Custom Profiles", "event": [ { "listen": "test", "script": { "id": "23fab218-396f-410a-a2be-879e9ca8d38e", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"results.0.message\",", " \"value\":\"/success|no\\ change/\",", " \"op\":\"regex\"", " },", " { ", " \"path\":\"results.0.dryRun\",", " \"value\":true", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": " {\n \"class\": \"AS3\",\n \"action\": \"dry-run\",\n \"declaration\": {\n \"class\": \"ADC\",\n \"schemaVersion\": \"3.1.0\",\n \"id\": \"SuperNetOps_Class_1_Lab2_3_Step5\",\n \"label\": \"SuperNetOps_Class_1_Lab2_3_Step5\",\n \"remark\": \"Super NetOps Class 1 Lab 2.3 Step 5\",\n \"Tenant1\": {\n \"class\": \"Tenant\",\n \"HTTP_Service\": {\n \"class\": \"Application\",\n \"template\": \"http\",\n \"serviceMain\": {\n \"class\": \"Service_HTTP\",\n \"virtualAddresses\": [\n \"10.1.20.121\"\n ],\n \"iRules\": [ \"Maintenance_iRule\" ],\n \"snat\": \"auto\", \n \"pool\": \"Pool1\",\n \"profileHTTP\": { \"use\": \"HTTP_Profile\" },\n \"profileHTTPCompression\": { \"use\": \"HTTP_Compress\" }\n },\n \"Pool1\": {\n \"class\": \"Pool\",\n \"monitors\": [\n \"http\"\n ],\n \"members\": [\n {\n \"servicePort\": 8001,\n \"serverAddresses\": [\n \"10.1.10.100\"\n ]\n },\n {\n \"servicePort\": 8002,\n \"serverAddresses\": [\n \"10.1.10.101\"\n ]\n }\n\n ]\n },\n \"Maintenance_iRule\": {\n \"class\": \"iRule\",\n \"iRule\": {\n \"url\": \"https://raw.githubusercontent.com/f5devcentral/f5-automation-labs/{{repository_branch}}/files/irules/maintenance-page.irule\"\n }\n },\n \"HTTP_Profile\": {\n \"class\": \"HTTP_Profile\",\n \"serverHeaderValue\": \"SuperNetOpsClass1\",\n \"xForwardedFor\": true\n },\n \"HTTP_Compress\": {\n \"class\": \"HTTP_Compress\",\n \"cpuSaver\": true,\n \"cpuSaverHigh\": 70,\n \"cpuSaverLow\": 50,\n \"selective\": true\n }\n } \n }\n }\n }" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "Step 7: Re-deploy Service_HTTP with iRule and Custom Profiles", "event": [ { "listen": "test", "script": { "id": "8deb3fbd-bfeb-409c-b90e-596b5f2ca90f", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"results.0.message\",", " \"value\":\"/success|no\\ change/\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": " {\n \"class\": \"AS3\",\n \"action\": \"deploy\",\n \"declaration\": {\n \"class\": \"ADC\",\n \"schemaVersion\": \"3.1.0\",\n \"id\": \"SuperNetOps_Class_1_Lab2_3_Step5\",\n \"label\": \"SuperNetOps_Class_1_Lab2_3_Step5\",\n \"remark\": \"Super NetOps Class 1 Lab 2.3 Step 5\",\n \"Tenant1\": {\n \"class\": \"Tenant\",\n \"HTTP_Service\": {\n \"class\": \"Application\",\n \"template\": \"http\",\n \"serviceMain\": {\n \"class\": \"Service_HTTP\",\n \"virtualAddresses\": [\n \"10.1.20.121\"\n ],\n \"iRules\": [ \"Maintenance_iRule\" ],\n \"snat\": \"auto\", \n \"pool\": \"Pool1\",\n \"profileHTTP\": { \"use\": \"HTTP_Profile\" },\n \"profileHTTPCompression\": { \"use\": \"HTTP_Compress\" }\n },\n \"Pool1\": {\n \"class\": \"Pool\",\n \"monitors\": [\n \"http\"\n ],\n \"members\": [\n {\n \"servicePort\": 8001,\n \"serverAddresses\": [\n \"10.1.10.100\"\n ]\n },\n {\n \"servicePort\": 8002,\n \"serverAddresses\": [\n \"10.1.10.101\"\n ]\n }\n\n ]\n },\n \"Maintenance_iRule\": {\n \"class\": \"iRule\",\n \"iRule\": {\n \"url\": \"https://raw.githubusercontent.com/f5devcentral/f5-automation-labs/{{repository_branch}}/files/irules/maintenance-page.irule\"\n }\n },\n \"HTTP_Profile\": {\n \"class\": \"HTTP_Profile\",\n \"serverHeaderValue\": \"SuperNetOpsClass1\",\n \"xForwardedFor\": true\n },\n \"HTTP_Compress\": {\n \"class\": \"HTTP_Compress\",\n \"cpuSaver\": true,\n \"cpuSaverHigh\": 70,\n \"cpuSaverLow\": 50,\n \"selective\": true\n }\n } \n }\n }\n }" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "Step 8: Deploy Service_HTTPS", "event": [ { "listen": "test", "script": { "id": "7863f183-5ab5-46a4-b0cb-d1b00a9b6574", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"results.0.message\",", " \"value\":\"/success|no\\ change/\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "[\n {\n \"op\":\"add\",\n \"path\":\"/Tenant1/HTTPS_Service\",\n \"value\": {\n \"class\": \"Application\",\n \"template\": \"https\",\n \"serviceMain\": {\n \"class\": \"Service_HTTPS\",\n \"virtualAddresses\": [\n \"10.1.20.122\"\n ],\n \"snat\": \"auto\",\n \"pool\": \"Pool1\",\n \"profileHTTP\": { \"use\": \"HTTP_Profile\" },\n \"profileHTTPCompression\": { \"use\": \"HTTP_Compress\" },\n \"serverTLS\": \"TLS_Offload\"\n },\n \"Pool1\": {\n \"class\": \"Pool\",\n \"monitors\": [\n \"http\"\n ],\n \"members\": [\n {\n \"servicePort\": 8001,\n \"serverAddresses\": [\n \"10.1.10.100\"\n ]\n },\n {\n \"servicePort\": 8002,\n \"serverAddresses\": [\n \"10.1.10.101\"\n ]\n }\n\n ]\n },\n \t\t\"linux_high\": {\n\t\t\t\"class\": \"WAF_Policy\",\n \t\t\"url\": \"https://raw.githubusercontent.com/f5devcentral/f5-automation-labs/master/files/asm-policies/demo-asm-policy-linux-high.xml\",\n\t\t\t\"ignoreChanges\": true\n\t\t\t},\n \"HTTP_Profile\": {\n \"class\": \"HTTP_Profile\",\n \"serverHeaderValue\": \"SuperNetOpsClass1\",\n \"xForwardedFor\": true\n },\n \"HTTP_Compress\": {\n \"class\": \"HTTP_Compress\",\n \"cpuSaver\": true,\n \"cpuSaverHigh\": 70,\n \"cpuSaverLow\": 50,\n \"selective\": true\n }, \n \"TLS_Offload\": {\n \"class\": \"TLS_Server\",\n \"certificates\": [\n {\n \"certificate\": \"TLS_KeyPair\"\n }\n ]\n },\n \"TLS_KeyPair\": {\n \"class\": \"Certificate\",\n \"certificate\": \"-----BEGIN CERTIFICATE-----\\nMIIDrjCCApagAwIBAgIECrPR/zANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMC\\nVVMxCzAJBgNVBAgTAldBMRAwDgYDVQQHEwdTZWF0dGxlMRIwEAYDVQQKEwlNeUNv\\nbXBhbnkxCzAJBgNVBAsTAklUMR4wHAYDVQQDExVsb2NhbGhvc3QubG9jYWxkb21h\\naW4xKTAnBgkqhkiG9w0BCQEWGnJvb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6\\nhogGsfTpudYlqkdlxOfEhYGs6Nd2sz12vigXSZ2Xg5onejlywM20aow1fdfR9pOF\\nGPJmvm4odOT2uzH0+xau9z4+\\n-----END PRIVATE KEY-----\\n\"\n }\n }\n }\n]" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "Step 9: Modify Service_HTTPS to add WAF Policy", "event": [ { "listen": "test", "script": { "id": "a95851bf-0fcd-47fc-b5c9-234ff2fde30e", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"results.0.message\",", " \"value\":\"/success|no\\ change/\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);", "" ] } } ], "request": { "method": "PATCH", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": " [\n {\n \"op\":\"add\",\n \"path\":\"/Tenant1/HTTPS_Service/serviceMain/policyWAF\",\n \"value\": { \"bigip\":\"/Tenant1/HTTPS_Service/linux_high\" }\n }\n ]" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "Step 10: POST to Delete All Services", "event": [ { "listen": "test", "script": { "id": "8647b36e-2d75-4155-a4d7-cf7cf710e377", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "var check_vals = [", " { ", " \"path\":\"results.0.message\",", " \"value\":\"/success|no\\ change/\",", " \"op\":\"regex\"", " }", " ];", "", "f5_check_response(check_vals);" ] } } ], "request": { "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": " {\n \"class\": \"AS3\",\n \"action\": \"deploy\",\n \"declaration\": {\n \"class\": \"ADC\",\n \"schemaVersion\": \"3.1.0\",\n \"id\": \"SuperNetOps_Class_1_Lab2_3_Step4\",\n \"label\": \"SuperNetOps_Class_1_Lab2_3_Step4\",\n \"remark\": \"Super NetOps Class 1 Lab 2.3 Step 4\",\n \"Tenant1\": {\n \"class\": \"Tenant\" \n }\n }\n }" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] }, { "name": "Step 11: Get Deployed AS3 Services", "event": [ { "listen": "test", "script": { "id": "8c6701d3-b448-441a-bbfc-7523bdbab8b4", "type": "text/javascript", "exec": [ "eval(postman.getGlobalVariable(\"_f5_workflow_functions\"));", "", "f5_check_response_code(1);" ] } } ], "request": { "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{bigip_a_auth_token}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigip_a_mgmt}}/mgmt/shared/appsvcs/declare", "protocol": "https", "host": [ "{{bigip_a_mgmt}}" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "id": "270bb224-2389-46f2-a3f3-f63f5a8ea268", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "d62a3a63-19a9-42b5-89bf-06c489b15643", "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Lab 3.1 - Ansible Tower Onboarding", "item": [ { "name": "Token-Based Authentication", "item": [ { "name": "Step1: Retrieve Authentication Token", "event": [ { "listen": "test", "script": { "id": "8f63439f-dd58-4f75-be6a-5910cacc1934", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"TowerToken\", jsonData.token);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n \"username\": \"{{tower_username}}\",\r\n \"password\": \"{{tower_password}}\"\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/authtoken/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "authtoken", "" ] } }, "response": [] }, { "name": "Step2: Set Auth Token Timeout", "event": [ { "listen": "test", "script": { "id": "80fe6c70-1fa4-4e5e-a61a-83680ce12f41", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_tenant1_id\", jsonData.id);" ] } } ], "request": { "method": "PATCH", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"AUTH_TOKEN_EXPIRATION\": 14400\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/settings/all/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "settings", "all", "" ] } }, "response": [] } ], "_postman_isSubFolder": true }, { "name": "Tower RBAC Setup", "item": [ { "name": "Step1: Create Orginization (Tenant1)", "event": [ { "listen": "test", "script": { "id": "80fe6c70-1fa4-4e5e-a61a-83680ce12f41", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_tenant1_id\", jsonData.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Tenant1\",\r\n \"description\": \"Tenant1\"\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/organizations/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "organizations", "" ] } }, "response": [] }, { "name": "Step2: Create Team (T1-Admin)", "event": [ { "listen": "test", "script": { "id": "cc2048f0-9b62-4b3f-942f-36986073fe83", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_t1admin_id\", jsonData.id);", "postman.setEnvironmentVariable(\"tower_t1admin_member_role_id\", jsonData.summary_fields.object_roles.member_role.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"T1-Admin\",\r\n \"description\": \"Tenant 1 Administrators\",\r\n \"organization\": {{tower_tenant1_id}}\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/teams/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "teams", "" ] } }, "response": [] }, { "name": "Step3: Create Team (T1-Ops)", "event": [ { "listen": "test", "script": { "id": "58d758d5-9791-4079-9edf-b5b0e6f5801a", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_t1ops_id\", jsonData.id);", "postman.setEnvironmentVariable(\"tower_t1ops_member_role_id\", jsonData.summary_fields.object_roles.member_role.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"T1-Ops\",\r\n \"description\": \"Tenant 1 Operations\",\r\n \"organization\": {{tower_tenant1_id}}\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/teams/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "teams", "" ] } }, "response": [] }, { "name": "Step4: Create User (T1-admin-user)", "event": [ { "listen": "test", "script": { "id": "1b1d069f-d24f-483a-874d-c26dcaf9bb63", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_t1adminuser_id\", jsonData.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"username\": \"T1-admin-user\",\r\n \"first_name\": \"T1\",\r\n \"last_name\": \"admin\",\r\n \"email\": \"test@localhost\",\r\n \"is_superuser\": false,\r\n \"is_system_auditor\": false,\r\n \"password\": \"default\"\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/users/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "users", "" ] } }, "response": [] }, { "name": "Step5: Create User (T1-ops-user)", "event": [ { "listen": "test", "script": { "id": "82fc83f9-a2c8-44be-a7d3-7fa9fec94064", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_t1opsuser_id\", jsonData.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"username\": \"T1-ops-user\",\r\n \"first_name\": \"T1\",\r\n \"last_name\": \"Ops\",\r\n \"email\": \"test@localhost\",\r\n \"is_superuser\": false,\r\n \"is_system_auditor\": false,\r\n \"password\": \"default\"\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/users/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "users", "" ] } }, "response": [] }, { "name": "Step6: Add User to Team (T1-Admin)", "event": [ { "listen": "test", "script": { "id": "1ebba94d-8706-4708-a39a-18a1fc42e7c3", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"id\":{{tower_t1admin_member_role_id}}\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/users/{{tower_t1adminuser_id}}/roles/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "users", "{{tower_t1adminuser_id}}", "roles", "" ] } }, "response": [] }, { "name": "Step7: Add User to Team (T1-Ops)", "event": [ { "listen": "test", "script": { "id": "1ebba94d-8706-4708-a39a-18a1fc42e7c3", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"id\":{{tower_t1ops_member_role_id}}\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/users/{{tower_t1opsuser_id}}/roles/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "users", "{{tower_t1opsuser_id}}", "roles", "" ] } }, "response": [] } ], "_postman_isSubFolder": true }, { "name": "Tower Core Objects", "item": [ { "name": "Step1: Create Project for SCM", "event": [ { "listen": "test", "script": { "id": "3a70e9a7-2a95-4e10-97ad-55562345fa99", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_project_id\", jsonData.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"scm-project\",\r\n \"scm_type\": \"git\",\r\n \"scm_url\": \"https://github.com/f5devcentral/f5-automation-labs.git\",\r\n \"scm_branch\": \"{{repository_branch}}\",\r\n \"scm_clean\": false,\r\n \"scm_delete_on_update\": true,\r\n \"credential\": null,\r\n \"timeout\": 0,\r\n \"organization\": 1,\r\n \"scm_update_on_launch\": true,\r\n \"scm_update_cache_timeout\": 0\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/projects/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "projects", "" ] } }, "response": [] }, { "name": "Step2: Create Tower Inventory", "event": [ { "listen": "test", "script": { "id": "9892b225-34ef-490e-ad59-0d3b11c1bb9e", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_inventory_id\", jsonData.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"LAB_BIGIP\",\r\n \"description\": \"\",\r\n \"organization\": 1\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/inventories/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "inventories", "" ] } }, "response": [] }, { "name": "Step3: Create Inventory Group", "event": [ { "listen": "test", "script": { "id": "ebe7cddb-306e-444a-9e15-f7e64125b765", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_group_id\", jsonData.id);", "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"bigip\"\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/inventories/{{tower_inventory_id}}/groups/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "inventories", "{{tower_inventory_id}}", "groups", "" ] } }, "response": [] }, { "name": "Step4: Create Inventory Host", "event": [ { "listen": "test", "script": { "id": "14a3c387-8f9e-49a8-b991-0cfa001c7652", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_host_id\", jsonData.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": {{bigip_a_mgmt_name}},\r\n \"inventory\": {{tower_inventory_id}}\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/hosts/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "hosts", "" ] } }, "response": [] }, { "name": "Step5: Add Host to Group", "event": [ { "listen": "test", "script": { "id": "3367d11e-7a7c-425c-af54-10d78b641445", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\n \"id\": {{tower_host_id}}\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/groups/{{tower_group_id}}/hosts/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "groups", "{{tower_group_id}}", "hosts", "" ] } }, "response": [] }, { "name": "Step7: Create Tower Credentials", "event": [ { "listen": "test", "script": { "id": "e7087368-95f7-4e97-9a7f-72c859233886", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_credentials_id\", jsonData.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"LAB_CREDS\",\r\n \"description\": \"BIGIP Credentials\",\r\n \"user\": 1,\r\n \"credential_type\": 1,\r\n \"inputs\": {\r\n \"username\": \"admin\",\r\n \"password\": \"admin\"\r\n }\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/credentials/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "credentials", "" ] } }, "response": [] }, { "name": "Step8: Delay for SCM to update", "event": [ { "listen": "test", "script": { "id": "a40f78dd-0571-491a-bffa-2d17b8ad6c60", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://postman-echo.com/delay/10/", "protocol": "https", "host": [ "postman-echo", "com" ], "path": [ "delay", "10", "" ] } }, "response": [] }, { "name": "Step9: Check SCM Sync Status", "event": [ { "listen": "test", "script": { "id": "df4221d9-9604-4f17-98e7-cbe89810229a", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_sync_status\", jsonData.status);", "", "if(jsonData.status.has(\"success\")) ", "{", " postman.setNextRequest('Step 1: Create Template (View Config)');", "}", "else", "{", " postman.setNextRequest('Step8: Delay for SCM to update');", "}" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/projects/{{tower_project_id}}/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "projects", "{{tower_project_id}}", "" ] } }, "response": [] } ], "_postman_isSubFolder": true }, { "name": "Create Job Templates", "item": [ { "name": "Step 1: Create Template (View Config)", "event": [ { "listen": "test", "script": { "id": "f486c417-90df-42c0-802c-519a1be4d6ec", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_viewtemplate_id\", jsonData.id);", "postman.setEnvironmentVariable(\"tower_viewconfig_execute_id\", jsonData.summary_fields.object_roles.execute_role.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Tenant1_View_Config\",\r\n \"description\": \"\",\r\n \"job_type\": \"run\",\r\n \"inventory\": {{tower_inventory_id}},\r\n \"project\": {{tower_project_id}},\r\n \"playbook\": \"files/tower/playbooks/view_current_apps.yaml\",\r\n \"credential\": {{tower_credentials_id}},\r\n \"survey_enabled\": true,\r\n \"allow_simultaneous\": false,\r\n \"extra_vars\": \"---\\ntenant: Tenant1\"\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "" ] } }, "response": [] }, { "name": "Step 2: Create Template (Deploy Config)", "event": [ { "listen": "test", "script": { "id": "41d148a6-3acc-4c4a-be42-ee8864e8ee93", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_updatetemplate_id\", jsonData.id);", "postman.setEnvironmentVariable(\"tower_deployconfig_execute_id\", jsonData.summary_fields.object_roles.execute_role.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Tenant1_Deploy_Config\",\r\n \"description\": \"\",\r\n \"job_type\": \"run\",\r\n \"inventory\": {{tower_inventory_id}},\r\n \"project\": {{tower_project_id}},\r\n \"playbook\": \"files/tower/playbooks/tenant_template.yaml\",\r\n \"credential\": {{tower_credentials_id}},\r\n \"survey_enabled\": true,\r\n \"allow_simultaneous\": false\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "" ] } }, "response": [] }, { "name": "Step 3: Create Survey (Deploy Config)", "event": [ { "listen": "test", "script": { "id": "7b52d505-dc4e-451e-b11b-83cf2fb2c8af", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"description\": \"Survey for Deploy\",\r\n \"name\": \"Survey for Deploy\",\r\n \"spec\": [\r\n {\r\n \"required\": true,\r\n \"min\": null,\r\n \"default\": \"Tenant1\",\r\n \"max\": null,\r\n \"question_description\": \"\",\r\n \"choices\": \"Tenant1\",\r\n \"new_question\": true,\r\n \"variable\": \"tenant\",\r\n \"question_name\": \"Tenant\",\r\n \"type\": \"multiplechoice\"\r\n },\r\n {\r\n \"question_description\": \"JSON file which contains the desired application parameters\",\r\n \"min\": null,\r\n \"default\": \"\",\r\n \"max\": null,\r\n \"required\": true,\r\n \"choices\": \"f5-http-app\\nf5-https-offload-app\\nf5-tcp-app\\nf5-udp-app\\nf5-http-irule-routing-app\\nf5-https-waf-app\",\r\n \"variable\": \"f5_template\",\r\n \"question_name\": \"Template file\",\r\n \"type\": \"multiplechoice\"\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/{{tower_updatetemplate_id}}/survey_spec/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "{{tower_updatetemplate_id}}", "survey_spec", "" ] } }, "response": [] }, { "name": "Step 4: Create Template (Pool_Replace_Members) PATCH", "event": [ { "listen": "test", "script": { "id": "6cc0864c-64a9-48bf-abe4-62acd05b2494", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_pm_replace_patch_id\", jsonData.id);", "postman.setEnvironmentVariable(\"tower_pm_replace_patch_execute_id\", jsonData.summary_fields.object_roles.execute_role.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Tenant1_Pool_Update_All_Members\",\r\n \"description\": \"\",\r\n \"job_type\": \"run\",\r\n \"inventory\": {{tower_inventory_id}},\r\n \"project\": {{tower_project_id}},\r\n \"playbook\": \"files/tower/playbooks/update-all_members.yaml\",\r\n \"credential\": {{tower_credentials_id}},\r\n \"survey_enabled\": true,\r\n \"allow_simultaneous\": false,\r\n \"ask_variables_on_launch\": true,\r\n \"extra_vars\": \"members:\\n- {ip: , port: , status: true}\\n- {ip: , port: , status: true}\"\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "" ] } }, "response": [] }, { "name": "Step 5: Create Survey (Pool Replace) PATCH", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"description\": \"Survey for Updating Members\",\r\n \"name\": \"Survey for Updating Members\",\r\n \"spec\": [\r\n {\r\n \"question_description\": \"Bigip Partition (Tenant1, Tenant2, etc..)\",\r\n \"min\": null,\r\n \"default\": \"Tenant1\",\r\n \"max\": null,\r\n \"required\": true,\r\n \"choices\": \"Tenant1\",\r\n \"variable\": \"tenant\",\r\n \"question_name\": \"Tenant\",\r\n \"type\": \"multiplechoice\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"\",\r\n \"max\": 1024,\r\n \"question_description\": \"Application Name on Bigip\",\r\n \"choices\": \"\",\r\n \"variable\": \"application\",\r\n \"question_name\": \"Application\",\r\n \"type\": \"text\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"\",\r\n \"max\": 1024,\r\n \"question_description\": \"Bigip Pool Name\",\r\n \"choices\": \"\",\r\n \"new_question\": true,\r\n \"variable\": \"pool\",\r\n \"question_name\": \"Pool Name\",\r\n \"type\": \"text\"\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/{{tower_pm_replace_patch_id}}/survey_spec/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "{{tower_pm_replace_patch_id}}", "survey_spec", "" ] } }, "response": [] }, { "name": "Step 6: Create Template (Add_Member) PATCH", "event": [ { "listen": "test", "script": { "id": "37eaf9f1-998c-4b9c-b2e6-ec54c2548026", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_pm_add_patch_id\", jsonData.id);", "postman.setEnvironmentVariable(\"tower_pm_add_patch_execute_id\", jsonData.summary_fields.object_roles.execute_role.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Tenant1_Pool_Add_Member\",\r\n \"description\": \"\",\r\n \"job_type\": \"run\",\r\n \"inventory\": {{tower_inventory_id}},\r\n \"project\": {{tower_project_id}},\r\n \"playbook\": \"files/tower/playbooks/add-del_member.yaml\",\r\n \"credential\": {{tower_credentials_id}},\r\n \"survey_enabled\": true,\r\n \"allow_simultaneous\": false\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "" ] } }, "response": [] }, { "name": "Step 7: Create Survey (Add_Member) PATCH", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"description\": \"Survey for Adding a Member\",\r\n \"name\": \"Survey for Adding a Member\",\r\n \"spec\": [\r\n {\r\n \"question_description\": \"Bigip Partition (Tenant1, Tenant2, etc..)\",\r\n \"min\": null,\r\n \"default\": \"Tenant1\",\r\n \"max\": null,\r\n \"required\": true,\r\n \"choices\": \"Tenant1\",\r\n \"variable\": \"tenant\",\r\n \"question_name\": \"Tenant\",\r\n \"type\": \"multiplechoice\"\r\n },\r\n {\r\n \"question_description\": \"Action\",\r\n \"min\": null,\r\n \"default\": \"add\",\r\n \"max\": null,\r\n \"required\": true,\r\n \"choices\": \"add\",\r\n \"variable\": \"cur_action\",\r\n \"question_name\": \"Action\",\r\n \"type\": \"multiplechoice\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"\",\r\n \"max\": 1024,\r\n \"question_description\": \"Application Name on Bigip\",\r\n \"choices\": \"\",\r\n \"variable\": \"application\",\r\n \"question_name\": \"Application\",\r\n \"type\": \"text\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"\",\r\n \"max\": 1024,\r\n \"question_description\": \"Bigip Pool Name\",\r\n \"choices\": \"\",\r\n \"new_question\": true,\r\n \"variable\": \"pool\",\r\n \"question_name\": \"Pool Name\",\r\n \"type\": \"text\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"\",\r\n \"max\": 1024,\r\n \"question_description\": \"New Member\",\r\n \"choices\": \"\",\r\n \"new_question\": true,\r\n \"variable\": \"new_member\",\r\n \"question_name\": \"New Member IP\",\r\n \"type\": \"text\"\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/{{tower_pm_add_patch_id}}/survey_spec/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "{{tower_pm_add_patch_id}}", "survey_spec", "" ] } }, "response": [] }, { "name": "Step 8: Create Template (Del_Member) PATCH", "event": [ { "listen": "test", "script": { "id": "671b3707-372f-4081-a6ed-2c78ac4a6227", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_pm_del_patch_id\", jsonData.id);", "postman.setEnvironmentVariable(\"tower_pm_del_patch_execute_id\", jsonData.summary_fields.object_roles.execute_role.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Tenant1_Pool_Delete_Member\",\r\n \"description\": \"\",\r\n \"job_type\": \"run\",\r\n \"inventory\": {{tower_inventory_id}},\r\n \"project\": {{tower_project_id}},\r\n \"playbook\": \"files/tower/playbooks/add-del_member.yaml\",\r\n \"credential\": {{tower_credentials_id}},\r\n \"survey_enabled\": true,\r\n \"allow_simultaneous\": false\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "" ] } }, "response": [] }, { "name": "Step 9: Create Survey (Del_Member) PATCH", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"description\": \"Survey for Deleting a Member\",\r\n \"name\": \"Survey for Deleting a Member\",\r\n \"spec\": [\r\n {\r\n \"question_description\": \"Bigip Partition (Tenant1, Tenant2, etc..)\",\r\n \"min\": null,\r\n \"default\": \"Tenant1\",\r\n \"max\": null,\r\n \"required\": true,\r\n \"choices\": \"Tenant1\",\r\n \"variable\": \"tenant\",\r\n \"question_name\": \"Tenant\",\r\n \"type\": \"multiplechoice\"\r\n },\r\n {\r\n \"question_description\": \"Action\",\r\n \"min\": null,\r\n \"default\": \"del\",\r\n \"max\": null,\r\n \"required\": true,\r\n \"choices\": \"del\",\r\n \"variable\": \"cur_action\",\r\n \"question_name\": \"Action\",\r\n \"type\": \"multiplechoice\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"\",\r\n \"max\": 1024,\r\n \"question_description\": \"Application Name on Bigip\",\r\n \"choices\": \"\",\r\n \"variable\": \"application\",\r\n \"question_name\": \"Application\",\r\n \"type\": \"text\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"\",\r\n \"max\": 1024,\r\n \"question_description\": \"Bigip Pool Name\",\r\n \"choices\": \"\",\r\n \"new_question\": true,\r\n \"variable\": \"pool\",\r\n \"question_name\": \"Pool Name\",\r\n \"type\": \"text\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"\",\r\n \"max\": 1024,\r\n \"question_description\": \"Index of Member to Remove\",\r\n \"choices\": \"\",\r\n \"new_question\": true,\r\n \"variable\": \"mem_index\",\r\n \"question_name\": \"Index of Member to Remove\",\r\n \"type\": \"text\"\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/{{tower_pm_del_patch_id}}/survey_spec/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "{{tower_pm_del_patch_id}}", "survey_spec", "" ] } }, "response": [] }, { "name": "Step 10: Create Template (SSL PATCH)", "event": [ { "listen": "test", "script": { "id": "480b195b-66f1-41f3-8faf-f91275b16bda", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_sslpatch_id\", jsonData.id);", "postman.setEnvironmentVariable(\"tower_sslpatch_execute_id\", jsonData.summary_fields.object_roles.execute_role.id);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"name\": \"Tenant1_Update_CRT_KEY\",\r\n \"description\": \"\",\r\n \"job_type\": \"run\",\r\n \"inventory\": {{tower_inventory_id}},\r\n \"project\": {{tower_project_id}},\r\n \"playbook\": \"files/tower/playbooks/update_crtkey.yaml\",\r\n \"credential\": {{tower_credentials_id}},\r\n \"survey_enabled\": true,\r\n \"allow_simultaneous\": false\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "" ] } }, "response": [] }, { "name": "Step 11: Create Survey (SSL Update) PATCH", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\r\n \"description\": \"Survey for Deleting a Member\",\r\n \"name\": \"Survey for Deleting a Member\",\r\n \"spec\": [\r\n {\r\n \"question_description\": \"Bigip Partition (Tenant1, Tenant2, etc..)\",\r\n \"min\": null,\r\n \"default\": \"Tenant1\",\r\n \"max\": null,\r\n \"required\": true,\r\n \"choices\": \"Tenant1\",\r\n \"variable\": \"tenant\",\r\n \"question_name\": \"Tenant\",\r\n \"type\": \"multiplechoice\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"\",\r\n \"max\": 1024,\r\n \"question_description\": \"Application Name on Bigip\",\r\n \"choices\": \"\",\r\n \"variable\": \"application\",\r\n \"question_name\": \"Application\",\r\n \"type\": \"text\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"-----BEGIN CERTIFICATE-----\\\\nMIIDBzCCAe+gAwIBAgIJAJwpww/WY3PaMA0GCSqGSIb3DQEBCwUAMBoxGDAWBgNV\\\\nBAMMD3Rlc3QyLmxvY2FsaG9zdDAeFw0xODA3MTYyMzA4MjhaFw0xOTA3MTYyMzA4\\\\nMjhaMBoxGDAWBgNVBAMMD3Rlc3QyLmxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEB\\\\nBQADggEPADCCAQoCggEBAMY2U0octIbuMWW9D4eMbRQkGO1qz654ZR398ZeT0c9O\\\\ne2NuNiK1TQlqJ26bTZANy22E/py+0i6dCoAoUl/wKjlxijjqrRV1fKOrdP7RSPEF\\\\nnGCyaj8B4qhVk3S4ExkL1AiURqvSaFZAu9pnfFkYNiGzSObWMi2s8GgEBKNpZr/r\\\\n1lpJCDLV3IZ0uBil+xmlmIHI6J1yboXs0zAx5yt8SuoIGoOkuFnHp03IH/sLo0nH\\\\ni+c8nOmfOXYPwzBvZGC1RupLU/p06YM/YG60Idlj2GGuXewnPIGfm3QfYth0mwST\\\\nm7xWPTcRBi+spsKJ0aWtGGbhMjj1WPi7HOcD0/tFJ20CAwEAAaNQME4wHQYDVR0O\\\\nBBYEFCrTDPRa/2/HHvJEHbq+dqYM3ymDMB8GA1UdIwQYMBaAFCrTDPRa/2/HHvJE\\\\nHbq+dqYM3ymDMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAJ8StxLs\\\\nkKXRQSM5NxnVpVBDjKRVGAnVC0dSBXDdODM2rhWhHESFWKmduD6h6sopWStf0c2L\\\\nJR1dExTvlCmwav0sZGFEllPbUZDZKsBSjHK26PVzw6ztPi70rHKaP/PhBu9XX/AK\\\\n6dVe1Nx7peMD50WnsP7R2bSq8dSQcNRk/b+pEeYCHSgujdKHX9SvKY/ezlJkqUG+\\\\n7iq5NTfpThpPDn0A99DGj9fIqu+U7iH6HuIL43AzDrD96MGS/1/w5fVcniX2dMhL\\\\nQohIeac9iHaNZCHWeHRmjaOy/Xie8/HQZbRZXvLb1SoI8XsBxqPBNcBeolUi7uP4\\\\nCyRmchvyUMi4hNI=\\\\n-----END CERTIFICATE-----\",\r\n \"max\": 4096,\r\n \"question_description\": \"New SSL CRT\",\r\n \"choices\": \"\",\r\n \"new_question\": true,\r\n \"variable\": \"new_crt\",\r\n \"question_name\": \"New SSL CRT\",\r\n \"type\": \"textarea\"\r\n },\r\n {\r\n \"required\": true,\r\n \"min\": 0,\r\n \"default\": \"-----BEGIN PRIVATE KEY-----\\\\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDGNlNKHLSG7jFl\\\\nvQ+HjG0UJBjtas+ueGUd/fGXk9HPTntjbjYitU0Jaidum02QDctthP6cvtIunQqA\\\\nKFJf8Co5cYo46q0VdXyjq3T+0UjxBZxgsmo/AeKoVZN0uBMZC9QIlEar0mhWQLva\\\\nZ3xZGDYhs0jm1jItrPBoBASjaWa/69ZaSQgy1dyGdLgYpfsZpZiByOidcm6F7NMw\\\\nMec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Ee2AY2cS4xZz8bUCgYAF\\\\nf88kXAdycmtxtugjQ4XLRMqgOv1u+w7l62imcWJFimgcIrMOF/yvg5Ej/Qg1RlQv\\\\n0IDStNFdVyu027EQvzd5BHZaLtJ5KcvzALXANKKNamvyb5Ujwc62a4hWQhvqXv67\\\\no5fEZRSrCxkMeEIBDfLa4RMTDgBQn5w6gKCrKN98fQKBgCn6INRwJrUK4brpDkMn\\\\ndkZTOpLENHNYfFVA/fzCDMW1RyCUWXMxzpVdvb4XmITKBVrgZGCsIrVgSteF8qiq\\\\nGShYrRFBcOUq+3ufFN3gM5w1xDgN9E1rPzLmWH1HqA+IDb/yedCyorF9lLlqLEO2\\\\nk9r0lKx9TrbsHCceWKFEK0OQ\\\\n-----END PRIVATE KEY-----\",\r\n \"max\": 4096,\r\n \"question_description\": \"New SSL KEY\",\r\n \"choices\": \"\",\r\n \"new_question\": true,\r\n \"variable\": \"new_key\",\r\n \"question_name\": \"New SSL KEY\",\r\n \"type\": \"textarea\"\r\n }\r\n ]\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/{{tower_sslpatch_id}}/survey_spec/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "{{tower_sslpatch_id}}", "survey_spec", "" ] } }, "response": [] } ], "_postman_isSubFolder": true }, { "name": "Apply Permissions to Templates", "item": [ { "name": "Step 1: Permissions (View Config Ops)", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\n \"id\":{{tower_viewconfig_execute_id}}\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/teams/{{tower_t1ops_id}}/roles/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "teams", "{{tower_t1ops_id}}", "roles", "" ] } }, "response": [] }, { "name": "Step 2: Permissions (View Config Admins)", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\n \"id\":{{tower_viewconfig_execute_id}}\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/teams/{{tower_t1admin_id}}/roles/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "teams", "{{tower_t1admin_id}}", "roles", "" ] } }, "response": [] }, { "name": "Step 3: Permissions (Deploy Config Admins)", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\n \"id\":{{tower_deployconfig_execute_id}}\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/teams/{{tower_t1admin_id}}/roles/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "teams", "{{tower_t1admin_id}}", "roles", "" ] } }, "response": [] }, { "name": "Step 4: Permissions (Pool Member PATCH Ops)", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\n \"id\":{{tower_pm_replace_patch_execute_id}}\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/teams/{{tower_t1ops_id}}/roles/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "teams", "{{tower_t1ops_id}}", "roles", "" ] } }, "response": [] }, { "name": "Step 5: Permissions (Pool Member Add Ops)", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\n \"id\":{{tower_pm_add_patch_execute_id}}\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/teams/{{tower_t1ops_id}}/roles/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "teams", "{{tower_t1ops_id}}", "roles", "" ] } }, "response": [] }, { "name": "Step 6: Permissions (Pool Member Del Ops)", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\n \"id\":{{tower_pm_del_patch_execute_id}}\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/teams/{{tower_t1ops_id}}/roles/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "teams", "{{tower_t1ops_id}}", "roles", "" ] } }, "response": [] }, { "name": "Step 6: Permissions (SSL Ops)", "event": [ { "listen": "test", "script": { "id": "cbc8125e-d625-4f7f-83a2-59706168fa71", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\n \"id\":{{tower_sslpatch_execute_id}}\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/teams/{{tower_t1ops_id}}/roles/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "teams", "{{tower_t1ops_id}}", "roles", "" ] } }, "response": [] } ], "_postman_isSubFolder": true } ] }, { "name": "Lab 3.4 - Ansible Tower and REST", "item": [ { "name": "Step1: Retrieve Authentication Token", "event": [ { "listen": "test", "script": { "id": "8f63439f-dd58-4f75-be6a-5910cacc1934", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"TowerToken\", jsonData.token);" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n \"username\": \"{{tower_username}}\",\r\n \"password\": \"{{tower_password}}\"\r\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/authtoken/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "authtoken", "" ] } }, "response": [] }, { "name": "Step2: Get Tenant1_Pool_Add_Member ID", "event": [ { "listen": "test", "script": { "id": "5bd1af4a-4280-4f36-b336-d807852c9035", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "postman.setEnvironmentVariable(\"tower_pm_add_patch_id\", jsonData.id);" ] } } ], "request": { "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/Tenant1_Pool_Add_Member", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "Tenant1_Pool_Add_Member" ] } }, "response": [] }, { "name": "Step3: Run Tenant1_Pool_Add_Member", "event": [ { "listen": "test", "script": { "id": "0665ece2-0045-48c8-86b0-3282f09bda79", "type": "text/javascript", "exec": [ "" ] } } ], "request": { "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Token {{TowerToken}}" } ], "body": { "mode": "raw", "raw": "{\n \"extra_vars\": {\n \"pool\": \"web_pool\",\n \"application\": \"A2\",\n \"cur_action\": \"add\",\n \"tenant\": \"Tenant1\",\n \"new_member\": \"10.1.10.105\"\n }\n}" }, "url": { "raw": "https://{{tower_mgmt}}/api/v2/job_templates/{{tower_pm_add_patch_id}}/launch/", "protocol": "https", "host": [ "{{tower_mgmt}}" ], "path": [ "api", "v2", "job_templates", "{{tower_pm_add_patch_id}}", "launch", "" ] } }, "response": [] } ] }, { "name": "Lab 4 - BIG-IQ and AS3", "item": [ { "name": "BIG-IQ Token (david)", "event": [ { "listen": "test", "script": { "id": "c978da4e-54b1-4f35-be8a-3a69a68fa973", "exec": [ "var jsonData = JSON.parse(responseBody);", "pm.globals.set(\"_f5_token\", jsonData.token.token);" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n \"username\": \"david\",\r\n \"password\": \"david\",\r\n \"loginProviderName\": \"tmos\"\r\n}" }, "url": { "raw": "https://{{bigiq_mgmt}}/mgmt/shared/authn/login", "protocol": "https", "host": [ "10", "1", "1", "4" ], "path": [ "mgmt", "shared", "authn", "login" ] } }, "response": [] }, { "name": "BIG-IQ Token (olivia)", "event": [ { "listen": "test", "script": { "id": "c978da4e-54b1-4f35-be8a-3a69a68fa973", "type": "text/javascript", "exec": [ "var jsonData = JSON.parse(responseBody);", "pm.globals.set(\"_f5_token\", jsonData.token.token);" ] } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\r\n \"username\": \"olivia\",\r\n \"password\": \"olivia\",\r\n \"loginProviderName\": \"tmos\"\r\n}" }, "url": { "raw": "https://{{bigiq_mgmt}}/mgmt/shared/authn/login", "protocol": "https", "host": [ "10", "1", "1", "4" ], "path": [ "mgmt", "shared", "authn", "login" ] } }, "response": [] }, { "name": "BIG-IQ AS3 Declaration", "event": [ { "listen": "prerequest", "script": { "id": "2161246c-5ba5-41fe-a244-89a641e07279", "exec": [ "" ], "type": "text/javascript" } }, { "listen": "test", "script": { "id": "d173b20e-fd6a-4ef5-833b-85dd0141d0d6", "exec": [ "var jsonData = pm.response.json();\r", "pm.globals.set(\"bigiq_task_id\", jsonData.id);" ], "type": "text/javascript" } } ], "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{_f5_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigiq_mgmt}}/mgmt/shared/appsvcs/declare?async=true", "protocol": "https", "host": [ "10", "1", "1", "4" ], "path": [ "mgmt", "shared", "appsvcs", "declare" ], "query": [ { "key": "async", "value": "true" } ] } }, "response": [] }, { "name": "BIG-IQ Check AS3 Deployment Task", "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{_f5_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigiq_mgmt}}/mgmt/shared/appsvcs/task/{{bigiq_task_id}}", "protocol": "https", "host": [ "10", "1", "1", "4" ], "path": [ "mgmt", "shared", "appsvcs", "task", "{{bigiq_task_id}}" ] } }, "response": [] }, { "name": "BIG-IQ AS3 Templates Creation", "request": { "method": "POST", "header": [ { "key": "X-F5-Auth-Token", "value": "{{_f5_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigiq_mgmt}}/mgmt/cm/global/appsvcs-templates", "protocol": "https", "host": [ "10", "1", "1", "4" ], "path": [ "mgmt", "cm", "global", "appsvcs-templates" ] } }, "response": [] }, { "name": "BIG-IQ AS3 Templates List", "request": { "method": "GET", "header": [ { "key": "X-F5-Auth-Token", "value": "{{_f5_token}}" }, { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "" }, "url": { "raw": "https://{{bigiq_mgmt}}/mgmt/cm/global/appsvcs-templates", "protocol": "https", "host": [ "10", "1", "1", "4" ], "path": [ "mgmt", "cm", "global", "appsvcs-templates" ] } }, "response": [] } ] } ], "event": [ { "listen": "prerequest", "script": { "id": "6bc859cd-3989-4415-a39d-3efa2eaa181f", "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "id": "b59485b1-c0be-46d0-a43c-95bf234efffd", "type": "text/javascript", "exec": [ "" ] } } ] }