Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Manage load balanced set

Boynux edited this page Apr 20, 2015 · 16 revisions

TOBE_IMPLEMENTED

Once user defines LB enabled endpoint for a VM then the same LB set can be applied to endpoints of other VMs in the same cloud service.

Commands described in this page are the CLI Node.js counter part for PowerShell cmdlet 'Set-AzureLoadBalancedEndpoint'. 'Set-AzureLoadBalancedEndpoint' cmdlet supports modifying a load balanced endpoint for operations such as changing health probe settings or port settings. 'Set-AzureLoadBalancedEndpoint' can be called directly against the cloud service and doesn’t require updating each individual endpoint.

  Commands to manage your Cloud Services load balancer settings
        service lbsettings list [options] <service-name>
        service lbsettings show [options] <service-name>
        service lbsettings update [options] <service-name> <lbset-name>

  Commands to manage your load balanced set access control list
        service lbsettings acl list [options] <service-name> <lbset-name>
        service lbsettings acl create [options] <service-name> <lbset-name> <order-id> <action> <remote-subnet>
        service lbsettings acl delete [options] <service-name> <lbset-name> <order-id>
        service lbsettings acl clear [options] <service-name> <lbset-name>
        service lbsettings acl update [options] <service-name> <lbset-name> <order-id>

lbsettings list

List load balancer settings for given cloud service

service lbsettings list [options] <service-name>

Options

     -h, --help               output usage information
     -v, --verbose            use verbose output
     --json                   use json output
     -s, --subscription <id>  the subscription id
$ azure service lbsettings list vminvnet1

info:    Executing command service lbsettings list
data:    Name  Probe Enabled  Protocol  Port  Path  Interval(sec)  Timeout(sec)
data:    ----  -------------  --------  ----  ----  -------------  ------------
data:    lb1   Yes            tcp       1111        15             31
data:    lb3   Yes            http      4458  /     18             31
info:    service lbsettings list command OK

lbsettings show

Show more details of the load balancer settings for the given cloud service

service lbsettings show [options] <service-name>

Options

     -h, --help               output usage information
     -v, --verbose            use verbose output
     --json                   use json output
     -s, --subscription <id>  the subscription id
$ azure service lbsettings show vminvnet1

info:    Executing command service lbsettings show
data:    lb1 Name "lb1"
data:    lb1 ProbSettings Port "1111"
data:    lb1 ProbSettings Protocol "tcp"
data:    lb1 ProbSettings IntervalInSeconds "15"
data:    lb1 ProbSettings TimeoutInSeconds "31"
data:    lb1 EnableDirectServerReturn "false"
data:    lb1 VmNames 0 "vminvnet1"
data:    lb1 endPoints 0 LoadBalancedEndpointSetName "lb1"
data:    lb1 endPoints 0 LocalPort "1212"
data:    lb1 endPoints 0 Name "lb1-ep1"
data:    lb1 endPoints 0 Port "1111"
data:    lb1 endPoints 0 LoadBalancerProbe Port "1111"
data:    lb1 endPoints 0 LoadBalancerProbe Protocol "tcp"
data:    lb1 endPoints 0 LoadBalancerProbe IntervalInSeconds "15"
data:    lb1 endPoints 0 LoadBalancerProbe TimeoutInSeconds "31"
data:    lb1 endPoints 0 Protocol "tcp"
data:    lb1 endPoints 0 Vip "138.91.73.36"
data:    lb1 endPoints 0 EnableDirectServerReturn "false"
data:    lb1 endPoints 0 vmName "vminvnet1"
data:    lb3 Name "lb3"
data:    lb3 ProbSettings Path "/"
data:    lb3 ProbSettings Port "4458"
data:    lb3 ProbSettings Protocol "http"
data:    lb3 ProbSettings IntervalInSeconds "18"
data:    lb3 ProbSettings TimeoutInSeconds "31"
data:    lb3 EnableDirectServerReturn "false"
data:    lb3 VmNames 0 "vminvnet1"
data:    lb3 VmNames 1 "vminvnet1-1"
data:    lb3 endPoints 0 LoadBalancedEndpointSetName "lb3"
data:    lb3 endPoints 0 LocalPort "4459"
data:    lb3 endPoints 0 Name "test-ep6"
data:    lb3 endPoints 0 Port "3333"
data:    lb3 endPoints 0 LoadBalancerProbe Path "/"
data:    lb3 endPoints 0 LoadBalancerProbe Port "4458"
data:    lb3 endPoints 0 LoadBalancerProbe Protocol "http"
data:    lb3 endPoints 0 LoadBalancerProbe IntervalInSeconds "18"
data:    lb3 endPoints 0 LoadBalancerProbe TimeoutInSeconds "31"
data:    lb3 endPoints 0 Protocol "tcp"
data:    lb3 endPoints 0 Vip "138.91.73.36"
data:    lb3 endPoints 0 EnableDirectServerReturn "false"
data:    lb3 endPoints 0 vmName "vminvnet1"
data:    lb3 endPoints 1 LoadBalancedEndpointSetName "lb3"
data:    lb3 endPoints 1 LocalPort "4459"
data:    lb3 endPoints 1 Name "test-ep6-1"
data:    lb3 endPoints 1 Port "3333"
data:    lb3 endPoints 1 LoadBalancerProbe Path "/"
data:    lb3 endPoints 1 LoadBalancerProbe Port "4458"
data:    lb3 endPoints 1 LoadBalancerProbe Protocol "http"
data:    lb3 endPoints 1 LoadBalancerProbe IntervalInSeconds "18"
data:    lb3 endPoints 1 LoadBalancerProbe TimeoutInSeconds "31"
data:    lb3 endPoints 1 Protocol "tcp"
data:    lb3 endPoints 1 Vip "138.91.73.36"
data:    lb3 endPoints 1 EnableDirectServerReturn "false"
data:    lb3 endPoints 1 vmName "vminvnet1-1"
info:    service lbsettings show command OK

With --json option.

$ azure service lbsettings show vminvnet1 --json
{
  "lb1": {
    "Name": "lb1",
    "ProbSettings": {
      "Port": "1111",
      "Protocol": "tcp",
      "IntervalInSeconds": "15",
      "TimeoutInSeconds": "31"
    },
    "EnableDirectServerReturn": "false",
    "VmNames": [
      "vminvnet1"
    ],
    "endPoints": [
      {
        "LoadBalancedEndpointSetName": "lb1",
        "LocalPort": "1212",
        "Name": "lb1-ep1",
        "Port": "1111",
        "LoadBalancerProbe": {
          "Port": "1111",
          "Protocol": "tcp",
          "IntervalInSeconds": "15",
          "TimeoutInSeconds": "31"
        },
        "Protocol": "tcp",
        "Vip": "138.91.73.36",
        "EnableDirectServerReturn": "false",
        "vmName": "vminvnet1"
      }
    ]
  },
  "lb3": {
    "Name": "lb3",
    "ProbSettings": {
      "Path": "/",
      "Port": "4458",
      "Protocol": "http",
      "IntervalInSeconds": "18",
      "TimeoutInSeconds": "31"
    },
    "EnableDirectServerReturn": "false",
    "VmNames": [
      "vminvnet1",
      "vminvnet1-1"
    ],
    "endPoints": [
      {
        "LoadBalancedEndpointSetName": "lb3",
        "LocalPort": "4459",
        "Name": "test-ep6",
        "Port": "3333",
        "LoadBalancerProbe": {
          "Path": "/",
          "Port": "4458",
          "Protocol": "http",
          "IntervalInSeconds": "18",
          "TimeoutInSeconds": "31"
        },
        "Protocol": "tcp",
        "Vip": "138.91.73.36",
        "EnableDirectServerReturn": "false",
        "vmName": "vminvnet1"
      },
      {
        "LoadBalancedEndpointSetName": "lb3",
        "LocalPort": "4459",
        "Name": "test-ep6-1",
        "Port": "3333",
        "LoadBalancerProbe": {
          "Path": "/",
          "Port": "4458",
          "Protocol": "http",
          "IntervalInSeconds": "18",
          "TimeoutInSeconds": "31"
        },
        "Protocol": "tcp",
        "Vip": "138.91.73.36",
        "EnableDirectServerReturn": "false",
        "vmName": "vminvnet1-1"
      }
    ]
  }
}

lbsettings update

Update load balancer settings for the given lb configured under the given cloud service

service lbsettings update [options] <service-name> <lbset-name>

Options

     -h, --help                 output usage information
     -v, --verbose              use verbose output
     --json                     use json output
     -t, --port <port>          the new load balancer probe port
     -o, --protocol <protocol>  the new load balancer probe protocol (tcp or http)
     -p, --probe-path <path>    the new load balancer probe path (valid only if probe protocol is http)
     -i, --interval <interval>  the new load balancer probe interval in sec (min 5 sec)
     -o, --timeout <timeout>    the new load balancer probe timeout in sec (min 5 sec)
     -t, --local-port <port>    the new virtual machine port associated with the load balancer, if specified then ALL endpoints of this LB set on all theroles will be updated to have THIS local port
     -s, --subscription <id>    the subscription id

lbsettings acl list

List all acl rules defined for this load balanced set

service lbsettings acl list [options] <service-name> <lbset-name>```

**Options**

```bash
     -h, --help               output usage information
     -v, --verbose            use verbose output
     --json                   use json output
     -s, --subscription <id>  the subscription id
$ azure service lbsettings acl list rubystack11 LB1
info:    Executing command service lbsettings acl list

data:    Order  Action  RemoteSubnet      Description
data:    -----  ------  ----------------  -----------------------
data:    1      permit  138.91.82.243/32
data:    2      permit  138.91.0.243/32
data:    3      permit  138.91.1.243/32   acl4r
data:    4      permit  138.91.1.243/32   this rule is for res...
data:    0      permit  138.91.2.243/32   this rule is for res...
info:    service lbsettings acl list command OK

lbsettings acl create

Create a new acl rule for the given load balanced set.

service lbsettings acl create [options] <service-name> <lbset-name> <order-id> <action> <remote-subnet>

Options

     -h, --help               output usage information
     -v, --verbose            use verbose output
     --json                   use json output
     -s, --subscription <id>  the subscription id
     -e, --description <description>  description for the rule

lbsettings acl delete

Delete an existing acl rule for the given load balanced set

service lbsettings acl delete [options] <service-name> <lbset-name> <order-id>

Options

     -h, --help               output usage information
     -v, --verbose            use verbose output
     --json                   use json output
     -s, --subscription <id>  the subscription id

lbsettings acl clear

Remove all acl rules defined for the given load balanced set

service lbsettings acl clear [options] <service-name> <lbset-name>

Options

     -h, --help               output usage information
     -v, --verbose            use verbose output
     --json                   use json output
     -s, --subscription <id>  the subscription id

lbsettings acl update

Update acl settings for the given load balanced set

service lbsettings acl update [options] <service-name> <lbset-name> <order-id>

Options

     -h, --help                          output usage information
     -v, --verbose                       use verbose output
     --json                              use json output
     -i, --order-id <orderid>            new order for the acl rule
     -a, --action <action>               new action for the acl rule, valid values are [permit, deny]
     -r, --remote-subnet <remotesubnet>  new subnet for the acl rule, it should be ipv4/cidr format
     -e, --description <description>     description for the rule
     -s, --subscription <id>             the subscription id