diff --git a/doc/admin_api/api.rst b/doc/admin_api/api.rst index 44dce30b..0409e403 100644 --- a/doc/admin_api/api.rst +++ b/doc/admin_api/api.rst @@ -137,14 +137,16 @@ Example of a single device :: { - "id":1, - "updated":"Mon 2012.10.29 at 07:21:48 PM UTC", - "created":"Mon 2012.10.29 at 07:21:48 PM UTC", - "status":"OFFLINE", - "address":"15.185.96.125", - "name":"lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", - "loadbalancer":0, - "type":"HAProxy" + "id": 1, + "updated": "2013-06-10T14:29:14", + "created": "2013-06-10T14:29:14", + "status": "OFFLINE", + "floatingIpAddress": "15.185.96.125", + "publicIpAddress": "15.185.96.125", + "name": "lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", + "loadBalancers": [{"id": 10313, "tenantid": "42374872347634"}], + "type": "basename: libra-haproxy, image: 12345", + "az": 2 } Operations @@ -176,16 +178,18 @@ Response: :: { - "devices":[ + "devices": [ { - "id":1, - "updated":"Mon 2012.10.29 at 07:21:48 PM UTC", - "created":"Mon 2012.10.29 at 07:21:48 PM UTC", - "status":"OFFLINE", - "address":"15.185.96.125", - "name":"lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", - "loadbalancer":0, - "type":"HAProxy" + "id": 1, + "updated": "2013-06-10T14:29:14", + "created": "2013-06-10T14:29:14", + "status": "OFFLINE", + "floatingIpAddress ":"15.185.96.125", + "publicIpAddress": "15.185.96.125", + "name": "lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", + "loadBalancers": [{"id": 10313, "tenantid": "42374872347634"}], + "type": "basename: libra-haproxy, image: 12345", + "az": 2 } ] } @@ -216,14 +220,16 @@ Response: :: { - "id":1, - "updated":"Mon 2012.10.29 at 07:21:48 PM UTC", - "created":"Mon 2012.10.29 at 07:21:48 PM UTC", - "status":"OFFLINE", - "address":"15.185.96.125", - "name":"lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", - "loadbalancer":0, - "type":"HAProxy" + "id": 1, + "updated": "2013-06-10T14:29:14", + "created": "2013-06-10T14:29:14", + "status": "OFFLINE", + "floatingIpAddress": "15.185.96.125", + "publicIpAddress": "15.185.96.125", + "name": "lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", + "loadBalancers": [{"id": 10313, "tenantid": "42374872347634"}], + "type": "basename: libra-haproxy, image: 12345", + "az": 2 } Create a Device @@ -251,7 +257,10 @@ A JSON request body is required for this request. { "name": "lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", - "address": "15.185.96.125" + "publicIpAddress": "15.185.96.125", + "floatingIpAddress": "15.185.96.125", + "az": 2, + "type": "basename: libra-haproxy, image: 12345" } Example @@ -266,14 +275,16 @@ Response: :: { - "id":1, - "updated":"Mon 2012.10.29 at 07:21:48 PM UTC", - "created":"Mon 2012.10.29 at 07:21:48 PM UTC", - "status":"OFFLINE", - "address":"15.185.96.125", - "name":"lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", - "loadbalancer":0, - "type":"HAProxy" + "id": 1, + "updated": "2013-06-10T14:29:14", + "created": "2013-06-10T14:29:14", + "status": "OFFLINE", + "floatingIpAddress": "15.185.96.125", + "publicIpAddress": "15.185.96.125", + "name": "lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", + "loadBalancers": [{"id": 10313, "tenantid": "42374872347634"}], + "type": "basename: libra-haproxy, image: 12345", + "az": 2 } Delete a Device @@ -302,8 +313,9 @@ Example Update a Device --------------- -Update a device allows changing the address or name of a device. No -other fields can be changed and will be ignored. +Update the status of a device, it can set the status to `ERROR` or `ONLINE` +and the statusDescription field. No other fields can be changed and will be +ignored. :: @@ -322,8 +334,8 @@ A JSON request body is required for this request. :: { - "name": "lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", - "address": "15.185.96.125" + "status": "ERROR", + "statusDescription": "Load Balancer has failed" } Example @@ -333,21 +345,6 @@ Example curl -X PUT -H "Content-type:application/json" --data-binary "@device.json" -k https://15.185.107.220:8889/v1/devices/1 -Response: - -:: - - { - "id":1, - "updated":"Mon 2012.10.29 at 07:21:48 PM UTC", - "created":"Mon 2012.10.29 at 07:21:48 PM UTC", - "status":"OFFLINE", - "address":"15.185.96.125", - "name":"lbaas-v1-067e6162-3b6f-4ae2-a171-2470b63dff00", - "loadbalancer":0, - "type":"HAProxy" - } - Get Usage of Devices -------------------- diff --git a/doc/admin_api/config.rst b/doc/admin_api/config.rst new file mode 100644 index 00000000..eab48f37 --- /dev/null +++ b/doc/admin_api/config.rst @@ -0,0 +1,60 @@ +PI Configuration +================= + +These options are specific to the Admin API in addition to the +:doc:`common options `. + +Configuration File +------------------ + + The ``[admin_api]`` section is specific to the libra_admin_api utility. + Below is an example: + + .. code-block:: ini + + [admin_api] + db_host=localhost + db_user=root + db_pass= + db_schema=lbaas + ssl_certfile=/opt/server.crt + ssl_keyfile=/opt/server.key + +Command Line Options +-------------------- + .. program:: libra_admin_api + + .. option:: --host + + The IP address to bind the frontend to, default is 0.0.0.0 + + .. option:: --port + + The port number to listen on, default is 8889 + + .. option:: --db_host + + The host name for the MySQL database server + + .. option:: --db_user + + The username for the MySQL database server + + .. option:: --db_pass + + The password for the MySQL database server + + .. option:: --db_schema + + The schema containing the LBaaS tables in the MySQL database server + + .. option:: --ssl_certfile + + The path for the SSL certificate file to be used for frontend of the API + server + + .. option:: --ssl_keyfile + + The path for the SSL key file to be used for the frontend of the API + server + diff --git a/doc/admin_api/index.rst b/doc/admin_api/index.rst index 00f6baa5..f6137510 100644 --- a/doc/admin_api/index.rst +++ b/doc/admin_api/index.rst @@ -5,4 +5,5 @@ Libra Admin API Server :maxdepth: 2 about + config api diff --git a/doc/api/api.rst b/doc/api/api.rst index 48a27572..8d7a27e0 100644 --- a/doc/api/api.rst +++ b/doc/api/api.rst @@ -289,41 +289,41 @@ by the LBaaS service. 5.1 LBaaS API Summary Table ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Resource | Operation | Method | Path | -+=================+=====================================+==========+=================================================================+ -| Versions | Get list of all API versions | GET | {baseURI}/ | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Versions | Get specific API version | GET | {baseURI}/{ver} | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Limits | Get list of LBaaS limits | GET | {baseURI}/{ver}/limits | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Protocols | Get list of supported protocols | GET | {baseURI}/{ver}/protocols | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Algorithms | Get list of supported algorithms | GET | {baseURI}/{ver}/algorithms | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Load Balancer | Get list of all load balancers | GET | {baseURI}/{ver}/loadbalancers | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Load Balancer | Get load balancer details | GET | {baseURI}/{ver}/loadbalancers/{loadbalancerId} | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Load Balancer | Create a new load balancer | POST | {baseURI}/{ver}/loadbalancers | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Load Balancer | Update load balancer attributes | PUT | {baseURI}/{ver}/loadbalancers/{loadbalancerId} | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Load Balancer | Delete an existing load balancer | DELETE | {baseURI}/{ver}/loadbalancers/{loadbalancerId} | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Node | Get list of load balancer nodes | GET | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/nodes | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Node | Get a specific load balancer node | GET | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/nodes/{nodeId} | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Node | Create a new load balancer node | POST | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/nodes | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Node | Update a load balancer node | PUT | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/nodes/{nodeId} | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Node | Delete a load balancer node | DELETE | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/nodes/{nodeId} | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ -| Virtual IP | Get list of virtual IPs | GET | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/virtualips | -+-----------------+-------------------------------------+----------+-----------------------------------------------------------------+ ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Resource | Operation | Method | Path | ++=================+============================================================+==========+=================================================================+ +| Versions | :ref:`Get list of all API versions ` | GET | {baseURI}/ | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Versions | :ref:`Get specific API version ` | GET | {baseURI}/{ver} | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Limits | :ref:`Get list of LBaaS limits ` | GET | {baseURI}/{ver}/limits | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Protocols | :ref:`Get list of supported protocols ` | GET | {baseURI}/{ver}/protocols | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Algorithms | :ref:`Get list of supported algorithms ` | GET | {baseURI}/{ver}/algorithms | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Load Balancer | :ref:`Get list of all load balancers ` | GET | {baseURI}/{ver}/loadbalancers | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Load Balancer | :ref:`Get load balancer details ` | GET | {baseURI}/{ver}/loadbalancers/{loadbalancerId} | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Load Balancer | :ref:`Create a new load balancer ` | POST | {baseURI}/{ver}/loadbalancers | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Load Balancer | :ref:`Update load balancer attributes ` | PUT | {baseURI}/{ver}/loadbalancers/{loadbalancerId} | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Load Balancer | :ref:`Delete an existing load balancer ` | DELETE | {baseURI}/{ver}/loadbalancers/{loadbalancerId} | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Node | :ref:`Get list of load balancer nodes ` | GET | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/nodes | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Node | :ref:`Get a specific load balancer node ` | GET | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/nodes/{nodeId} | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Node | :ref:`Create a new load balancer node ` | POST | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/nodes | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Node | :ref:`Update a load balancer node ` | PUT | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/nodes/{nodeId} | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Node | :ref:`Delete a load balancer node ` | DELETE | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/nodes/{nodeId} | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ +| Virtual IP | :ref:`Get list of virtual IPs ` | GET | {baseURI}/{ver}/loadbalancers/{loadbalancerId}/virtualips | ++-----------------+------------------------------------------------------------+----------+-----------------------------------------------------------------+ 5.2 Common Request Headers ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -373,6 +373,8 @@ with POST and PUT requests. LBaaS API supports Content-Type: application/json; charset=UTF-8 Date: Tue, 30 Oct 2012 16:22:35 GMT +.. _api-versions: + 6. Get a List of All LBaaS API Versions Supported ------------------------------------------------- @@ -473,6 +475,8 @@ The response body contains a list of all supported versions of LBaaS. ] } +.. _api-version: + 7. Get Specific LBaaS API Version Information --------------------------------------------- @@ -576,6 +580,8 @@ version. } } +.. _api-limits: + 8. Get List of LBaaS API Limits ------------------------------- @@ -686,6 +692,8 @@ tenant making the request. } } +.. _api-protocols: + 9. Get List Of Supported LBaaS Protocols ---------------------------------------- @@ -788,6 +796,8 @@ numbers. ] } +.. _api-algorithms: + 10. Get List Of Supported LBaaS Algorithms ------------------------------------------ @@ -898,6 +908,8 @@ The response body contains the currently supported algorithms. ] } +.. _api-list: + 11. Get List Of All Load Balancers ---------------------------------- @@ -1027,6 +1039,8 @@ making the request. ] } +.. _api-status: + 12. Get Load Balancer Details ----------------------------- @@ -1147,6 +1161,8 @@ found. ], } +.. _api-create: + 13. Create a New Load Balancer ------------------------------ @@ -1423,6 +1439,8 @@ JSON** "algorithm":"ROUND_ROBIN" } +.. _api-modify: + 14. Update An Existing Load Balancer ------------------------------------ @@ -1540,6 +1558,8 @@ None. 202 status with no response body. +.. _api-delete: + 15. Delete Load Balancer ------------------------ @@ -1625,6 +1645,8 @@ None. 202 status with no response body. +.. _api-node-list: + 16. List All Load Balancer Nodes -------------------------------- @@ -1733,6 +1755,8 @@ not found. ] } +.. _api-node-status: + 17. Get Load Balancer Node -------------------------- @@ -1823,6 +1847,8 @@ not found. "status":"ONLINE" } +.. _api-node-create: + 18. Create Load Balancer Node ----------------------------- @@ -1960,6 +1986,8 @@ found. ] } +.. _api-node-modify: + 19. Update Load Balancer Node Condition --------------------------------------- @@ -2063,6 +2091,8 @@ None. 202 status with no response body. +.. _api-node-delete: + 20. Delete Load Balancer Node ----------------------------- @@ -2146,6 +2176,8 @@ None. 202 status with no response body. +.. _api-vips: + 21. Get List of Virtual IPs --------------------------- @@ -2248,14 +2280,11 @@ The following features are not supported. 1. Node 'weight' values are not supported. -2. Passing node 'condition' on node create will not be honored, all new - nodes will be set in ENABLED condition state. +2. IPV6 address types are not supported. -3. IPV6 address types are not supported. - -4. HTTPS protocol for load balancers are not supported. It is not +3. HTTPS protocol for load balancers are not supported. It is not advertised in /protocols request. -5. The ability to list deleted load balancers is not supported. +4. The ability to list deleted load balancers is not supported. diff --git a/doc/api/config.rst b/doc/api/config.rst new file mode 100644 index 00000000..99d66fdd --- /dev/null +++ b/doc/api/config.rst @@ -0,0 +1,90 @@ +API Configuration +================= + +These options are specific to the API in addition to the +:doc:`common options `. + +Configuration File +------------------ + + The ``[api]`` section is specific to the libra_api utility. Below is an + example: + + .. code-block:: ini + + [api] + db_host=localhost + db_user=root + db_pass= + db_schema=lbaas + gearman=127.0.0.1:4730 + keystone_module=keystoneclient.middleware.auth_token:AuthProtocol + swift_basepath=lbaaslogs + swift_endpoint=https://host.com:443/v1/ + ssl_certfile=/opt/certfile.crt + ssl_keyfile=/opt/keyfile.key + + In addition to this any options that are specific to the given keystone + module should be stored in the ``[keystone]`` section. + +Command Line Options +-------------------- + .. program:: libra_api + + .. option:: --host + + The IP address to bind the frontend to, default is 0.0.0.0 + + .. option:: --port + + The port number to listen on, default is 443 + + .. option:: --disable_keystone + + Do not use keystone authentication, for testing purposes only + + .. option:: --db_host + + The host name for the MySQL database server + + .. option:: --db_user + + The username for the MySQL database server + + .. option:: --db_pass + + The password for the MySQL database server + + .. option:: --db_schema + + The schema containing the LBaaS tables in the MySQL database server + + .. option:: --gearman + + Used to specify the Gearman job server hostname and port. This option + can be used multiple times to specify multiple job servers. + + .. option:: --keystone_module + + A colon separated module and class to use as the keystone authentication + module. The class should be compatible with keystone's AuthProtocol + class. + + .. option:: --swift_basepath + + The default container to be used for customer log uploads. + + .. option:: --swift_endpoint + + The default endpoint for swift. The user's tenant ID will automatically + be appended to this unless overridden at the log archive request. + + .. option:: --ssl_certfile + + The path for the SSL certificate file to be used for frontend of the API + server + + .. option:: --ssl_keyfile + + The path for the SSL key file to be used for the frontend of the API + server diff --git a/doc/api/index.rst b/doc/api/index.rst index e73e6b3b..93361f39 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -5,4 +5,5 @@ Libra API Server :maxdepth: 2 about + config api diff --git a/doc/config.rst b/doc/config.rst index 536f7cb4..510660f8 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -36,55 +36,23 @@ Global Section [global] verbose = true + nodaemon = false + syslog = true + syslog-socket = /dev/log + syslog-facility = local7 + debug = true + pid = /var/run/libra_tool.pid + logfile = /var/log/libra/libra_tool.log + user = libra + group = libra -Worker Section -^^^^^^^^^^^^^^ + The options listed above are common to all libra applications so can either + be used in the ``[global]`` section or in an application's individual + section. - The ``[worker]`` section is specific to the libra_worker utility. Below - is an example: - - .. code-block:: ini - - [worker] - user = haproxy - group = haproxy - driver = haproxy - reconnect_sleep = 60 - server = 10.0.0.1:8080 10.0.0.2:8080 - pid = /var/run/libra/libra_worker.pid - logfile = /var/log/libra/libra_worker.log - -Pool Manager Section -^^^^^^^^^^^^^^^^^^^^^ - - The ``[mgm]`` section is specific to the libra_pool_mgm utility. Below is an - example: - - .. code-block:: ini - - [mgm] - pid = /var/run/libra/libra_mgm.pid - logfile = /var/log/libra/libra_mgm.log - datadir = /etc/libra/ - nova_auth_url = https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/ - nova_user = username - nova_pass = password - nova_tenant = tenant - nova_region = region - nova_keyname = default - nova_secgroup = default - nova_image = 12345 - nova_image_size = standard.medium - api_server = 10.0.0.1:8889 10.0.0.2:8889 - nodes = 10 - check_interval = 5 - failed_interval = 15 - node_basename = 'libra' - - -Worker Command Line Options +Common Command Line Options --------------------------- - .. program:: libra_worker.py + These command line options are common to all libra utilities .. option:: -c , --config @@ -96,13 +64,6 @@ Worker Command Line Options Enable debugging output. - .. option:: --driver - - Load balancer driver to use. Valid driver options are: - - * *haproxy* - `HAProxy `_ software load balancer. - This is the default driver. - .. option:: --group Specifies the group for the process when run in daemon mode. @@ -127,154 +88,6 @@ Worker Command Line Options Name of the PID file to use. Default is: */var/run/libra/libra_worker.pid* - .. option:: -s , --reconnect_sleep - - The number of seconds to sleep between job server reconnect attempts - when no specified job servers are available. Default is 60 seconds. - - .. option:: --server - - Used to specify the Gearman job server hostname and port. This option - can be used multiple times to specify multiple job servers. - - .. option:: --syslog - - Send log events to syslog. - - .. option:: --syslog-socket - - Socket to use for the syslog connection. Default is */dev/log*. - - .. option:: --syslog-facility - - Syslog logging facility. Default is *LOCAL7*. - - .. option:: --user - - Specifies the user for the process when in daemon mode. Default is the - current user. - - .. option:: -v, --verbose - - Enable verbose output. Normally, only errors are logged. This enables - additional logging, but not as much as the :option:`-d` option. - - .. option:: --stats-poll - - The number of seconds to sleep between statistics polling of the - load balancer driver. Default is 300 seconds. - -Pool Manager Command Line Options ---------------------------------- - .. program:: libra_pool_mgm.py - - .. option:: --api_server - - The hostname/IP and port colon separated for use with the HP REST API - driver. Can be specified multiple times for multiple servers - - .. option:: -c , --config - - Load options from the specified configuration file. Command line - options will take precedence over any options specified in the - configuration file. - - .. option:: --check_interval - - How often to check the API server to see if new nodes are needed - (value is minutes) - - .. option:: --failed_interval - - How often to check the list of failed node uploads to see if the nodes - are now in a good state (value is in minutes) - - .. option:: -d, --debug - - Enable debugging output. - - .. option:: --driver - - API driver to use. Valid driver options are: - - * *hp_rest* - HP REST API, talks to the HP Cloud API server (based - on Atlas API) - This is the default driver. - - .. option:: --group - - Specifies the group for the process when run in daemon mode. - - .. option:: -h, --help - - Show the help message and quit. - - .. option:: -l , --logfile - - Name of the log file. When running in daemon mode, the default log - file is */var/log/libra/libra_worker.log*. When not in daemon mode, - logging will go to STDOUT unless a log file is specified. - - .. option:: --datadir - - The data directory used to store things such as the failed node list. - - .. option:: -n, --nodaemon - - Do not run as a daemon. This option is useful for debugging purposes - only as the worker is intended to be run as a daemon normally. - - .. option:: --node_basename - - A name to prefix the UUID name given to the nodes the pool manager - generates. - - .. option:: --nodes - - The size of the pool of spare nodes the pool manager should keep. - - .. option:: --nova_auth_url - - The URL used to authenticate for the Nova API - - .. option:: --nova_user - - The username to authenticate for the Nova API - - .. option:: --nova_pass - - The password to authenticate for the Nova API - - .. option:: --nova_tenant - - The tenant to use for the Nova API - - .. option:: --nova_region - - The region to use for the Nova API - - .. option:: --nova_keyname - - The key name to use when spinning up nodes in the Nova API - - .. option:: --nova_secgroup - - The security group to use when spinning up nodes in the Nova API - - .. option:: --nova_image - - The image ID or name to use on new nodes spun up in the Nova API - - .. option:: --nova_image_size - - The flavor ID (image size ID) or name to use for new nodes spun up in - the Nova API - - .. option:: -p , --pid - - Name of the PID file to use. Default is: - */var/run/libra/libra_worker.pid* - .. option:: --syslog Send log events to syslog. @@ -297,73 +110,3 @@ Pool Manager Command Line Options Enable verbose output. Normally, only errors are logged. This enables additional logging, but not as much as the :option:`-d` option. -Statsd Command Line Options ---------------------------- - - .. program:: libra_statsd.py - - .. option:: --api_server - - The hostname/IP and port colon separated for use with the HP REST API - driver. Can be specified multiple times for multiple servers. This - option is also used for the hp_rest alerting driver. - - .. option:: --server - - Used to specify the Gearman job server hostname and port. This option - can be used multiple times to specify multiple job servers - - .. option:: --driver - - The drivers to be used for alerting. This option can be used multiple - times to specift multiple drivers. - - .. option:: --ping_interval - - How often to run a ping check of load balancers (in seconds), default 60 - - .. option:: --poll_interval - - How long to wait until we consider the initial ping check failed and - send a second ping. Default is 5 seconds. - - .. option:: --poll_interval_retry - - How long to wait until we consider the second and final ping check - failed. Default is 30 seconds. - - .. option:: --repair_interval - - How often to run a check to see if damaged load balancers had been - repaired (in seconds), default 180 - - .. option:: --datadog_api_key - - The API key to be used for the datadog driver - - .. option:: --datadog_app_key - - The Application key to be used for the datadog driver - - .. option:: --datadog_message_tail - - Some text to add at the end of an alerting message such as a list of - users to alert (using @user@email.com format), used for the datadog - driver. - - .. option:: --datadog_tags - - A list of tags to be used for the datadog driver - - .. option:: --syslog - - Send log events to syslog. - - .. option:: --syslog-socket - - Socket to use for the syslog connection. Default is */dev/log*. - - .. option:: --syslog-facility - - Syslog logging facility. Default is *LOCAL7*. - diff --git a/doc/pool_mgm/config.rst b/doc/pool_mgm/config.rst new file mode 100644 index 00000000..ebc9b641 --- /dev/null +++ b/doc/pool_mgm/config.rst @@ -0,0 +1,116 @@ +Pool Manager Configuration +========================== + +These options are specific to the pool manager in addition to the +:doc:`common options `. + +Configuration File +------------------ + + The ``[mgm]`` section is specific to the libra_pool_mgm utility. Below is an + example: + + .. code-block:: ini + + [mgm] + pid = /var/run/libra/libra_mgm.pid + logfile = /var/log/libra/libra_mgm.log + datadir = /etc/libra/ + nova_auth_url = https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/ + nova_user = username + nova_pass = password + nova_tenant = tenant + nova_region = region + nova_keyname = default + nova_secgroup = default + nova_image = 12345 + nova_image_size = standard.medium + api_server = 10.0.0.1:8889 10.0.0.2:8889 + nodes = 10 + check_interval = 5 + failed_interval = 15 + node_basename = 'libra' + +Command Line Options +-------------------- + .. program:: libra_pool_mgm + + .. option:: --api_server + + The hostname/IP and port colon separated pointed to an Admin API server + for use with the HP REST API driver. Can be specified multiple times for + multiple servers + + .. option:: --check_interval + + How often to check the API server to see if new nodes are needed + (value is minutes) + + .. option:: --failed_interval + + How often to check the list of failed node uploads to see if the nodes + are now in a good state (value is in minutes) + + .. option:: --driver + + API driver to use. Valid driver options are: + + * *hp_rest* - HP REST API, talks to the HP Cloud API server (based + on Atlas API) + This is the default driver. + + .. option:: --datadir + + The data directory used to store things such as the failed node list. + + .. option:: -n, --nodaemon + + Do not run as a daemon. This option is useful for debugging purposes + only as the worker is intended to be run as a daemon normally. + + .. option:: --node_basename + + A name to prefix the UUID name given to the nodes the pool manager + generates. + + .. option:: --nodes + + The size of the pool of spare nodes the pool manager should keep. + + .. option:: --nova_auth_url + + The URL used to authenticate for the Nova API + + .. option:: --nova_user + + The username to authenticate for the Nova API + + .. option:: --nova_pass + + The password to authenticate for the Nova API + + .. option:: --nova_tenant + + The tenant to use for the Nova API + + .. option:: --nova_region + + The region to use for the Nova API + + .. option:: --nova_keyname + + The key name to use when spinning up nodes in the Nova API + + .. option:: --nova_secgroup + + The security group to use when spinning up nodes in the Nova API + + .. option:: --nova_image + + The image ID or name to use on new nodes spun up in the Nova API + + .. option:: --nova_image_size + + The flavor ID (image size ID) or name to use for new nodes spun up in + the Nova API + diff --git a/doc/pool_mgm/index.rst b/doc/pool_mgm/index.rst index 56bd7a47..0b011b3b 100644 --- a/doc/pool_mgm/index.rst +++ b/doc/pool_mgm/index.rst @@ -5,4 +5,5 @@ Libra Node Pool Manager :maxdepth: 2 about + config code diff --git a/doc/statsd/config.rst b/doc/statsd/config.rst new file mode 100644 index 00000000..9b6b888e --- /dev/null +++ b/doc/statsd/config.rst @@ -0,0 +1,75 @@ +Statsd Configuration +==================== + +These options are specific to statsd in addition to the +:doc:`common options `. + +Configuration File +------------------ + + The ``[statsd]`` section is specific to the libra_statsd utility. Below is + an example: + + .. code-block:: ini + + [statsd] + + +Command Line Options +-------------------- + .. program:: libra_statsd + + .. option:: --api_server + + The hostname/IP and port colon separated for use with the HP REST API + driver. Can be specified multiple times for multiple servers. This + option is also used for the hp_rest alerting driver. + + .. option:: --server + + Used to specify the Gearman job server hostname and port. This option + can be used multiple times to specify multiple job servers + + .. option:: --driver + + The drivers to be used for alerting. This option can be used multiple + times to specift multiple drivers. + + .. option:: --ping_interval + + How often to run a ping check of load balancers (in seconds), default 60 + + .. option:: --poll_interval + + How long to wait until we consider the initial ping check failed and + send a second ping. Default is 5 seconds. + + .. option:: --poll_interval_retry + + How long to wait until we consider the second and final ping check + failed. Default is 30 seconds. + + .. option:: --repair_interval + + How often to run a check to see if damaged load balancers had been + repaired (in seconds), default 180 + + .. option:: --datadog_api_key + + The API key to be used for the datadog driver + + .. option:: --datadog_app_key + + The Application key to be used for the datadog driver + + .. option:: --datadog_message_tail + + Some text to add at the end of an alerting message such as a list of + users to alert (using @user@email.com format), used for the datadog + driver. + + .. option:: --datadog_tags + + A list of tags to be used for the datadog driver + + diff --git a/doc/statsd/index.rst b/doc/statsd/index.rst index 7b3e0282..2b842b35 100644 --- a/doc/statsd/index.rst +++ b/doc/statsd/index.rst @@ -5,4 +5,5 @@ Statsd Monitoring Daemon :maxdepth: 2 about + config drivers diff --git a/doc/worker/config.rst b/doc/worker/config.rst new file mode 100644 index 00000000..fff3dfb4 --- /dev/null +++ b/doc/worker/config.rst @@ -0,0 +1,57 @@ +Worker Configuration +==================== + +These options are specific to the worker in addition to the +:doc:`common options `. + +Configuration File +------------------ + + The ``[worker]`` section is specific to the libra_worker utility. Below + is an example: + + .. code-block:: ini + + [worker] + driver = haproxy + reconnect_sleep = 60 + server = 10.0.0.1:8080 10.0.0.2:8080 + +Command Line Options +-------------------- + .. program:: libra_worker + + .. option:: --driver + + Load balancer driver to use. Valid driver options are: + + * *haproxy* - `HAProxy `_ software load balancer. + This is the default driver. + + .. option:: -s , --reconnect_sleep + + The number of seconds to sleep between job server reconnect attempts + when no specified job servers are available. Default is 60 seconds. + + .. option:: --server + + Used to specify the Gearman job server hostname and port. This option + can be used multiple times to specify multiple job servers. + + .. option:: --syslog + + Send log events to syslog. + + .. option:: --syslog-socket + + Socket to use for the syslog connection. Default is */dev/log*. + + .. option:: --syslog-facility + + Syslog logging facility. Default is *LOCAL7*. + + .. option:: --stats-poll + + The number of seconds to sleep between statistics polling of the + load balancer driver. Default is 300 seconds. + diff --git a/doc/worker/index.rst b/doc/worker/index.rst index 943c2c75..63b6e79b 100644 --- a/doc/worker/index.rst +++ b/doc/worker/index.rst @@ -5,5 +5,6 @@ Libra Gearman Worker :maxdepth: 2 about + config code messages