+ Load balancing is the cornerstone of XC's App Connect functionality. + L7 MCN requires discovering services at one site and making those services available to another. + XC implements this functionality with origin pools and load balancers. + More complicated configurations (underlay networking, security services, observability) are built on these primitives. +
+ + + +Exercise 1: AWS Cloud App
++ For the initial exercise, make the cloud application running in AWS available to the UDF environment. + Build an origin pool and load balancer based on the exercise requirements. +
+ +-
+
- + + The URL for the cloud app hosted in AWS is https://aws-cloud-app.mcn-lab.f5demos.com + +
- + + The cloud app is only reachable from the student-awsnet site. + +
- + + The cloud app is TLS only. + +
- + + The load balancer domain is {{ ns or 'eph-ns' }}.mcn-lab.f5demos.com. + +
- + + Use the mcn-lab-wildcard wildcard cert in the shared NS to enable TLS on the LB. + +
- + + Do not advertise your load balancer to the internet. + {% if site %} Your site name is {{ site }}{% endif %} + +
Test Criteria
+ +
+GET https://{{ ns or 'eph-ns' }}.mcn-lab.f5demos.com/ HTTP/1.1
+Host: {{ ns or 'eph-ns' }}.mcn-lab.f5demos.com
+
+
+
+
+{
+ "env": "AWS",
+ ...
+}
+
+
+
+
+
+
+
+
+
+
++ Since this is the first exercise, here are some hints. +
+ + ++ Load Balancer Hint + + +
+Exercise 2: Azure Cloud App
+ ++ For the second exercise, make the cloud application running in Azure available to the UDF environment. + Create a new origin pool for the Azure cloud app. Reuse your load balancer. +
+ + +-
+
- + + The URL for the cloud app hosted in Azure is https://azure-cloud-app.mcn-lab.f5demos.com + +
- + + The cloud app is only reachable from the student-azurenet site. + +
- + + The cloud app is TLS only. + +
- + + Keep the AWS Origin Pool in place. + +
Test Criteria
+ +
+GET https://{{ ns }}.mcn-lab.f5demos.com/ HTTP/1.1
+Host: {{ ns }}.mcn-lab.f5demos.com
+
+
+
+
+{
+ "env": "Azure",
+ ...
+}
+
+
+
+
+Exercise 1: Path Rewrite
+ ++Configure a path prefix rewrite to remove part of the request path when routing to an origin. +
+ +-
+
- + + Keep your configuration from the previous exercise in place. + +
- + + Requests to https://{{ ns or 'eph-ns' }}.mcn-lab.f5demos.com/aws/raw/ need to arrive at the origin with a path of /raw. + +
Test Criteria
+ +
+GET https://{{ ns or 'eph-ns' }}.mcn-lab.f5demos.com/aws/raw HTTP/1.1
+Host: eph-ns.mcn-lab.f5demos.com
+
+
+
+
+{
+ "info": {
+ "path": "/raw"
+ }
+ ...
+}
+
+
+
+
+
+
+
+
+
+ Questions on this functionality are often asked on F5 DevCentral. Here's a hint.
+
+
++ Route Hint + +
+Exercise 2: Request Header Shenanigans
+ ++ While blind header insertion or deletion is useful in some use cases, this exercise focuses on context aware header manipulation. + Use the XC Header Processing docs for reference. +
+ + + +-
+
- + + Insert a request header named X-MCN-src-site to identify the UDF CE to the origin. Do not use a static value. + +
- + + Insert a request header named X-MCN-namespace to identify the ephemeral NS to the origin. Do not use a static value. + +
Test Criteria
+ +
+GET https://{{ ns or 'eph-ns '}}.mcn-lab.f5demos.com/ HTTP/1.1
+Host: {{ ns or 'eph-ns '}}.mcn-lab.f5demos.com
+
+
+
+
+{
+ ...
+ "request_headers": {
+ "x-mcn-namespace": "wiggly-yellowtail",
+ "x-mcn-src-site": "cluster-xxxxxxxx",
+ },
+ ...
+}
+
+
+
+
+
+
+
+
+
+
+Exercise 3: Response Header Shenanigans
+ + + +-
+
- + + Insert a response header named X-MCN-dest-site to determine which cloud CE processed the request. + +
Test Criteria
+ +
+GET https://{{ ns or 'eph-ns' }}.mcn-lab.f5demos.com/aws HTTP/1.1
+Host: {{ ns or 'eph-ns' }}.mcn-lab.f5demos.com
+
+
+
+
+{
+ "x-mcn-dest-site": "student-awsnet"
+}
+
+
+
+Request 2
+
+GET https://{{ ns or 'eph-ns' }}.mcn-lab.f5demos.com/azure HTTP/1.1
+Host: {{ ns or 'eph-ns' }}.mcn-lab.f5demos.com
+
+
+
+
+{
+ "x-mcn-dest-site": "student-azurenet"
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
++The lab environment, the service endpoints, and how you interact with the load balancer have been simplified in an effort to focus on concepts. +Understanding the environment, it's topology, and the rudimentary functionality of the cloud app will help in completing the exercises. +
+ + +Architecture
+ ++The lab environment contains three distributed sites meshed using the F5 Distributed Cloud Global Network. +
+ +-
+
- + + student-awsnet in Amazon Web Services + +
- + + student-azurenet in Microsoft Azure + +
- + + Lab CE in UDF + +
Lab Exercises
+ ++Lab exercises will ask you to create configuration in the lab tenant. +Exercise reqirements are listed in a table along with an object type indicator. +
+ +-
+
- + + Load Balancer + +
- + + Origin Pool + +
- + + Route + +
Test Criteria
+ ++To complete lab exercises, you will run tests against the load balancer advertised from the Customer Edge in your UDF site. +You will build this load balancer in the first exercise. +All tests will be run from this web apllication. +
++Each test will specify success criteria followed by a button. +
++Here are some illustrative examples. +
+ ++The first section of the test criteria shows the request being made. +
+ +
+GET https://foo.mcn-lab.f5demos.com/ HTTP/1.1
+Host: foo.mcn-lab.f5demos.com
+
+
+
++The second section shows a value the test expects in the response. +
+ +
+{
+ "info": {
+ "foo": True
+ }
+}
+
+
+
+
+
+
+
+
+ The test made a request to https://foo.mcn-lab.f5demos.com.
+ The test succeeded because the response contained the JSON
string {"info": { "foo": True }}
.
+
+GET https://foo.mcn-lab.f5demos.com/ HTTP/1.1
+Host: foo.mcn-lab.f5demos.com
+
+
+
+
+{
+ "info": {
+ "bar": True
+ }
+}
+
+
+
+
+
+
+
+
+The test made a request to https://foo.mcn-lab.f5demos.com.
+The test failed because the response did not contain the JSON
string { "info": { "bar": True}}
.
+
Other Tools
+ +curl
and jq
are provided on the UDF Runner instance.
+ ubuntu@ubuntu:~$ curl -s https://foo.mcn-lab.f5demos.com/ | jq
+ {
+ "info": {
+ "foo": true
+ }
+ }
+
+
+Cloud App
+ ++Exercises are run against instances of the cloud app hosted in each remote cloud environment. +The cloud app simply echoes back HTTP request info. +Unless otherwise noted, test results display headers and info from the request received by the app. +In other words, test critera are evaluating being sent (as echoed back from the cloud app). + +To demonstrate, you can access an endpoint of each cloud app from your browser. +
+ + + + + +Issues
+ ++Use the lab repository issue tracker to report bugs, typos, or lab enhancements. +
+ + + ++ The configuration built so far handles load balancing, routing, and content manipulation. + XC refers to this object as a "load balancer" but it's really the holistic representation of an application whose service endpoints live across the distributed network. + The object is simple - it doesn't yet include configuration for WAAP, API protection, or a service policy. +
++ A key advantage of XC over traditional ADCs is its flexibility in specifying where a load balancer is advertised. +
+ + + +Exercise 1: Advertise Policy
+ +-
+
- + + Configure the load balancer to be advertised from the virtual site shared/mcn-practical-udf-sites. + +
Test Criteria
+ +
+GET https://{{ ns or 'eph-ns '}}.mcn-lab.f5demos.com/ HTTP/1.1
+Host: {{ ns or 'eph-ns '}}.mcn-lab.f5demos.com
+
+
+
+
+{
+ "info": {
+ "path": "/"
+ }
+ ...
+}
+
+
+
+
+
+
+
+Exercise 2: Find a Friend
+ ++ Do you have a friend working on the lab? + Have they updated their advertise policy to use the virtual site? + Find thier ephemeral namespace (or use the one provided in the form). +
+ +-
+
- + + Test if your friend's load balancer is being advertised to the UDF site. + +
Test Criteria
+ +
+GET https://wiggly-yellowtail.mcn-lab.f5demos.com/ HTTP/1.1
+Host: wiggly-yellowtail.mcn-lab.f5demos.com
+
+
+
+
+{
+ "info": {
+ "path": "/"
+ }
+ ...
+}
+
+
+
++Modern applications, and some classic ones, are often comprised of disparate services spread across sites. +MCN solutions must be able to make routing decisions based on characterstics of an HTTP request. +F5 XC App Connect is a distributed L7 proxy that provides intelligent routing, visibility, and strategic points of control. +
+ + + +Exercise 1: Path Routing
+ ++Build routing rules and configure your load balancer to route traffic between the two cloud apps based on the request url. +
+ +-
+
- + + Reuse the origin pools from the previous exercise. + +
- + + Route requests to https://{{ ns or 'eph-ns' }}.mcn-lab.f5demos.com/aws to the AWS cloud app. + +
- + + Route requests to https://{{ ns or 'eph-ns' }}.mcn-lab.f5demos.com/azure to the Azure cloud app. + +
Test Criteria
+ +
+GET https://{{ ns or 'eph-ns' }}.mcn-lab.f5demos.com/aws/raw HTTP/1.1
+Host: {{ ns or 'eph-ns' }}.mcn-lab.f5demos.com
+
+
+
+
+{
+ "env": "aws",
+ ...
+}
+
+
+
+Request 2
+
+GET https://{{ ns or 'eph-ns' }}.mcn-lab.f5demos.com/azure/raw HTTP/1.1
+Host: {{ ns or 'eph-ns' }}.mcn-lab.f5demos.com
+
+
+
+
+{
+ "env": "azure",
+ ...
+}
+
+
+
+
+
+
+
+
+
+
+
+Exercise 2: Header Routing
+ ++Build rules to route traffic between the two cloud apps based on an arbitrary HTTP request header. +
+ +-
+
- + + Route requests with an X-MCN-Lab: aws header to the AWS cloud app. + +
- + + Route requests with an X-MCN-Lab: azure header to the Azure cloud app. + +
Test Criteria
+ +
+GET https://{{ ns or 'eph-ns '}}.mcn-lab.f5demos.com/raw HTTP/1.1
+Host: {{ ns or 'eph-ns '}}.mcn-lab.f5demos.com
+X-MCN-lab: aws
+
+
+
+
+{
+ "env": "aws",
+ ...
+}
+
+
+
+Request 2
+
+GET https://{{ ns or 'eph-ns '}}.mcn-lab.f5demos.com/raw HTTP/1.1
+Host: {{ ns or 'eph-ns '}}.mcn-lab.f5demos.com
+X-MCN-lab: azure
+
+
+
+
+{
+ "env": "azure",
+ ...
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Scoreboard
+ + +Scoreboard
Feedback
++ + Please tell us your thoughts about the lab using this form. +
+ +Issues
++ Use the lab repository issue tracker to report bugs, typos, or lab enhancements. +
+ Log in to the lab tenant and open any namespaced tile - Multi-Cloud App Connect, Distributed Apps, etc. + The ephemeral namespace is a randomly generated concatenation of adjective-animal in the navigation bar towards the top. +
+ + + ++ The ephemeral namespace will be used to derive a unique URL for the load balancer used in the lab exercises. +
+ + + + +Getting Started
+ ++ When your UDF deployment launched, two automated processes started - Customer Edge ("CE") registration and account provisioning in the lab tenant. +
+ + + +Customer Edge
+ ++ The CE in the UDF deployment will register with the lab tenant. + CEs on first launch update software and, often, their OS. This can take ~20 min from when the CE is booted. +
+ ++ When the CE is ready, the status indicator in the navigation pane (👀 look to the left) will show . + Use the indicator to find the CE site name needed for configuring the load balancer's advertise policy. +
+ + +Account Provisioning
+ ++ Check the email used to launch your UDF deployment for a welcome or password reset email from the lab tenant. + Update your password to log into the tenant. +
+ + + + + +