diff options
| author | Paul C. Buetow <paul@buetow.org> | 2014-04-15 23:00:48 +0200 |
|---|---|---|
| committer | Paul C. Buetow <paul@buetow.org> | 2014-04-15 23:00:48 +0200 |
| commit | 6928f7f90c45d13d6e22c73a5fc7c41d3115d48f (patch) | |
| tree | 6cc2e62fdaf51bfdff563144817a4163fb088444 | |
| parent | 714ea6dc436434d1043884ad6fe01a8808cebbb7 (diff) | |
more on documentation
| -rw-r--r-- | docs/fapi.pod | 44 | ||||
| -rwxr-xr-x | src/fapi | 32 |
2 files changed, 51 insertions, 25 deletions
diff --git a/docs/fapi.pod b/docs/fapi.pod index f77c0ed..1d0bd69 100644 --- a/docs/fapi.pod +++ b/docs/fapi.pod @@ -72,6 +72,14 @@ And run =head1 EXAMPLES +=head2 Listing + +If you want to list all configured objects on your partition just run + + f node # To list all nodes + f pool # To list all pool + ... # etc + =head2 Setting up simple NAT Services (Docu to be written) @@ -84,11 +92,13 @@ And run A simple nPath service can be created as follows. - # Creating two nodes, auto resolve the IP addresses + # Creating two nodes, fapi auto resolves the IP addresses, and use the + # FQDN as the node name. f node fooserver1.example.com create f node fooserver2.example.com create - # Creating a pool and add the nodes to it + # Creating a pool and add the nodes to it. Also specify the node ports to + # use by the monitors (and maybe PAT if enabled) f pool foopool create f pool foopool add member fooserver1.example.com:80 f pool foopool add member fooserver2.example.com:80 @@ -96,15 +106,31 @@ A simple nPath service can be created as follows. # Add a monitor to the pool f pool foopool add monitor http_lbtest - # Create a nPath HTTP service, 'nPath' also auto disables NAT and PAT - f vserver myservice.example.com:80 create PROTOCOL_TCP nPath + # Create a nPath HTTP vserver, 'nPath' also auto disables NAT and PAT + # fapi auto resolves the IP address. + f vserver myvserver.example.com:80 create PROTOCOL_TCP nPath + + # Add the pool to the vserver. The vservers name will be the FQDN followed by + # _PORT. In this case it would be: myvserver.example.com_80. The reason is + # that : are not allowed in vserver names. + f vserver myvserver.example.com:80 set pool foopool + + # Add a nPath HTTPS vserver + f vserver myvserver.example.com:443 create PROTOCOL_TCP nPath + f vserver myvserver.example.com:443 set pool foopool + +And everything can be deleted as folows: + + # You can also specify the full object name (including the partition) + f vserver /Common/myvserver.example.com_80 delete + + # Or just the way the service was created from command line + f vserver myvserver.example.com:443 delete - # Add the pool to the service - f vserver myservice.example.com:80 set pool foopool + f pool foopool delete + f node fooserver1.example.com delete + f node fooserver2.example.com delete - # Add a nPath HTTPS service - f vserver myservice.example.com:443 create PROTOCOL_TCP nPath - f vserver myservice.example.com:443 set pool foopool =head1 AUTHOR @@ -31,24 +31,24 @@ def print_synopsis(): ' fapi monitor', ' fapi monitor MONITORNAME get desc|state', ' fapi node', - ' fapi node NODENAME create|delete', - ' fapi node NODENAME get detail|status', + ' fapi node OBJNAME create|delete', + ' fapi node OBJNAME get detail|status', ' fapi pool', - ' fapi pool POOLNAME add member MEMBERNAME:PORT', - ' fapi pool POOLNAME add monitor MONITORNAME', - ' fapi pool POOLNAME create [LIST,OF,POOL,MEMBERS:PORT]', - ' fapi pool POOLNAME delete', - ' fapi pool POOLNAME del member MEMBERNAME:PORT', - ' fapi pool POOLNAME del monitors', - ' fapi pool POOLNAME get detail|lbmethod|members|monitor|status', - ' fapi pool POOLNAME set lbmethod LBMETHOD', + ' fapi pool OBJNAME add member MEMBERNAME:PORT', + ' fapi pool OBJNAME add monitor MONITORNAME', + ' fapi pool OBJNAME create [LIST,OF,POOL,MEMBERS:PORT]', + ' fapi pool OBJNAME delete', + ' fapi pool OBJNAME del member MEMBERNAME:PORT', + ' fapi pool OBJNAME del monitors', + ' fapi pool OBJNAME get detail|lbmethod|members|monitor|status', + ' fapi pool OBJNAME set lbmethod LBMETHOD', ' fapi vserver', - ' fapi vserver VSERVERNAME create [protocol] [profile] [poolname] [mask]', - ' fapi vserver VSERVERNAME delete', - ' fapi vserver VSERVERNAME get brief|detail|status', - ' fapi vserver VSERVERNAME set nat|pat disabled|enabled', - ' fapi vserver VSERVERNAME set pool POOLNAME', - ' fapi vserver VSERVERNAME set snat none', + ' fapi vserver OBJNAME create [protocol] [profile] [poolname] [mask]', + ' fapi vserver OBJNAME delete', + ' fapi vserver OBJNAME get brief|detail|status', + ' fapi vserver OBJNAME set nat|pat disabled|enabled', + ' fapi vserver OBJNAME set pool POOLNAME', + ' fapi vserver OBJNAME set snat none', ]) |
