diff --git a/doc/worker/config.rst b/doc/config.rst similarity index 60% rename from doc/worker/config.rst rename to doc/config.rst index fe852697..2a88c9f3 100644 --- a/doc/worker/config.rst +++ b/doc/config.rst @@ -1,5 +1,5 @@ -Configuration -============= +Configuration of Node Pool Manager and Worker +============================================= Options can be specified either via the command line, or with a configuration file, or both. Options given on the command line will override any options @@ -39,7 +39,9 @@ Worker Section ^^^^^^^^^^^^^^ The ``[worker]`` section is specific to the libra_worker utility. Below - is an example:: + is an example: + + .. code-block:: ini [worker] user = haproxy @@ -50,8 +52,33 @@ Worker Section pid = /var/run/libra/libra_worker.pid logfile = /var/log/libra/libra_worker.log -Command Line Options --------------------- +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 + 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 + haproxy_image = 12345 + api_servers = 10.0.0.1:8889 10.0.0.2:8889 + nodes = 10 + check_interval = 5 + image_size = 102 + + +Worker Command Line Options +--------------------------- .. program:: libra_worker.py .. option:: -c , --config @@ -115,3 +142,53 @@ Command Line Options Enable verbose output. Normally, only errors are logged. This enables additional logging, but not as much as the :option:`-d` option. + +Pool Manager Command Line Options +--------------------------------- + .. program:: libra_pool_mgm.py + + .. 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:: -d, --debug + + Enable debugging output. + + .. 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:: -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:: -p , --pid + + Name of the PID file to use. Default is: + */var/run/libra/libra_worker.pid* + + .. 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. + + diff --git a/doc/index.rst b/doc/index.rst index 79251e16..ae94a97f 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -7,3 +7,5 @@ Load Balancer as a Service Device Tools introduction client/index worker/index + pool_mgm/index + config diff --git a/doc/pool_mgm/about.rst b/doc/pool_mgm/about.rst new file mode 100644 index 00000000..c1b90688 --- /dev/null +++ b/doc/pool_mgm/about.rst @@ -0,0 +1,18 @@ +Description +=========== + +Purpose +------- + +The Libra Node Pool manager is designed to keep a constant pool of spare load +balancer nodes so that when a new one is needed it simply needs configuring. +This saves on time needed to spin up new nodes upon customer request and extra +delays due to new nodes failing. + +Design +------ + +It is designed to probe the API server every X minutes (5 by default) to find +out how many free nodes there are. If this falls below a certain defined level +the pool manager will spin up new nodes and supply the details of the to the +API server. diff --git a/doc/pool_mgm/index.rst b/doc/pool_mgm/index.rst new file mode 100644 index 00000000..8f95b7be --- /dev/null +++ b/doc/pool_mgm/index.rst @@ -0,0 +1,7 @@ +Libra Node Pool Manager +======================= + +.. toctree:: + :maxdepth: 2 + + about diff --git a/doc/worker/index.rst b/doc/worker/index.rst index 4992aa8d..af0150f9 100644 --- a/doc/worker/index.rst +++ b/doc/worker/index.rst @@ -5,5 +5,4 @@ Libra Gearman Worker :maxdepth: 2 about - config - code \ No newline at end of file + code