-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
2,557 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
--- | ||
title: "Load Balancer" | ||
date: 2021-05-20T13:04:00-04:00 | ||
chapter: false | ||
weight: 21 | ||
--- | ||
|
||
#### Overview | ||
The Load Balancer builder (`loadBalancer`) creates load balancers that can distribute load amongst healthy services in a backend pool on public or private networks. | ||
|
||
* Load balancers (`Microsoft.Network/loadBalancers`) | ||
* Load balancer frontend IP configurations (`Microsoft.Network/loadBalancers/frontendIPConfigurations`) | ||
* Load balancer backend address pools (`Microsoft.Network/loadBalancers/backendAddressPools`) | ||
* Load balancer health probes (`Microsoft.Network/loadBalancers/probes`) | ||
|
||
#### Builder Keywords | ||
|
||
| Applies To | Keyword | Purpose | | ||
|-|-|-| | ||
| loadBalancer | name | Specifies the name of the load balancer | | ||
| loadBalancer | sku | Specifies the SKU of the load balancer - default is 'Basic'. | | ||
| loadBalancer | tier | Specifies the tier of the load balancer - default is 'Regional'. | | ||
| loadBalancer | add_frontends | Adds frontend IP configurations as defined by the `frontend` builder. | | ||
| loadBalancer | add_backend_pools | Adds backend address pool configurations as defined by the `backendAddressPool` builder. | | ||
| loadBalancer | add_rules | Adds load balancing rules as defined by the `loadBalancingRule` builder. | | ||
| loadBalancer | add_probes | Adds probes for the address pool as defined by the `loadBalancerProbe` builder. | | ||
| loadBalancer | add_dependencies | Adds the resource ID's of additional dependencies that must be provisioned before the load balancer. | | ||
| frontend | name | Name of the frontend IP configuration. | | ||
| frontend | private_ip_allocation_method | Specifies how the private IP is assigned on an internal load balancer. | | ||
| frontend | public_ip | Specifies the name of a public IP to generate. It will be generated with the same SKU as the load balancer. | | ||
| frontend | link_to_public_ip | The name of an existing public IP to link to. | | ||
| backendAddressPool | name | The name of the backend address pool. | | ||
| backendAddressPool | load_balancer | The name of a load balancer these should be added to (used when adding to a pool for an existing load balancer). | | ||
| backendAddressPool | vnet | Specifies a virtual network in the same deployment where the backend services are connected. | | ||
| backendAddressPool | link_to_vnet | Specifies an existing virtual network where the backend services are connected. | | ||
| backendAddressPool | add_ip_addresses | Adds IP addresses to the backend pool. | | ||
| loadBalancerProbe | name | The name of the load balancer probe. | | ||
| loadBalancerProbe | protocol | The protocol to use for the probe - default is TCP. | | ||
| loadBalancerProbe | port | The port to probe on the backend service. | | ||
| loadBalancerProbe | request_path | For HTTP(S) probes, the request path that returns a 200 when healthy. | | ||
| loadBalancerProbe | interval | The interval between 4 and 30 seconds to probe the health of the services in the pool. | | ||
| loadBalancerProbe | number_of_probes | The number of probe attempts before considering the service unhealthy. | | ||
| loadBalancingRule | name | The name of the load balancing rule. | | ||
| loadBalancingRule | frontend_ip_config | The name of the frontend IP configuration to which this rule applies. | | ||
| loadBalancingRule | backend_address_pool | The name of the backend address pool to which this rule applies. | | ||
| loadBalancingRule | probe | The name of the probe to use to check the health of services in the backend pool. | | ||
| loadBalancingRule | frontend_port | The port on the frontend to forward to a backend service. | | ||
| loadBalancingRule | backend_port | The target port on the backend service. | | ||
| loadBalancingRule | protocol | The protocol to forward, defaults to 'All'. | | ||
| loadBalancingRule | idle_timeout_minutes | The time in minutes before a TCP connection is considered idle and disconnected. | | ||
| loadBalancingRule | load_distribution_policy | The load distribution policy - 'Default' where a request can go to any backend, 'SourceIP' which is mapped on client IP, or 'SourceIPProtocol' which is mapped on client IP and protocol. | | ||
| loadBalancingRule | enable_tcp_reset | After an idle timeout, the TCP connection is reset - defaults to 'disabled'. | | ||
| loadBalancingRule | enable_outbound_snat | Allows backend services to use this load balancer for outbound connections - defaults to 'disabled'. | | ||
|
||
#### Example | ||
|
||
```fsharp | ||
open Farmer | ||
open Farmer.Builders | ||
open Farmer.LoadBalancer | ||
arm { | ||
add_resources [ | ||
vnet { | ||
name "my-vnet" | ||
add_address_spaces [ "10.0.1.0/24" ] | ||
add_subnets [ | ||
subnet { | ||
name "my-services" | ||
prefix "10.0.1.0/24" | ||
add_delegations [ | ||
SubnetDelegationService.ContainerGroups | ||
] | ||
} | ||
] | ||
} | ||
loadBalancer { | ||
name "lb" | ||
sku Sku.Standard | ||
add_frontends [ | ||
frontend { | ||
name "lb-frontend" | ||
public_ip "lb-pip" | ||
} | ||
] | ||
add_backend_pools [ | ||
backendAddressPool { | ||
name "lb-backend" | ||
vnet "my-vnet" | ||
add_ip_addresses [ | ||
"10.0.1.4" | ||
"10.0.1.5" | ||
] | ||
} | ||
] | ||
add_probes [ | ||
loadBalancerProbe { | ||
name "httpGet" | ||
protocol LoadBalancerProbeProtocol.HTTP | ||
port 8080 | ||
request_path "/" | ||
} | ||
] | ||
add_rules [ | ||
loadBalancingRule { | ||
name "rule1" | ||
frontend_ip_config "lb-frontend" | ||
backend_address_pool "lb-backend" | ||
frontend_port 80 | ||
backend_port 8080 | ||
protocol TransmissionProtocol.TCP | ||
probe "httpGet" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
title: "Traffic Manager" | ||
date: 2021-05-235T13:01:00+01:00 | ||
chapter: false | ||
weight: 20 | ||
--- | ||
|
||
#### Overview | ||
The Traffic Manager builder (`trafficManager`) creates traffic manager profiles and their associated endpoints. | ||
|
||
* Traffic Manager Profiles (`Microsoft.Network/trafficManagerProfiles`) | ||
* Traffic Manager Azure Endpoints (`Microsoft.Network/trafficManagerProfiles/azureEndpoints`) | ||
* Traffic Manager External Endpoints (`Microsoft.Network/trafficManagerProfiles/externalEndpoints`) | ||
|
||
#### Builder Keywords | ||
|
||
| Builder | Keyword | Purpose | | ||
|-|-|-| | ||
| trafficManager | name | Sets the name of the Traffic Manager profile. | | ||
| trafficManager | dns_ttl | Sets the DNS TTL of the Traffic Manager profile, in seconds (default 30). | | ||
| trafficManager | disable_profile | Disables the Traffic Manager profile. | | ||
| trafficManager | enable_profile | Enables the Traffic Manager profile. | | ||
| trafficManager | routing_method | Sets the routing method of the Traffic Manager profile (default Performance). | | ||
| trafficManager | enable_traffic_view | Enables the Traffic View of the Traffic Manager profile. | | ||
| trafficManager | disable_traffic_view | Disables the Traffic View of the Traffic Manager profile. | | ||
| trafficManager | monitor_protocol | Sets the monitoring protocol of the Traffic Manager profile (default Https). | | ||
| trafficManager | monitor_port | Sets the monitoring port of the Traffic Manager profile (default 443). | | ||
| trafficManager | monitor_path | Sets the monitoring path of the Traffic Manager profile (default /). | | ||
| trafficManager | monitor_interval | Sets the monitoring interval, in seconds, of the Traffic Manager profile (default 30). | | ||
| trafficManager | monitor_timeout | Sets the monitoring timeout, in seconds, of the Traffic Manager profile (default 10). | | ||
| trafficManager | monitor_tolerated_failures | Sets the monitoring tolerated number of failures, of the Traffic Manager profile (default 3). | | ||
| trafficManager | add_endpoints | Adds Endpoints to the Traffic Manager profile. | | ||
| endpoint | name | Sets the name of the Endpoint. | | ||
| endpoint | weight | Sets the weight of the Endpoint. | | ||
| endpoint | weight | Sets the priority of the Endpoint. | | ||
| endpoint | enable_endpoint | Sets the name of the Endpoint. | | ||
| endpoint | disable_endpoint |Disables the Endpoint. | | ||
| endpoint | target_webapp | Sets the target of the Endpoint to a web app. | | ||
| endpoint | target_webapp | Sets the target of the Endpoint to an external domain/IP and location. | | ||
|
||
#### Example | ||
|
||
```fsharp | ||
open Farmer | ||
open Farmer.Builders | ||
open Farmer.TrafficManager | ||
let myTrafficManager = trafficManager { | ||
name "my-trafficmanager-profile" | ||
routing_method RoutingMethod.Performance | ||
add_endpoints [ | ||
endpoint { | ||
name "my-external-endpoint" | ||
weight 1 | ||
priority 1 | ||
target_external "mydomain.com" Location.WestUS | ||
} | ||
endpoint { | ||
name "my-web-app-endpoint" | ||
weight 1 | ||
priority 2 | ||
target_webapp (ResourceName "my-web-app") | ||
} | ||
] | ||
monitor_path "/" | ||
monitor_port 443 | ||
monitor_protocol Https | ||
monitor_interval 30<Seconds> | ||
monitor_timeout 5<Seconds> | ||
monitor_tolerated_failures 4 | ||
enable_traffic_view | ||
dns_ttl 30<Seconds> | ||
} | ||
arm { | ||
location Location.EastUS | ||
add_resource myTrafficManager | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.