Skip to content

Changes to Class 2 #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions docs/class2/class2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,6 @@ The entire class will be run from within the F5 Lab Created environment, for
access to the lab please ask your instructor, or continue with the self-paced
labs from f5.com/supernetops.

.. NOTE:: If you are running this lab independent from Class 1 you will want
to restore BIGIP-A from UCS ``bigip-a-module3.ucs`` located in the
``in_case_of_emergency folder``. Not restoring BIGIP-A will result
in services unable to be accessed and nodes/pool members offline.
This restore **MUST** be done via TMSH with a ``no-license`` flag.

The UCS file is located on the Linux Jumphost at:
``/home/ubuntu/Desktop/in_case_of_emergency/bigip-a-module3.ucs``

Expected time to complete: **3 hours**

.. toctree::
Expand Down
4 changes: 2 additions & 2 deletions docs/class2/module2/lab4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ Task 1 - Run a f5-newman-wrapper Workflow
},
{
"type": "any",
"value": "12.1.1",
"value": "13.1.0.8",
"key": "bigip_version"
},
{
"type": "any",
"value": "1.0.196",
"value": "0.0.3",
"key": "bigip_build"
}
]
Expand Down
8 changes: 4 additions & 4 deletions docs/class2/module2/lab5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -683,12 +683,12 @@ Task 3 - Run the Workflow
},
{
"type": "any",
"value": "12.1.1",
"value": "13.1.0.8",
"key": "bigip_a_version"
},
{
"type": "any",
"value": "1.0.196",
"value": "0.0.3",
"key": "bigip_a_build"
},
{
Expand All @@ -698,12 +698,12 @@ Task 3 - Run the Workflow
},
{
"type": "any",
"value": "12.1.1",
"value": "13.1.0.8",
"key": "bigip_b_version"
},
{
"type": "any",
"value": "1.0.196",
"value": "0.0.3",
"key": "bigip_b_build"
}
]
Expand Down
Binary file modified docs/class2/module3/images/lab-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/class2/module3/images/lab-2-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/class2/module3/images/lab-2-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/class2/module3/images/lab-3-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/class2/module3/images/lab-3-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class2/module3/images/lab-3-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class2/module3/images/lab-3-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/class2/module3/images/module-3-1.png
Binary file not shown.
Binary file removed docs/class2/module3/images/module-3-2.png
Binary file not shown.
254 changes: 127 additions & 127 deletions docs/class2/module3/lab2.rst

Large diffs are not rendered by default.

148 changes: 84 additions & 64 deletions docs/class2/module3/lab3.rst

Large diffs are not rendered by default.

88 changes: 39 additions & 49 deletions docs/class2/module3/lab4.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ Lab |labmodule|\.\ |labnum| - Execute an f5-newman-wrapper for **Teardown**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To get ready for the next module, we're going to execute one last f5-newman-wrapper
directly. This file is designed to delete the framework and service we created in the
last few labs. We used 2 f5-newman-wrapper files to create our service, but for the deletion
we will only use 1. This is important because we can seperate the service nodes
availability into Infrastructure as Code concepts loosely coupled from the service
and calls needed.
directly. This file will delete the framework and service we created in the
last few labs. We've used a few f5-newman-wrapper files to create our service,
and show some mutation, but for the deletion we will only use 1. As AS3 is
declaration engine is a single call ``can`` be used to create a service and a
single call can be used to remove it.

Task 1 - Execute f5-newman-build-5
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#. Navigate to the location containing the f5-newman-wrapper files ``cd ~/f5-automation-labs/jenkins/f5-newman-build``
#. Navigate to the location containing the f5-newman-wrapper files ``cd /home/snops/f5-automation-labs/jenkins/f5-newman-build``
#. On BIG-IP A examine the virtual server ``module_3_vs``, it should be active and Green:

|module-3-1|
|lab-3-1|

#. On BIGIP-A examine the pool ``module_3_pool``, you should show 2 active members Green:
#. On BIGIP-A examine the pool ``module_3_pool``, you should show 3 active members Green:

|module-3-2|
|lab-3-4|

#. ``f5-newman-build-5`` contains calls to delete all items we've created in the last few modules
#. ``f5-newman-build-5`` contains the call to delete all items we've created in the last few modules

Execute: ``f5-newman-wrapper f5-newman-build-5``

Expand All @@ -36,27 +36,27 @@ Task 1 - Execute f5-newman-build-5
.. code-block:: console
:linenos:

$ f5-newman-wrapper f5-newman-build-5
[f5-newman-build-5-2017-07-26-09-28-13] starting run
[f5-newman-build-5-2017-07-26-09-28-13] [runCollection][Authenticate to BIG-IP] running...
[root@f5-super-netops] [/home/snops/f5-automation-labs/jenkins/f5-newman-build] # f5-newman-wrapper f5-newman-build-5
[f5-newman-build-5-2018-07-30-08-06-14] starting run
[f5-newman-build-5-2018-07-30-08-06-14] [runCollection][Authenticate to BIG-IP] running...
newman

BIGIP_API_Authentication

❏ 1_Authenticate
↳ Authenticate and Obtain Token
POST https://10.1.1.10/mgmt/shared/authn/login [200 OK, 1.41KB, 194ms]
POST https://10.1.1.10/mgmt/shared/authn/login [200 OK, 1.62KB, 367ms]
✓ [POST Response Code]=200
✓ [Populate Variable] bigip_token=NGEHHD6ZDJFD2MNF2UL3UXTGVH
✓ [Populate Variable] bigip_token=5EKXOKALEB2E7TALKKANCK6GUD

↳ Verify Authentication Works
GET https://10.1.1.10/mgmt/shared/authz/tokens/NGEHHD6ZDJFD2MNF2UL3UXTGVH [200 OK, 1.23KB, 16ms]
GET https://10.1.1.10/mgmt/shared/authz/tokens/5EKXOKALEB2E7TALKKANCK6GUD [200 OK, 1.44KB, 24ms]
✓ [GET Response Code]=200
✓ [Current Value] token=NGEHHD6ZDJFD2MNF2UL3UXTGVH
✓ [Check Value] token == NGEHHD6ZDJFD2MNF2UL3UXTGVH
✓ [Current Value] token=5EKXOKALEB2E7TALKKANCK6GUD
✓ [Check Value] token == 5EKXOKALEB2E7TALKKANCK6GUD

↳ Set Authentication Token Timeout
PATCH https://10.1.1.10/mgmt/shared/authz/tokens/NGEHHD6ZDJFD2MNF2UL3UXTGVH [200 OK, 1.23KB, 17ms]
PATCH https://10.1.1.10/mgmt/shared/authz/tokens/5EKXOKALEB2E7TALKKANCK6GUD [200 OK, 1.44KB, 83ms]
✓ [PATCH Response Code]=200
✓ [Current Value] timeout=1200
✓ [Check Value] timeout == 1200
Expand All @@ -74,60 +74,50 @@ Task 1 - Execute f5-newman-build-5
├─────────────────────────┼──────────┼──────────┤
│ assertions │ 8 │ 0 │
├─────────────────────────┴──────────┴──────────┤
│ total run duration: 835ms
│ total run duration: 1062ms
├───────────────────────────────────────────────┤
│ total data received: 1.71KB (approx) │
│ total data received: 1.72KB (approx) │
├───────────────────────────────────────────────┤
│ average response time: 75ms
│ average response time: 158ms
└───────────────────────────────────────────────┘
[f5-newman-build-5-2017-07-26-09-28-13] [runCollection][5 - Clean Up Service] running...
[f5-newman-build-5-2018-07-30-08-06-14] [runCollection][5 - Clean Up Service] running...
newman

f5-programmability-class-2

❏ 5 - Clean Up Service
↳ Step 1: Delete a Virtual Server
DELETE https://10.1.1.10/mgmt/tm/ltm/virtual/module_3_vs [200 OK, 740B, 57ms]

↳ Step 2: Delete a TCP Profile
DELETE https://10.1.1.10/mgmt/tm/ltm/profile/tcp/module_3_tcp_clientside [200 OK, 740B, 88ms]

↳ Step 3: Delete a HTTP Profile
DELETE https://10.1.1.10/mgmt/tm/ltm/profile/http/module_3_http [200 OK, 740B, 56ms]

↳ Step 4: Delete a Pool
DELETE https://10.1.1.10/mgmt/tm/ltm/pool/module_3_pool [200 OK, 740B, 47ms]

↳ Step 5: Delete a HTTP Monitor
DELETE https://10.1.1.10/mgmt/tm/ltm/monitor/http/module_3_http_monitor [200 OK, 740B, 59ms]
↳ Step 1: Delete HTTP Application
DELETE https://10.1.1.10/mgmt/shared/appsvcs/declare/ [200 OK, 1.2KB, 12s]
✓ [DELETE Response Code]=200
✓ [Current Value] results.0.message=success
✓ [Check Value] results.0.message regex /success|no change/

┌─────────────────────────┬──────────┬──────────┐
│ │ executed │ failed │
├─────────────────────────┼──────────┼──────────┤
│ iterations │ 1 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ requests │ 5 │ 0 │
│ requests │ 1 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ test-scripts │ 0 │ 0 │
│ test-scripts │ 2 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ prerequest-scripts │ 0 │ 0 │
│ prerequest-scripts │ 1 │ 0 │
├─────────────────────────┼──────────┼──────────┤
│ assertions │ 0 │ 0 │
│ assertions │ 3 │ 0 │
├─────────────────────────┴──────────┴──────────┤
│ total run duration: 445ms
│ total run duration: 12.3s
├───────────────────────────────────────────────┤
│ total data received: 0B (approx)
│ total data received: 273B (approx) │
├───────────────────────────────────────────────┤
│ average response time: 61ms
│ average response time: 12s
└───────────────────────────────────────────────┘
[f5-newman-build-5-2017-07-26-09-28-13] run completed in 4s, 267.464 ms

[f5-newman-build-5-2018-07-30-08-06-14] run completed

.. NOTE:: Notice the 200 OK responses, as it completed successfully

#. On BIG-IP A examine Virtual ``module_3_vs`` and Pool ``module_3_pool`` are deleted
#. On BIG-IP A the Partition, Virtual ``module_3_vs`` and Pool ``module_3_pool`` are deleted

.. |module-3-1| image:: images/module-3-1.png
.. |lab-3-1| image:: images/lab-3-1.png
:scale: 70%
.. |module-3-2| image:: images/module-3-2.png
.. |lab-3-4| image:: images/lab-3-4.png
:scale: 70%
14 changes: 4 additions & 10 deletions docs/class2/module3/module3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ Module 3: Stitching Workflows from Class 1 into new Orchestratable Collections
==============================================================================

In the previous module we saw the example of stitching together the Authentication
Folder and some facts gathering. We will now stitch together the Postman
Collection from Class 1 and the Authentication Collection from Module 2. Once we
validate the new file we'll use f5-newman-wrapper to execute.
Folder and some facts gathering. We will now stitch together a new Postman
Collection containing our application defined with AS3 Declarations
and the Authentication Collection from Module 2. Once we
validate some new files we'll use f5-newman-wrapper to execute this workflow.

Stitching together the collections and workflows allows Super-NetOps engineers
the ability to start quickly Orchestrating calls running Automation workflows.
Expand All @@ -13,13 +14,6 @@ This also allows BIG-IP to be Orchestrated from upper level orchestration toolki
Using this structure allows you to build your own solutions, to manage BIG-IP
quickly as native REST calls are used.

.. NOTE:: If you are running this lab independent from Class 1 you will want
to restore BIGIP-A from UCS ``bigip-a-module3.ucs``. Not restoring
BIGIP-A will result in services unable to be accessed
and nodes/pool members unavailable. The steps for a UCS restore can
be found under the **HOWTos: Index** in the content tree on the left
side of the Lab Guide


.. toctree::
:maxdepth: 1
Expand Down
Binary file modified docs/class2/module4/images/lab-2-15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/class2/module4/lab1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Task 1 - Locating the Jenkins files and how they are setup

#. Lets make sure the Jekins files were mapped correctly.

Execute: ``cd ~/f5-automation-labs/jenkins`` to access our folder containing the Jenkins Pipeline Files
Execute: ``cd /home/snops/f5-automation-labs/jenkins/f5-newman-build`` to access our folder containing the Jenkins Pipeline Files

#. The Jenkins files are located alongside the f5-newman-wrapper files we've used in the previous labs, setup this way was for ease of learning. You may place tools in different structures in your environment.

Expand Down
60 changes: 27 additions & 33 deletions jenkins/f5-newman-build/f5-newman-build-1
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
{
"name":"f5-newman-build-1",
"description":"Execute a chained workflow that authenticates to a BIG-IP and builds configuration",
"globalEnvVars":"/home/snops/f5-postman-workflows/framework/f5-postman-workflows.postman_globals.json",
"globalOptions": {
"insecure":true,
"reporters":["cli"]
},
"globalVars": {
"bigip_mgmt": "10.1.1.10",
"bigip_username":"admin",
"bigip_password":"admin",
"bigip_partition":"Common",
"bigip_pool_name":"module_3_pool",
"bigip_pool_member":"10.1.10.101:8002",
"bigip_object_state":"user-up",
"bigip_object_session":"user-enabled",
"bigip_vs_name":"module_3_vs",
"bigip_vs_destination":"10.1.20.121:80",
"bigip_node_name":"10.1.10.101",
"bigip_http_monitor":"module_3_http_monitor",
"bigip_http_profile":"module_3_http",
"bigip_tcp_profile":"module_3_tcp_clientside"
},
"workflow": [
{
"name":"Authenticate to BIG-IP",
"options": {
"collection":"/home/snops/f5-postman-workflows/collections/BIG_IP/BIGIP_API_Authentication.postman_collection.json",
"folder":"1_Authenticate"
}
}, (REMOVE THIS TEXT AND ADD YOUR CODE BELOW)
"name": "f5-newman-build-1",
"description": "Execute a chained workflow that authenticates to a BIG-IP and builds configuration",
"globalEnvVars": "/home/snops/f5-postman-workflows/framework/f5-postman-workflows.postman_globals.json",
"globalOptions": {
"insecure": true,
"reporters": ["cli"]
},
"globalVars": {
"bigip_mgmt": "10.1.1.10",
"bigip_username": "admin",
"bigip_password": "admin",
"bigip_partition": "module_3",
"bigip_pool_name": "module_3_pool",
"bigip_pool_member": "10.1.10.101",
"bigip_vs_name": "module_3_vs",
"bigip_vs_destination": "10.1.20.129",
"bigip_node_name": "10.1.10.101"
},
"workflow": [{
"name": "Authenticate to BIG-IP",
"options": {
"collection": "/home/snops/f5-postman-workflows/collections/BIG_IP/BIGIP_API_Authentication.postman_collection.json",
"folder": "1_Authenticate"
}
}, (REMOVE THIS TEXT AND ADD YOUR CODE BELOW)

}
]
}
]
}
74 changes: 34 additions & 40 deletions jenkins/f5-newman-build/f5-newman-build-2
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,42 +1,36 @@
{
"name":"f5-newman-build-2",
"description":"Execute a chained workflow that authenticates to a BIG-IP and builds configuration",
"globalEnvVars":"/home/snops/f5-postman-workflows/framework/f5-postman-workflows.postman_globals.json",
"globalOptions": {
"insecure":true,
"reporters":["cli"]
},
"globalVars": {
"bigip_mgmt": "10.1.1.10",
"bigip_username":"admin",
"bigip_password":"admin",
"bigip_partition":"Common",
"bigip_pool_name":"module_3_pool",
"bigip_pool_member":"10.1.10.101:8002",
"bigip_object_state":"user-up",
"bigip_object_session":"user-enabled",
"bigip_vs_name":"module_3_vs",
"bigip_vs_destination":"10.1.20.121:80",
"bigip_node_name":"10.1.10.101",
"bigip_http_monitor":"module_3_http_monitor",
"bigip_http_profile":"module_3_http",
"bigip_tcp_profile":"module_3_tcp_clientside"
},
"workflow": [
{
"name":"Authenticate to BIG-IP",
"options": {
"collection":"/home/snops/f5-postman-workflows/collections/BIG_IP/BIGIP_API_Authentication.postman_collection.json",
"folder":"1_Authenticate"
}
},
{
"name":"2 - Add Members to LTM Config",
"skip":false,
"options": {
"collection":"/home/snops/f5-automation-labs/postman_collections/f5-programmability-class-2.postman_collection.json",
"folder":"2 - Add Members to LTM Config"
}
}
]
"name": "f5-newman-build-2",
"description": "Execute a chained workflow that authenticates to a BIG-IP and builds configuration",
"globalEnvVars": "/home/snops/f5-postman-workflows/framework/f5-postman-workflows.postman_globals.json",
"globalOptions": {
"insecure": true,
"reporters": ["cli"]
},
"globalVars": {
"bigip_mgmt": "10.1.1.10",
"bigip_username": "admin",
"bigip_password": "admin",
"bigip_partition": "module_3",
"bigip_pool_name": "module_3_pool",
"bigip_pool_member": "10.1.10.101",
"bigip_vs_name": "module_3_vs",
"bigip_vs_destination": "10.1.20.129",
"bigip_node_name": "10.1.10.101"
},
"workflow": [{
"name": "Authenticate to BIG-IP",
"options": {
"collection": "/home/snops/f5-postman-workflows/collections/BIG_IP/BIGIP_API_Authentication.postman_collection.json",
"folder": "1_Authenticate"
}
},
{
"name": "2 - Add Members to LTM Config",
"skip": false,
"options": {
"collection": "/home/snops/f5-automation-labs/postman_collections/f5-programmability-class-2.postman_collection.json",
"folder": "2 - Add Members to LTM Config"
}
}
]
}
Loading